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


PHP Receipt::selectRecord方法代码示例

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


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

 function getCollectionArrayList()
 {
     $sortedOwnerIDArray = $this->getSortedOwnerIDArray();
     foreach ($sortedOwnerIDArray as $ownerID) {
         $ownerName = $this->getOwnerName($ownerID);
         $paymentRecords = $this->getPaymentRecordsOwnerID($ownerID);
         if (is_array($paymentRecords->arrayList)) {
             foreach ($paymentRecords->arrayList as $payment) {
                 $paymentID = $payment->getPaymentID();
                 $paymentDate = $payment->getPaymentDate();
                 $taxDeclarationNumber = $this->getTDNumberFromPayment($payment->getTdID(), $payment->getBacktaxTDID());
                 $collectionRecords = $this->getCollectionRecordsFromPaymentID($paymentID);
                 if (is_array($collectionRecords->arrayList)) {
                     foreach ($collectionRecords->arrayList as $collection) {
                         $receipt = new Receipt();
                         $receiptID = $collection->getReceiptID();
                         $receipt->selectRecord($receiptID);
                         $receiptNumber = $receipt->getReceiptNumber();
                         $basicTax = 0;
                         $sefTax = 0;
                         switch ($collection->getTaxType()) {
                             case "basic":
                                 $basicTax = $collection->getAmountPaid();
                                 break;
                             case "sef":
                                 $sefTax = $collection->getAmountPaid();
                                 break;
                         }
                         $total = $basicTax + $sefTax;
                         $collectionRecordArray = array("ownerName" => $ownerName, "taxDeclarationNumber" => $taxDeclarationNumber, "datePaid" => $paymentDate, "orNumber" => $receiptNumber, "basicTax" => $basicTax, "sefTax" => $sefTax, "total" => $total);
                         $collectionArrayList[] = $collectionRecordArray;
                     }
                 }
             }
         }
     }
     if (is_array($collectionArrayList)) {
         return $collectionArrayList;
     } else {
         return false;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:42,代码来源:RptCollectionByOwnerPrint.php

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

示例4: getReceipt

 function getReceipt($receiptID)
 {
     $receipt = new Receipt($this->dbName);
     if ($receipt->selectRecord($receiptID)) {
         return $receipt;
     }
     return false;
 }
开发者ID:armic,项目名称:erpts,代码行数:8,代码来源:ProvincialQuarterlyReportOnRPTCollectionsPrint.php

示例5: searchRecords

 function searchRecords($searchKey, $fields, $limit)
 {
     $condition = "where (";
     foreach ($fields as $key => $value) {
         if ($key == 0) {
             $condition = $condition . $value . " like '%" . $searchKey . "%'";
         } else {
             $condition = $condition . "or " . $value . " like '%" . $searchKey . "%' ";
         }
     }
     if (!strstr(strtoupper($limit), 'ORDER')) {
         $sql = sprintf("select * from %s %s;", RECEIPT_TABLE, $condition . ") and status != 'cancelled' ORDER BY receiptID DESC " . $limit);
     } else {
         $limit = str_replace("WHERE", "and", $limit);
         $sql = sprintf("select * from %s %s;", RECEIPT_TABLE, $condition . ") " . $limit);
     }
     //echo $sql;
     $this->setDB();
     $this->db->query($sql);
     while ($this->db->next_record()) {
         $receipt = new Receipt();
         $receipt->selectRecord($this->db->f("receiptID"));
         $this->arrayList[] = $receipt;
     }
     if (count($this->arrayList) > 0) {
         $this->setDomDocument();
         return true;
     } else {
         return false;
     }
 }
开发者ID:armic,项目名称:erpts,代码行数:31,代码来源:ReceiptRecords.php


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