本文整理汇总了PHP中invoice::get_value方法的典型用法代码示例。如果您正苦于以下问题:PHP invoice::get_value方法的具体用法?PHP invoice::get_value怎么用?PHP invoice::get_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类invoice
的用法示例。
在下文中一共展示了invoice::get_value方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: invoice
function get_all_parties($invoiceID)
{
if ($invoiceID) {
$invoice = new invoice();
$invoice->set_id($invoiceID);
$invoice->select();
$interestedPartyOptions = $invoice->get_all_partieS($invoice->get_value("projectID"), $invoice->get_value("clientID"));
}
if (is_object($this) && $this->get_id()) {
$interestedPartyOptions = interestedParty::get_interested_parties("invoiceRepeat", $this->get_id(), $interestedPartyOptions);
}
return $interestedPartyOptions;
}
示例2: invoice
function save_invoice_timeSheet($invoiceID, $timeSheetID)
{
global $TPL;
$invoice = new invoice($invoiceID);
if ($invoice->get_value("invoiceStatus") != "finished") {
$timeSheet = new timeSheet();
$timeSheet->set_id($timeSheetID);
$timeSheet->select();
$timeSheet->load_pay_info();
$project = $timeSheet->get_foreign_object("project");
$date = $timeSheet->get_value("dateFrom") or $date = date("Y-m-d");
// customerBilledDollars will not be set if the actual field is blank,
// and thus there won't be a usable total_customerBilledDollars.
if (isset($timeSheet->pay_info["customerBilledDollars"])) {
$amount = $timeSheet->pay_info["total_customerBilledDollars"];
$iiUnitPrice = $timeSheet->pay_info["customerBilledDollars"];
$iiQuantity = $timeSheet->pay_info["total_duration"];
} else {
$amount = $timeSheet->pay_info["total_dollars"];
$iiUnitPrice = $amount;
$iiQuantity = 1;
}
$q = prepare("SELECT * FROM invoiceItem WHERE invoiceID = %d AND timeSheetID = %d AND timeSheetItemID IS NULL\n ", $invoiceID, $timeSheetID);
$db = new db_alloc();
$db->query($q);
$row = $db->row();
$ii = new invoiceItem();
if ($row) {
$ii->set_id($row["invoiceItemID"]);
}
$ii->set_value("invoiceID", $invoiceID);
$ii->set_value("timeSheetID", $timeSheet->get_id());
$ii->set_value("iiMemo", "Time Sheet #" . $timeSheet->get_id() . " for " . person::get_fullname($timeSheet->get_value("personID")) . ", Project: " . $project->get_value("projectName"));
$ii->set_value("iiQuantity", $iiQuantity);
$ii->set_value("iiUnitPrice", $iiUnitPrice);
$ii->set_value("iiAmount", $amount);
$ii->set_value("iiDate", $date);
$ii->set_value("iiTax", config::get_config_item("taxPercent"));
$ii->currency = $timeSheet->get_value("currencyTypeID");
$ii->save();
} else {
alloc_error("Unable to update related Invoice (ID:" . $invoiceID . ").");
}
}
示例3: prepare
function get_amount_allocated($fmt = "%s%mo")
{
// Return total amount used and total amount allocated
if (is_object($this) && $this->get_id()) {
$db = new db_alloc();
// Get most recent invoiceItem that this time sheet belongs to.
$q = prepare("SELECT invoiceID\n FROM invoiceItem\n WHERE invoiceItem.timeSheetID = %d\n ORDER BY invoiceItem.iiDate DESC\n LIMIT 1\n ", $this->get_id());
$db->query($q);
$row = $db->row();
$invoiceID = $row["invoiceID"];
if ($invoiceID) {
$invoice = new invoice();
$invoice->set_id($invoiceID);
$invoice->select();
$maxAmount = page::money($invoice->get_value("currencyTypeID"), $invoice->get_value("maxAmount"), $fmt);
// Loop through all the other invoice items on that invoice
$q = prepare("SELECT sum(iiAmount) AS totalUsed FROM invoiceItem WHERE invoiceID = %d", $invoiceID);
$db->query($q);
$row2 = $db->row();
return array(page::money($invoice->get_value("currencyTypeID"), $row2["totalUsed"], $fmt), $maxAmount);
}
}
}
示例4: prepare
if (is_object($invoice) && $invoice->get_id()) {
$q = prepare("SELECT * FROM invoiceRepeat WHERE invoiceID = %d LIMIT 1", $invoice->get_id());
$qid1 = $db->query($q);
if ($db->row($qid1)) {
$invoiceRepeat->read_db_record($db);
$invoiceRepeat->set_values("invoiceRepeat_");
foreach (explode(" ", $TPL["invoiceRepeat_frequency"]) as $id) {
if ($id) {
$qid2 = $db->query("SELECT * FROM invoice WHERE invoiceRepeatID = %d AND invoiceRepeatDate = '%s'", $invoiceRepeat->get_id(), $id);
if ($idrow = $db->row($qid2)) {
$links[] = "<a href='" . $TPL["url_alloc_invoice"] . "invoiceID=" . $idrow["invoiceID"] . "'>" . $id . "</a>";
} else {
$links[] = $id;
}
}
}
$TPL["message_help_no_esc"][] = "This invoice is also a template for the scheduled creation of new invoices on the following dates:\n <br>" . implode(" ", (array) $links) . "\n <br>Click the Repeating Invoice link for more information.";
}
if ($invoice->get_value("invoiceRepeatID")) {
$ir = new invoiceRepeat();
$ir->set_id($invoice->get_value("invoiceRepeatID"));
$ir->select();
$i = new invoice();
$i->set_id($ir->get_value("invoiceID"));
$i->select();
$TPL["message_help_no_esc"][] = "This invoice was automatically generated by the\n <a href='" . $TPL["url_alloc_invoice"] . "invoiceID=" . $ir->get_value("invoiceID") . "'>\n repeating invoice " . $i->get_value("invoiceNum") . "</a>";
}
}
$TPL["invoice"] = $invoice;
$TPL["invoiceRepeat"] = $invoiceRepeat;
include_template("templates/invoiceM.tpl");
示例5: prepare
$i->set_value("invoiceRepeatDate", $row["invoiceDate"]);
$i->set_value("invoiceNum", invoice::get_next_invoiceNum());
$i->set_value("clientID", $invoice->get_value("clientID"));
$i->set_value("projectID", $invoice->get_value("projectID"));
$i->set_value("invoiceName", $invoice->get_value("invoiceName"));
$i->set_value("invoiceStatus", "edit");
$i->set_value("invoiceDateTo", $row["invoiceDate"]);
$i->set_value("currencyTypeID", $invoice->get_value("currencyTypeID"));
$i->set_value("maxAmount", $invoice->get_value("maxAmount"));
$i->save();
#echo "<br>Created invoice: ".$i->get_id();
$q = prepare("SELECT * FROM invoiceItem WHERE invoiceID = %d", $invoice->get_id());
$id2 = $db->query($q);
while ($item = $db->row($id2)) {
$ii = new invoiceItem();
$ii->currency = $i->get_value("currencyTypeID");
$ii->set_value("invoiceID", $i->get_id());
$ii->set_value("iiMemo", $item["iiMemo"]);
$ii->set_value("iiUnitPrice", page::money($ii->currency, $item["iiUnitPrice"], "%mo"));
$ii->set_value("iiAmount", page::money($ii->currency, $item["iiAmount"], "%mo"));
$ii->set_value("iiQuantity", $item["iiQuantity"]);
$ii->save();
#echo "<br>Created invoice item: ".$ii->get_id();
}
if ($row["message"]) {
$ips = interestedParty::get_interested_parties("invoiceRepeat", $row["invoiceRepeatID"]);
$recipients = array();
foreach ($ips as $email => $info) {
$recipients[$email] = $info;
$recipients[$email]["addIP"] = true;
}