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


PHP Receipt::getDomDocument方法代码示例

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


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

示例1: getReceipt

 function getReceipt($receiptID)
 {
     $receipt = new Receipt();
     $receipt->selectRecord($receiptID);
     if (!($domDoc = $receipt->getDomDocument())) {
         return false;
     } else {
         $xmlStr = $domDoc->dump_mem(true);
         return $xmlStr;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:11,代码来源:ReceiptDetails.php

示例2: Main

 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "confirm":
             $PaymentEncode = new SoapObject(NCCBIZ . "PaymentEncode.php", "urn:Object");
             $ReceiptEncode = new SoapObject(NCCBIZ . "ReceiptEncode.php", "urn:Object");
             $CollectionEncode = new SoapObject(NCCBIZ . "CollectionEncode.php", "urn:Object");
             $basicReceiptIDArrayIndex = 0;
             $sefReceiptIDArrayIndex = 0;
             $idleReceiptIDArrayIndex = 0;
             // create Basic Receipts
             foreach ($this->formArray["basicReceipt"] as $basicReceiptArray) {
                 $basicReceipt = new Receipt();
                 $basicReceipt->setReceiptNumber($basicReceiptArray["receiptNumber"]);
                 $basicReceipt->setReceiptDate($this->formArray["paymentDate"]);
                 $basicReceipt->setPaymentMode($this->formArray["paymentMode"]);
                 $basicReceipt->setCheckNumber($this->formArray["checkNumber"]);
                 $basicReceipt->setDateOfCheck($this->formArray["dateOfCheck"]);
                 $basicReceipt->setDraweeBank($this->formArray["draweeBank"]);
                 $basicReceipt->setReceivedFrom($this->formArray["receivedFrom"]);
                 $basicReceipt->setPreviousReceiptNumber($basicReceiptArray["previousReceiptNumber"]);
                 $basicReceipt->setPreviousReceiptDate($basicReceiptArray["previousReceiptDate_year"] . "-" . putPreZero($basicReceiptArray["previousReceiptDate_month"] . "-" . putPreZero($basicReceiptArray["previousReceiptDate_day"])));
                 $basicReceipt->setCityTreasurer($this->formArray["cityTreasurer"]);
                 $basicReceipt->setDeputyTreasurer($this->formArray["deputyTreasurer"]);
                 $basicReceipt->setStatus("");
                 $basicReceipt->setDomDocument();
                 $domDoc = $basicReceipt->getDomDocument();
                 $xmlStr = $domDoc->dump_mem(true);
                 if (!($basicReceiptIDArray[$basicReceiptIDArrayIndex] = $ReceiptEncode->saveReceipt($xmlStr))) {
                     exit("error save basic receipt");
                 }
                 $receiptIDArray[] = $basicReceiptIDArray[$basicReceiptIDArrayIndex];
                 $basicReceiptIDArrayIndex++;
             }
             // create Sef Receipts
             foreach ($this->formArray["sefReceipt"] as $sefReceiptArray) {
                 $sefReceipt = new Receipt();
                 $sefReceipt->setReceiptNumber($sefReceiptArray["receiptNumber"]);
                 $sefReceipt->setReceiptDate($this->formArray["paymentDate"]);
                 $sefReceipt->setPaymentMode($this->formArray["paymentMode"]);
                 $sefReceipt->setCheckNumber($this->formArray["checkNumber"]);
                 $sefReceipt->setDateOfCheck($this->formArray["dateOfCheck"]);
                 $sefReceipt->setDraweeBank($this->formArray["draweeBank"]);
                 $sefReceipt->setReceivedFrom($this->formArray["receivedFrom"]);
                 $sefReceipt->setPreviousReceiptNumber($sefReceiptArray["previousReceiptNumber"]);
                 $sefReceipt->setPreviousReceiptDate($sefReceiptArray["previousReceiptDate_year"] . "-" . putPreZero($sefReceiptArray["previousReceiptDate_month"] . "-" . putPreZero($sefReceiptArray["previousReceiptDate_day"])));
                 $sefReceipt->setCityTreasurer($this->formArray["cityTreasurer"]);
                 $sefReceipt->setDeputyTreasurer($this->formArray["deputyTreasurer"]);
                 $sefReceipt->setStatus("");
                 $sefReceipt->setDomDocument();
                 $domDoc = $sefReceipt->getDomDocument();
                 $xmlStr = $domDoc->dump_mem(true);
                 if (!($sefReceiptIDArray[$sefReceiptIDArrayIndex] = $ReceiptEncode->saveReceipt($xmlStr))) {
                     exit("error save sef receipt");
                 }
                 $receiptIDArray[] = $sefReceiptIDArray[$sefReceiptIDArrayIndex];
                 $sefReceiptIDArrayIndex++;
             }
             // create Idle Receipts
             foreach ($this->formArray["idleReceipt"] as $idleReceiptArray) {
                 $idleReceipt = new Receipt();
                 $idleReceipt->setReceiptNumber($idleReceiptArray["receiptNumber"]);
                 $idleReceipt->setReceiptDate($this->formArray["paymentDate"]);
                 $idleReceipt->setPaymentMode($this->formArray["paymentMode"]);
                 $idleReceipt->setCheckNumber($this->formArray["checkNumber"]);
                 $idleReceipt->setDateOfCheck($this->formArray["dateOfCheck"]);
                 $idleReceipt->setDraweeBank($this->formArray["draweeBank"]);
                 $idleReceipt->setReceivedFrom($this->formArray["receivedFrom"]);
                 $idleReceipt->setPreviousReceiptNumber($idleReceiptArray["previousReceiptNumber"]);
                 $idleReceipt->setPreviousReceiptDate($idleReceiptArray["previousReceiptDate_year"] . "-" . putPreZero($idleReceiptArray["previousReceiptDate_month"] . "-" . putPreZero($idleReceiptArray["previousReceiptDate_day"])));
                 $idleReceipt->setCityTreasurer($this->formArray["cityTreasurer"]);
                 $idleReceipt->setDeputyTreasurer($this->formArray["deputyTreasurer"]);
                 $idleReceipt->setStatus("");
                 $idleReceipt->setDomDocument();
                 $domDoc = $idleReceipt->getDomDocument();
                 $xmlStr = $domDoc->dump_mem(true);
                 if (!($idleReceiptIDArray[$idleReceiptIDArrayIndex] = $ReceiptEncode->saveReceipt($xmlStr))) {
                     exit("error save idle receipt");
                 }
                 $receiptIDArray[] = $idleReceiptIDArray[$idleReceiptIDArrayIndex];
                 $idleReceiptIDArrayIndex++;
             }
             $lineCtr = 0;
             $basicReceiptIDArrayIndex = 0;
             $sefReceiptIDArrayIndex = 0;
             $idleReceiptIDArrayIndex = 0;
             if (is_array($this->formArray["payment"])) {
                 foreach ($this->formArray["payment"] as $formPaymentArray) {
                     $payment = new Payment();
                     $payment->setTdID($formPaymentArray["tdID"]);
                     $payment->setDueID($formPaymentArray["dueID"]);
                     $payment->setDueType($formPaymentArray["dueType"]);
                     $payment->setBacktaxTDID($formPaymentArray["backtaxTDID"]);
                     $payment->setTaxDue($formPaymentArray["taxDue"]);
                     $payment->setAdvancedPaymentDiscount($formPaymentArray["advancedPaymentDiscount"]);
                     $payment->setEarlyPaymentDiscount($formPaymentArray["earlyPaymentDiscount"]);
                     $payment->setPenalty($formPaymentArray["penalty"]);
                     $payment->setAmnesty($formPaymentArray["amnesty"]);
                     $payment->setBalanceDue($formPaymentArray["balanceDue"]);
                     $payment->setAmountPaid($formPaymentArray["amountPaid"]);
//.........这里部分代码省略.........
开发者ID:armic,项目名称:erpts,代码行数:101,代码来源:PaymentEncode.php


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