本文整理汇总了PHP中Payment::setAmnesty方法的典型用法代码示例。如果您正苦于以下问题:PHP Payment::setAmnesty方法的具体用法?PHP Payment::setAmnesty怎么用?PHP Payment::setAmnesty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Payment
的用法示例。
在下文中一共展示了Payment::setAmnesty方法的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"]);
//.........这里部分代码省略.........
示例2: Main
function Main()
{
global $_POST;
$this->tpl->set_var("uname", $this->user["uname"]);
$this->tpl->set_var("today", date("F j, Y"));
$this->setPageDetailPerms();
$this->formArray["formAction"] = $_POST["formAction"];
switch ($this->formArray["formAction"]) {
case "applyPayment":
// show owner
$RPTOPDetails = new SoapObject(NCCBIZ . "RPTOPDetails.php", "urn:Object");
if (!($xmlStr = $RPTOPDetails->getRPTOP($this->formArray["rptopID"]))) {
exit("xml failed");
} else {
//echo($xmlStr);
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$rptop = new RPTOP();
$rptop->parseDomDocument($domDoc);
//print_r($rptop);
if (is_object($rptop->owner)) {
//$RPTOPEncode = new SoapObject(NCCBIZ."RPTOPEncode.php", "urn:Object");
if (is_a($rptop->owner, "Owner")) {
$this->formArray["ownerID"] = $rptop->owner->getOwnerID();
$xmlStr = $rptop->owner->domDocument->dump_mem(true);
if (!$xmlStr) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "");
} else {
if (!($domDoc = domxml_open_mem($xmlStr))) {
$this->tpl->set_block("rptsTemplate", "OwnerListTable", "OwnerListTableBlock");
$this->tpl->set_var("OwnerListTableBlock", "error xmlDoc");
} else {
$this->displayOwnerList($domDoc);
}
}
} else {
$this->tpl->set_block("rptsTemplate", "PersonList", "PersonListBlock");
$this->tpl->set_var("PersonListBlock", "");
$this->tpl->set_block("rptsTemplate", "CompanyList", "CompanyListBlock");
$this->tpl->set_var("CompanyListBlock", "");
}
}
}
}
// gather payments
$this->tdArray = $_POST["td"];
if (is_array($this->tdArray)) {
foreach ($this->tdArray as $tdID => $tdElementArray) {
// grab dueID from tdID
$dueID = $dueType = $tdElementArray["dueType"];
// start: the following 'for' loop is an un_number_format sweep added February 10, 2005
foreach ($tdElementArray as $tdElementKey => $tdElementValue) {
$tdElementArray[$tdElementKey] = un_number_format($tdElementValue);
}
// end: un_number_format sweep loop of February 10, 2005
foreach ($tdElementArray as $tdElementKey => $tdElementValue) {
switch ($tdElementKey) {
case "amountPaid":
if ($tdElementValue > 0) {
$payment = new Payment();
$payment->setPaymentID("");
$payment->setTdID($tdID);
$payment->setDueID($tdElementArray["dueID"]);
$payment->setDueType($tdElementArray["dueType"]);
$payment->setBacktaxTDID("");
$payment->setTaxDue($tdElementArray["taxDue"]);
$payment->setAdvancedPaymentDiscount($tdElementArray["advancedPaymentDiscount"]);
$payment->setEarlyPaymentDiscount($tdElementArray["earlyPaymentDiscount"]);
$payment->setPenalty($tdElementArray["penalty"]);
$payment->setAmnesty($tdElementArray["amnesty"]);
$payment->setBalanceDue($tdElementArray["balance"]);
$payment->setAmountPaid(un_number_format($tdElementArray["amountPaid"]));
$payment->setDueDate(date("Y-m-d", strtotime($tdElementArray["dueDate"])));
$payment->setPaymentDate(date("Y-m-d", strtotime("now")));
$payment->setOwnerID($this->formArray["ownerID"]);
$payment->setTdNumber($this->getTDNumberFromPayment($tdID, ""));
$payment->setBasicReceipt($this->initReceipt($payment, "basic"));
$payment->setSefReceipt($this->initReceipt($payment, "sef"));
$payment->setIdleReceipt($this->initReceipt($payment, "idle"));
$this->paymentArrayList[] = $payment;
}
break;
case "btTD":
if (is_array($tdElementValue)) {
$btTDArray = $tdElementValue;
foreach ($btTDArray as $backtaxTDID => $btTDElementArray) {
if ($btTDElementArray["amountPaid"] > 0) {
$payment = new Payment();
$payment->setPaymentID("");
$payment->setTdID("");
$payment->setDueID($btTDElementArray["dueID"]);
$payment->setDueType($btTDElementArray["dueType"]);
$payment->setBacktaxTDID($backtaxTDID);
$payment->setTaxDue($btTDElementArray["taxDue"]);
$payment->setAdvancedPaymentDiscount($btTDElementArray["advancedPaymentDiscount"]);
$payment->setEarlyPaymentDiscount($btTDElementArray["earlyPaymentDiscount"]);
$payment->setPenalty($btTDElementArray["penalty"]);
//.........这里部分代码省略.........