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


PHP Receipt::getReceiptDate方法代码示例

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


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

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