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


PHP Receipt::setStatus方法代码示例

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


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

示例1: 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

示例2: cancelReceiptList

 function cancelReceiptList($receiptIDArray = "")
 {
     if (is_array($receiptIDArray)) {
         $collectionRecords = new CollectionRecords();
         $collection = new Collection();
         $receipt = new Receipt();
         $payment = new Payment();
         foreach ($receiptIDArray as $receiptID) {
             // find other receipts associated to payment
             $collectionRecords->selectRecords("WHERE receiptID='" . $receiptID . "'");
             $paymentID = $collectionRecords->arrayList[0]->getPaymentID();
             $collectionRecords->selectRecords("WHERE paymentID='" . $paymentID . "'");
             if (is_array($collectionRecords->getArrayList())) {
                 foreach ($collectionRecords->getArrayList() as $collection) {
                     $cancelReceiptIDArray[] = $collection->getReceiptID();
                     $cancelPaymentIDArray[] = $collection->getPaymentID();
                     $cancelCollectionIDArray[] = $collection->getCollectionID();
                 }
             }
         }
         $cancelCollectionIDArray = array_unique($cancelCollectionIDArray);
         $cancelReceiptIDArray = array_unique($cancelReceiptIDArray);
         $cancelPaymentIDArray = array_unique($cancelPaymentIDArray);
         foreach ($cancelCollectionIDArray as $collectionID) {
             $collection->selectRecord($collectionID);
             $collection->setStatus("cancelled");
             $collection->updateRecord();
         }
         $condition = " WHERE ";
         foreach ($cancelReceiptIDArray as $receiptID) {
             if ($condition != " WHERE ") {
                 $condition .= " OR ";
             }
             $condition .= " receiptID = '" . $receiptID . "' ";
             $receipt->selectRecord($receiptID);
             $receipt->setStatus("cancelled");
             $receipt->updateRecord();
         }
         foreach ($cancelPaymentIDArray as $paymentID) {
             $payment->selectRecord($paymentID);
             $payment->setStatus("cancelled");
             $payment->updateRecord();
         }
         // cancel associated mergedReceipts
         $receiptRecords = new ReceiptRecords();
         if ($receiptRecords->selectRecords($condition)) {
             if (!($domDoc = $receiptRecords->getDomDocument())) {
                 return false;
             } else {
                 $xmlStr = $domDoc->dump_mem(true);
                 return $xmlStr;
             }
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:59,代码来源:ReceiptList.php


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