当前位置: 首页>>代码示例>>PHP>>正文


PHP Receipt::parseDomDocument方法代码示例

本文整理汇总了PHP中Receipt::parseDomDocument方法的典型用法代码示例。如果您正苦于以下问题:PHP Receipt::parseDomDocument方法的具体用法?PHP Receipt::parseDomDocument怎么用?PHP Receipt::parseDomDocument使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Receipt的用法示例。


在下文中一共展示了Receipt::parseDomDocument方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: parseDomDocument

 function parseDomDocument($domDoc)
 {
     $baseNode = $domDoc->document_element();
     if ($baseNode->has_child_nodes()) {
         $child = $baseNode->first_child();
         while ($child) {
             //if ($child->tagname=="Due") {
             if ($child->tagname) {
                 $tempXmlStr = $domDoc->dump_node($child);
                 $tempDomDoc = domxml_open_mem($tempXmlStr);
                 $receipt = new Receipt();
                 $receipt->parseDomDocument($tempDomDoc);
                 $this->arrayList[] = $receipt;
             }
             $child = $child->next_sibling();
         }
     }
     $this->setDomDocument();
     //$this->setDomDocumentRecords();
     return true;
 }
开发者ID:armic,项目名称:erpts,代码行数:21,代码来源:ReceiptRecords.php

示例2: getReceipt

 function getReceipt($receiptID)
 {
     $ReceiptDetails = new SoapObject(NCCBIZ . "ReceiptDetails.php", "urn:Object");
     if (!($xmlStr = $ReceiptDetails->getReceipt($receiptID))) {
         return false;
     } else {
         if (!($domDoc = domxml_open_mem($xmlStr))) {
             return false;
         } else {
             $receipt = new Receipt();
             $receipt->parseDomDocument($domDoc);
             return $receipt;
         }
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:15,代码来源:ConsolidatedQuarterlyReportOnRPTCollectionsPrint.php

示例3: parseDomDocument

 function parseDomDocument($domDoc)
 {
     $ret = true;
     $baseNode = $domDoc->document_element();
     if ($baseNode->has_child_nodes()) {
         $child = $baseNode->first_child();
         while ($child) {
             if ($child->tagname == "receiptArray") {
                 $receiptNode = $child->first_child();
                 while ($receiptNode) {
                     //if ($addressNode->tagname=="address") {
                     if ($receiptNode->tagname) {
                         $tempXmlStr = $domDoc->dump_node($receiptNode);
                         $tempDomDoc = domxml_open_mem($tempXmlStr);
                         $receipt = new Receipt();
                         $ret = $receipt->parseDomDocument($tempDomDoc);
                         $this->setReceiptArray($receipt);
                     }
                     $receiptNode = $receiptNode->next_sibling();
                 }
             } else {
                 //eval("\$this->".$child->tagname." = \"".$child->get_content()."\";");
                 // test varvars
                 $varvar = $child->tagname;
                 $trans = array_flip(get_html_translation_table(HTML_ENTITIES));
                 $childContent = strtr(html_entity_decode($child->get_content()), $trans);
                 $this->{$varvar} = html_entity_decode($childContent);
                 //$this->$varvar = html_entity_decode($child->get_content());
             }
             //eval("\$this->set".ucfirst($child->tagname)."(\"".$child->get_content()."\");");
             $child = $child->next_sibling();
         }
     }
     $this->setDomDocument();
     return $ret;
 }
开发者ID:armic,项目名称:erpts,代码行数:36,代码来源:_Payment.php

示例4: Main

 function Main()
 {
     $this->setForm();
     $this->tpl->set_block("rptsTemplate", "ReceiptPage", "ReceiptPageBlock");
     $pageNumber = 1;
     $ReceiptDetails = new SoapObject(NCCBIZ . "ReceiptDetails.php", "urn:Object");
     $CollectionList = new SoapObject(NCCBIZ . "CollectionList.php", "urn:Object");
     $PaymentDetails = new SoapObject(NCCBIZ . "PaymentDetails.php", "urn:Object");
     foreach ($this->formArray["receiptIDArray"] as $receiptID) {
         $this->tpl->set_var("pageNumber", $pageNumber);
         $totalAmountPaid = 0;
         $eRPTSSettings = $this->getERPTSSettingsDetails();
         if ($eRPTSSettings->getLguType() == "City") {
             $this->setvar("city", $eRPTSSettings->getLguName());
             $this->setvar("province", "");
         } else {
             $this->setvar("city", "");
             $this->setvar("province", $eRPTSSettings->getLguName());
         }
         if (!($xmlStr = $ReceiptDetails->getReceipt($receiptID))) {
             //exit("xml failed.");
         } else {
             if (!($domDoc = domxml_open_mem($xmlStr))) {
                 //exit("error domDoc");
             } else {
                 $receipt = new Receipt();
                 $receipt->parseDomDocument($domDoc);
                 $this->setvar("prevORNum", $receipt->getPreviousReceiptNumber());
                 $porMonth = "";
                 $porDay = "";
                 $porYear = "";
                 if ($receipt->getPreviousReceiptDate() != "0000-00-00") {
                     $porMonth = date("F", strtotime($receipt->getPreviousReceiptDate()));
                     $porDay = date("d", strtotime($receipt->getPreviousReceiptDate()));
                     $porYear = date("Y", strtotime($receipt->getPreviousReceiptDate()));
                 }
                 $this->setvar("porMonth", $porMonth);
                 $this->setvar("porDay", $porDay);
                 $this->setvar("porYear", $porYear);
                 $this->setvar("orNum", $receipt->getReceiptNumber());
                 $orDate = "";
                 if ($receipt->getReceiptDate() != "0000-00-00") {
                     $orDate = date("F d, Y", strtotime($receipt->getReceiptDate()));
                 }
                 $this->setvar("orDate", $orDate);
                 $this->setvar("receivedFrom", $this->getReceivedFromName($receipt->getReceivedFrom()));
                 $this->setvar("paymentMode", $receipt->getPaymentMode());
                 if ($receipt->getPaymentMode() == "check") {
                     $this->setvar("checkNumber", "using Check Number : " . $receipt->getCheckNumber());
                     $this->setvar("dateOfCheck", " dated " . date("F d, Y", strtotime($receipt->getDateOfCheck())));
                     $this->setvar("draweeBank", "(" . $receipt->getDraweeBank() . ")");
                 }
                 $this->setvar("cityTreasurer", $this->getPersonName($receipt->getCityTreasurer()));
                 $this->setvar("deputyTreasurer", $this->getPersonName($receipt->getDeputyTreasurer()));
                 if (!($collectionXmlStr = $CollectionList->getCollectionListFromReceiptID($receiptID))) {
                     // xml failed
                 } else {
                     if (!($collectionDomDoc = domxml_open_mem($collectionXmlStr))) {
                         // error domDoc
                     } else {
                         $collectionRecords = new CollectionRecords();
                         $collectionRecords->parseDomDocument($collectionDomDoc);
                         $collectionArrayList = $collectionRecords->getArrayList();
                         $i = 0;
                         foreach ($collectionArrayList as $collection) {
                             $i++;
                             if ($i <= 1) {
                                 if ($collection->getTaxType() == "basic") {
                                     $this->setvar("receiptType", "[ X ]  BASIC TAX      [  ]  SPECIAL EDUCATION FUND");
                                 } else {
                                     if ($collection->getTaxType() == "sef") {
                                         $this->setvar("receiptType", "[  ]  BASIC TAX     [ X ]  SPECIAL EDUCATION FUND");
                                     } else {
                                         if ($collection->getTaxType() == "idle") {
                                             $this->setvar("receiptType", "[  ]  BASIC TAX     [  ]  SPECIAL EDUCATION FUND     [ X ]  IDLE TAX");
                                         }
                                     }
                                 }
                             }
                             $paymentID = $collection->getPaymentID();
                             if (!($paymentXmlStr = $PaymentDetails->getPayment($paymentID))) {
                                 // xml failed
                             } else {
                                 if (!($paymentDomDoc = domxml_open_mem($paymentXmlStr))) {
                                     // error domDoc
                                 } else {
                                     $payment = new Payment();
                                     $payment->parseDomDocument($paymentDomDoc);
                                     $assessedValue = 0;
                                     // added "orYear" for fix of Feb 08, 2005
                                     $this->formArray["orYear"] = substr($payment->dueDate, 0, 4);
                                     $this->setvar("orYear", $this->formArray["orYear"], false);
                                     if ($i <= 6) {
                                         $this->setvar("ownerName" . $i, $this->getReceivedFromName($receipt->getReceivedFrom()));
                                         if ($payment->getDueID() != "" && $payment->getDueID() != "0") {
                                             // due payment
                                             $due = $this->getDue($payment->getDueID());
                                             $td = $this->getTD($due->getTdID());
                                             $afs = $this->getAFS($td->getAfsID());
                                             $tdNum = $td->getTaxDeclarationNumber();
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:PrintReceiptDetailsPDF.php


注:本文中的Receipt::parseDomDocument方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。