當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Payment::selectRecord方法代碼示例

本文整理匯總了PHP中Payment::selectRecord方法的典型用法代碼示例。如果您正苦於以下問題:PHP Payment::selectRecord方法的具體用法?PHP Payment::selectRecord怎麽用?PHP Payment::selectRecord使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Payment的用法示例。


在下文中一共展示了Payment::selectRecord方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getPayment

 function getPayment($paymentID)
 {
     $payment = new Payment();
     $payment->selectRecord($paymentID);
     if (!($domDoc = $payment->getDomDocument())) {
         return false;
     } else {
         $xmlStr = $domDoc->dump_mem(true);
         return $xmlStr;
     }
 }
開發者ID:armic,項目名稱:erpts,代碼行數:11,代碼來源:PaymentDetails.php

示例2: purge

 function purge()
 {
     $rptsDB = new DB_RPTS();
     $rptsDB2 = new DB_RPTS();
     $sqlselect = "SELECT collectionID FROM collections WHERE receiptNum = '' OR receiptNum is NULL;";
     $rptsDB->query($sqlselect);
     $due = new Dues();
     while ($rptsDB->next_record()) {
         $collectionID = $rptsDB->f("collectionID");
         $this->collectionID = $collectionID;
         $this->isStoredInDatabase = true;
         $sqlselect2 = "select payments.paymentID, payments.dueID from payments \n  \t\t\t\t\t\tinner join collectionPayments on payments.paymentID=collectionPayments.paymentID \n                        where collectionPayments.collectionID ={$collectionID}";
         #echo("$sqlselect2<br>");
         $rptsDB2->query($sqlselect2);
         $payment = new Payment();
         while ($rptsDB2->next_record()) {
             $payment->setPaymentID($rptsDB2->f("paymentID"));
             $payment->selectRecord();
             // if Payment is BacktaxTD, FLAG BacktaxTD paidStatus as '' for false / UNPAID
             if ($strstr = strstr($payment->dueType, ",")) {
                 $backtaxTDID = strstr($strstr, "=");
                 $backtaxTDID = str_replace("=", "", $backtaxTDID);
                 $backtaxTD = new BacktaxTD();
                 $backtaxTD->selectRecord("", $backtaxTDID);
                 $backtaxTD->setBacktaxTDID($backtaxTDID);
                 $backtaxTD->setTotalPaid(0);
                 $backtaxTD->updatePaidStatus("");
                 $backtaxTD->updateRecord();
             }
             $dueID = $rptsDB2->f("dueID");
             $due->setDueID($dueID);
             $due->select();
             $due->resetPayments();
             $due->store();
         }
         if (!$this->deleteRecord()) {
             return false;
         }
     }
     return true;
 }
開發者ID:armic,項目名稱:erpts,代碼行數:41,代碼來源:_Collections.php

示例3: selectRecords

 function selectRecords($condition = "")
 {
     $sql = sprintf("select * from %s %s;", PAYMENT_TABLE, $condition);
     //echo $sql;
     //echo "<hr>";
     $this->setDB();
     $this->db->query($sql);
     while ($this->db->next_record()) {
         $payment = new Payment();
         $payment->selectRecord($this->db->f("paymentID"));
         $this->arrayList[] = $payment;
         unset($payment);
     }
     unset($this->db);
     if (count($this->arrayList) > 0) {
         $this->setDomDocument();
         return true;
     } else {
         return false;
     }
 }
開發者ID:armic,項目名稱:erpts,代碼行數:21,代碼來源:PaymentRecords.php

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


注:本文中的Payment::selectRecord方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。