本文整理汇总了PHP中Receipt::getReceiptNum方法的典型用法代码示例。如果您正苦于以下问题:PHP Receipt::getReceiptNum方法的具体用法?PHP Receipt::getReceiptNum怎么用?PHP Receipt::getReceiptNum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Receipt
的用法示例。
在下文中一共展示了Receipt::getReceiptNum方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: recordReceipt
function recordReceipt($varValues)
{
# create receipt object
$receipt = new Receipt();
# set the details of the receipt
$receipt->setOldReceiptNum($varValues['oldReceiptNum']);
$receipt->setRPTOPNum($varValues['rptopNum']);
$receipt->setTDNum($varValues['tdNum']);
# get the specific due by using the tdNum and the date on the RPTOP
$taxDue = new Dues();
$rptop = new RPTOP();
if ($rptop->selectRecord($varValues['rptopNum'])) {
$dueDate = $rptop->getRptopDate();
} else {
// if there is no valid RPTOP provided, then just use the dueDate
$dueDate = $varValue['dueDate'];
}
$taxDue->createByTDDate($tdNum, $dueDate, true);
# create by date and true if it exists.
$taxDue->store();
# record the payments for each receipt
$payments[0] = new Payment();
$payments[0]->setAmount($varValues['sefTotal']);
$payments[0]->setDueType("sef");
$payments[0]->setDiscount($varValues['discount']);
$payments[0]->setInterest($varValues['interest']);
$payments[0]->setDueID($taxDue->getDueID());
$payments[0]->setReceiptNum($receipt->getReceiptNum());
$payments[0]->store();
$receipt->addPayment($payments[0]);
$payments[1] = new Payment();
$payments[1]->setDueType("basic");
$payments[1]->setAmount($varValues['gfTotal'] + $varValues['ibTotal'] + $varValues['cbTotal']);
$payments[1]->setDiscount($varValues['discount']);
$payments[1]->setInterest($varValues['interest']);
$payments[1]->setDueID($taxDue->getDueID());
$payments[1]->setReceiptNum($receipt->getReceiptNum());
$payments[1]->store();
$receipt->addPayment($payments[1]);
$payments[2] = new Payment();
$payments[2]->setDueType("pd1185");
$payments[2]->setAmount($varValues['pd1185Total']);
$payments[2]->setDueID($taxDue->getDueID());
$payments[2]->setReceiptNum($receipt->getReceiptNum());
$payments[2]->store();
$receipt->addPayment($payments[2]);
# store the receipt
$receipt->store();
}