本文整理汇总了PHP中invoice::get_invoice_statii方法的典型用法代码示例。如果您正苦于以下问题:PHP invoice::get_invoice_statii方法的具体用法?PHP invoice::get_invoice_statii怎么用?PHP invoice::get_invoice_statii使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类invoice
的用法示例。
在下文中一共展示了invoice::get_invoice_statii方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: alloc_redirect
alloc_redirect($TPL["url_alloc_invoice"] . "invoiceID=" . $invoiceID);
}
}
}
}
if ($invoiceID && $invoiceItemIDs) {
$currency = $invoice->get_value("currencyTypeID");
$q = prepare("SELECT SUM(IF((iiTax IS NULL OR iiTax = 0) AND value,\n (value/100+1) * iiAmount * pow(10,-currencyType.numberToBasic),\n iiAmount * pow(10,-currencyType.numberToBasic)\n )) as sum_iiAmount\n FROM invoiceItem \n LEFT JOIN invoice on invoiceItem.invoiceID = invoice.invoiceID\n LEFT JOIN currencyType on invoice.currencyTypeID = currencyType.currencyTypeID\n LEFT JOIN config ON config.name = 'taxPercent'\n WHERE invoiceItem.invoiceID = %d", $invoiceID);
$db->query($q);
$db->next_record() and $TPL["invoiceTotal"] = page::money($currency, $db->f("sum_iiAmount"), "%S%m %c");
$q = prepare("SELECT sum(amount * pow(10,-currencyType.numberToBasic)) as sum_transaction_amount\n FROM transaction \n LEFT JOIN currencyType on transaction.currencyTypeID = currencyType.currencyTypeID\n WHERE status = 'approved' \n AND invoiceItemID in (%s)", $invoiceItemIDs);
$db->query($q);
$db->next_record() and $TPL["invoiceTotalPaid"] = page::money($currency, $db->f("sum_transaction_amount"), "%S%m %c");
}
$invoice->set_values();
$statii = invoice::get_invoice_statii();
foreach ($statii as $s => $label) {
unset($pre, $suf);
// prefix and suffix
$status = $invoice->get_value("invoiceStatus");
if (!$invoice->get_id()) {
$status = "create";
}
if ($s == $status) {
$pre = "<b>";
$suf = "</b>";
}
$TPL["invoice_status_label"] .= $sep . $pre . $label . $suf;
$sep = " | ";
}
# if ($invoice->get_id() && is_dir(ATTACHMENTS_DIR."invoice".DIRECTORY_SEPARATOR.$invoice->get_id())) {
示例2: load_invoice_filter
function load_invoice_filter($_FORM)
{
global $TPL;
// Load up the forms action url
$rtn["url_form_action"] = $_FORM["url_form_action"];
$statii = invoice::get_invoice_statii();
unset($statii["create"]);
$rtn["statusOptions"] = page::select_options($statii, $_FORM["invoiceStatus"]);
$statii_payment = invoice::get_invoice_statii_payment();
$rtn["statusPaymentOptions"] = page::select_options($statii_payment, $_FORM["invoiceStatusPayment"]);
$rtn["status"] = $_FORM["status"];
$rtn["dateOne"] = $_FORM["dateOne"];
$rtn["dateTwo"] = $_FORM["dateTwo"];
$rtn["invoiceID"] = $_FORM["invoiceID"];
$rtn["invoiceName"] = $_FORM["invoiceName"];
$rtn["invoiceNum"] = $_FORM["invoiceNum"];
$rtn["invoiceItemID"] = $_FORM["invoiceItemID"];
$options["clientStatus"] = "Current";
$options["return"] = "dropdown_options";
$ops = client::get_list($options);
$ops = array_kv($ops, "clientID", "clientName");
$rtn["clientOptions"] = page::select_options($ops, $_FORM["clientID"]);
// Get
$rtn["FORM"] = "FORM=" . urlencode(serialize($_FORM));
return $rtn;
}