本文整理汇总了PHP中amount_cell函数的典型用法代码示例。如果您正苦于以下问题:PHP amount_cell函数的具体用法?PHP amount_cell怎么用?PHP amount_cell使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了amount_cell函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render($id, $title)
{
global $path_to_root;
include_once $path_to_root . "/includes/ui.inc";
$today = date2sql(Today());
$sql = "SELECT bank_act, bank_account_name, SUM(amount) balance FROM " . TB_PREF . "bank_trans bt" . " INNER JOIN " . TB_PREF . "bank_accounts ba ON bt.bank_act = ba.id" . " WHERE trans_date < '{$today}'" . " AND inactive <> 1";
if ($this->data_filter != '') {
$sql .= ' AND ' . $this->data_filter;
}
$sql .= " GROUP BY bank_act, bank_account_name" . " ORDER BY bank_account_name";
$result = db_query($sql);
br();
$th = array(_("Account"), _("Balance"));
start_table(TABLESTYLE, "width=98%");
table_header($th);
$k = 0;
//row colour counter
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell($myrow["bank_account_name"]);
amount_cell($myrow['balance']);
end_row();
}
end_table(1);
}
示例2: display_customer_summary
function display_customer_summary($customer_record)
{
global $table_style;
$past1 = get_company_pref('past_due_days');
$past2 = 2 * $past1;
if ($customer_record["dissallow_invoices"] != 0) {
echo "<center><font color=red size=4><b>" . tr("CUSTOMER ACCOUNT IS ON HOLD") . "</font></b></center>";
}
$nowdue = "1-" . $past1 . " " . tr('Days');
$pastdue1 = $past1 + 1 . "-" . $past2 . " " . tr('Days');
$pastdue2 = tr('Over') . " " . $past2 . " " . tr('Days');
start_table("width=80% {$table_style}");
$th = array(tr("Currency"), tr("Terms"), tr("Current"), $nowdue, $pastdue1, $pastdue2, tr("Total Balance"));
table_header($th);
start_row();
label_cell($customer_record["curr_code"]);
label_cell($customer_record["terms"]);
amount_cell($customer_record["Balance"] - $customer_record["Due"]);
amount_cell($customer_record["Due"] - $customer_record["Overdue1"]);
amount_cell($customer_record["Overdue1"] - $customer_record["Overdue2"]);
amount_cell($customer_record["Overdue2"]);
amount_cell($customer_record["Balance"]);
end_row();
end_table();
}
示例3: render
function render($id, $title)
{
global $path_to_root;
include_once $path_to_root . "/includes/ui.inc";
include_once $path_to_root . "/reporting/includes/class.graphic.inc";
if (!defined('FLOAT_COMP_DELTA')) {
define('FLOAT_COMP_DELTA', 0.004);
}
if (!isset($this->top)) {
$this->top = 10;
}
$begin = begin_fiscalyear();
$today = Today();
$begin1 = date2sql($begin);
$today1 = date2sql($today);
$sql = "SELECT SUM((trans.ov_amount + trans.ov_discount) * rate) AS total, s.supplier_id, s.supp_name FROM\n " . TB_PREF . "supp_trans AS trans, " . TB_PREF . "suppliers AS s WHERE trans.supplier_id=s.supplier_id\n AND (trans.type = " . ST_SUPPINVOICE . " OR trans.type = " . ST_SUPPCREDIT . ")\n AND tran_date >= '{$begin1}' AND tran_date <= '{$today1}' ";
if ($this->data_filter != '') {
$sql .= ' AND ' . $this->data_filter;
}
$sql .= "GROUP by s.supplier_id ORDER BY total DESC, s.supplier_id " . " LIMIT " . $this->top;
$result = db_query($sql);
if ($this->graph_type == 'Table') {
$th = array(_("Supplier"), _("Amount"));
start_table(TABLESTYLE, "width=98%");
table_header($th);
$k = 0;
//row colour counter
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
$name = $myrow["supplier_id"] . " " . $myrow["supp_name"];
label_cell($name);
amount_cell($myrow['total']);
end_row();
}
end_table(1);
} else {
$pg = new graph();
$i = 0;
while ($myrow = db_fetch($result)) {
$name = $myrow["supplier_id"] . " " . $myrow["supp_name"];
$pg->x[$i] = $name;
$pg->y[$i] = $myrow['total'];
$i++;
}
$pg->title = $title;
$pg->axis_x = _("Supplier");
$pg->axis_y = _("Amount");
$pg->graphic_1 = $today;
$pg->type = 2;
$pg->skin = 1;
$pg->built_in = false;
$filename = company_path() . "/pdf_files/" . uniqid("") . ".png";
$pg->display($filename, true);
echo "<img src='{$filename}' border='0' alt='{$title}' style='max-width:100%'>";
}
}
示例4: render
function render($id, $title)
{
global $path_to_root;
include_once $path_to_root . "/reporting/includes/class.graphic.inc";
if (!defined('FLOAT_COMP_DELTA')) {
define('FLOAT_COMP_DELTA', 0.004);
}
if (!isset($this->top)) {
$this->top = 10;
}
$begin = begin_fiscalyear();
$today = Today();
$begin1 = date2sql($begin);
$today1 = date2sql($today);
$sql = "SELECT SUM((ov_amount + ov_discount) * rate * IF(trans.type = " . ST_CUSTCREDIT . ", -1, 1)) AS total,d.debtor_no, d.name" . " FROM " . TB_PREF . "debtor_trans AS trans, " . TB_PREF . "debtors_master AS d" . " WHERE trans.debtor_no=d.debtor_no" . " AND (trans.type = " . ST_SALESINVOICE . " OR trans.type = " . ST_CUSTCREDIT . ")" . " AND tran_date >= '{$begin1}' AND tran_date <= '{$today1}'";
if ($this->data_filter != '') {
$sql .= ' AND ' . $this->data_filter;
}
$sql .= " GROUP by d.debtor_no ORDER BY total DESC, d.debtor_no " . " LIMIT " . $this->top;
$result = db_query($sql);
if ($this->graph_type == 'Table') {
$th = array(null, _("Customer"), _("Amount"));
start_table(TABLESTYLE, "width=98%");
table_header($th);
$k = 0;
//row colour counter
$i = 0;
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell(viewer_link($myrow["debtor_no"], 'sales/inquiry/customer_inquiry.php?customer_id=' . $myrow["debtor_no"]));
label_cell(viewer_link($myrow["name"], 'sales/inquiry/customer_inquiry.php?customer_id=' . $myrow["debtor_no"]));
amount_cell($myrow['total']);
end_row();
}
end_table(1);
} else {
$pg = new graph();
$i = 0;
while ($myrow = db_fetch($result)) {
$pg->x[$i] = $myrow["debtor_no"] . " " . $myrow["name"];
$pg->y[$i] = $myrow['total'];
$i++;
}
$pg->title = $title;
$pg->axis_x = _("Customer");
$pg->axis_y = _("Amount");
$pg->graphic_1 = $today;
$pg->type = 2;
$pg->skin = 1;
$pg->built_in = false;
$filename = company_path() . "/pdf_files/" . uniqid("") . ".png";
$pg->display($filename, true);
echo "<img src='{$filename}' border='0' alt='{$title}' style='max-width:100%'>";
}
}
示例5: render
function render($id, $title)
{
global $path_to_root;
if (!isset($this->top)) {
$this->top = 10;
}
global $path_to_root;
$pg = new graph();
$begin = begin_fiscalyear();
$today = Today();
$begin1 = date2sql($begin);
$today1 = date2sql($today);
$sql = "SELECT SUM(-t.amount) AS total, d.reference, d.name FROM\n " . TB_PREF . "gl_trans AS t," . TB_PREF . "dimensions AS d WHERE\n (t.dimension_id = d.id OR t.dimension2_id = d.id) AND\n t.tran_date >= '{$begin1}' AND t.tran_date <= '{$today1}' ";
if ($this->data_filter != '') {
$sql .= ' AND ' . $this->data_filter;
}
$sql .= "GROUP BY d.id ORDER BY total DESC LIMIT " . $this->top;
$result = db_query($sql, "Transactions could not be calculated");
if ($this->graph_type == 'Table') {
$title = _("Top 10 Dimensions in fiscal year");
br(2);
display_heading($title);
br();
$th = array(_("Dimension"), _("Amount"));
start_table(TABLESTYLE, "width=98%");
table_header($th);
$k = 0;
//row colour counter
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell($myrow['reference'] . " " . $myrow["name"]);
amount_cell($myrow['total']);
end_row();
}
end_table(2);
} else {
$pg = new graph();
$i = 0;
while ($myrow = db_fetch($result)) {
$pg->x[$i] = $myrow['reference'] . " " . $myrow["name"];
$pg->y[$i] = abs($myrow['total']);
$i++;
}
$pg->title = $title;
$pg->axis_x = _("Dimension");
$pg->axis_y = _("Amount");
$pg->graphic_1 = $today;
$pg->type = 5;
$pg->skin = 1;
$pg->built_in = false;
$filename = company_path() . "/pdf_files/" . uniqid("") . ".png";
$pg->display($filename, true);
echo "<img src='{$filename}' border='0' alt='{$title}' style='max-width:100%'>";
}
}
示例6: display_po_receive_items
function display_po_receive_items()
{
div_start('grn_items');
start_table(TABLESTYLE, "colspan=7 width='90%'");
$th = array(_("Item Code"), _("Description"), _("Ordered"), _("Units"), _("Received"), _("Outstanding"), _("This Delivery"), _("Price"), _("Total"));
table_header($th);
/*show the line items on the order with the quantity being received for modification */
$total = 0;
$k = 0;
//row colour counter
if (count($_SESSION['PO']->line_items) > 0) {
foreach ($_SESSION['PO']->line_items as $ln_itm) {
alt_table_row_color($k);
$qty_outstanding = $ln_itm->quantity - $ln_itm->qty_received;
if (!isset($_POST['Update']) && !isset($_POST['ProcessGoodsReceived']) && $ln_itm->receive_qty == 0) {
//If no quantites yet input default the balance to be received
$ln_itm->receive_qty = $qty_outstanding;
}
$line_total = $ln_itm->receive_qty * $ln_itm->price;
$total += $line_total;
label_cell($ln_itm->stock_id);
if ($qty_outstanding > 0) {
text_cells(null, $ln_itm->stock_id . "Desc", $ln_itm->item_description, 30, 50);
} else {
label_cell($ln_itm->item_description);
}
$dec = get_qty_dec($ln_itm->stock_id);
qty_cell($ln_itm->quantity, false, $dec);
label_cell($ln_itm->units);
qty_cell($ln_itm->qty_received, false, $dec);
qty_cell($qty_outstanding, false, $dec);
if ($qty_outstanding > 0) {
qty_cells(null, $ln_itm->line_no, number_format2($ln_itm->receive_qty, $dec), "align=right", null, $dec);
} else {
label_cell(number_format2($ln_itm->receive_qty, $dec), "align=right");
}
amount_decimal_cell($ln_itm->price);
amount_cell($line_total);
end_row();
}
}
$colspan = count($th) - 1;
$display_sub_total = price_format($total);
label_row(_("Sub-total"), $display_sub_total, "colspan={$colspan} align=right", "align=right");
$taxes = $_SESSION['PO']->get_taxes(input_num('freight_cost'), true);
$tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['PO']->tax_included);
$display_total = price_format($total + input_num('freight_cost') + $tax_total);
start_row();
label_cells(_("Amount Total"), $display_total, "colspan={$colspan} align='right'", "align='right'");
end_row();
end_table();
div_end();
}
示例7: display_po_receive_items
function display_po_receive_items()
{
global $table_style;
start_table("colspan=7 {$table_style} width=90%");
$th = array(tr("Item Code"), tr("Description"), tr("Ordered"), tr("Units"), tr("Received"), tr("Outstanding"), tr("This Delivery"), tr("Price"), tr("Total"));
table_header($th);
/*show the line items on the order with the quantity being received for modification */
$total = 0;
$k = 0;
//row colour counter
if (count($_SESSION['PO']->line_items) > 0) {
foreach ($_SESSION['PO']->line_items as $ln_itm) {
alt_table_row_color($k);
$qty_outstanding = $ln_itm->quantity - $ln_itm->qty_received;
if ($ln_itm->receive_qty == 0) {
//If no quantites yet input default the balance to be received
$ln_itm->receive_qty = $qty_outstanding;
}
$line_total = $ln_itm->receive_qty * $ln_itm->price;
$total += $line_total;
label_cell($ln_itm->stock_id);
if ($qty_outstanding > 0) {
text_cells(null, $ln_itm->stock_id . "Desc", $ln_itm->item_description, 30, 50);
} else {
label_cell($ln_itm->item_description);
}
qty_cell($ln_itm->quantity);
label_cell($ln_itm->units);
qty_cell($ln_itm->qty_received);
qty_cell($qty_outstanding);
if ($qty_outstanding > 0) {
qty_cells(null, $ln_itm->line_no, qty_format($ln_itm->receive_qty), "align=right");
} else {
qty_cells(null, $ln_itm->line_no, qty_format($ln_itm->receive_qty), "align=right", "disabled");
}
amount_cell($ln_itm->price);
amount_cell($line_total);
end_row();
}
}
$display_total = number_format2($total, user_price_dec());
label_row(tr("Total value of items received"), $display_total, "colspan=8 align=right", "nowrap align=right");
end_table();
}
示例8: display_supplier_summary
function display_supplier_summary($supplier_record)
{
$past1 = get_company_pref('past_due_days');
$past2 = 2 * $past1;
$nowdue = "1-" . $past1 . " " . _('Days');
$pastdue1 = $past1 + 1 . "-" . $past2 . " " . _('Days');
$pastdue2 = _('Over') . " " . $past2 . " " . _('Days');
start_table(TABLESTYLE, "width='80%'");
$th = array(_("Currency"), _("Terms"), _("Current"), $nowdue, $pastdue1, $pastdue2, _("Total Balance"));
table_header($th);
start_row();
label_cell($supplier_record["curr_code"]);
label_cell($supplier_record["terms"]);
amount_cell($supplier_record["Balance"] - $supplier_record["Due"]);
amount_cell($supplier_record["Due"] - $supplier_record["Overdue1"]);
amount_cell($supplier_record["Overdue1"] - $supplier_record["Overdue2"]);
amount_cell($supplier_record["Overdue2"]);
amount_cell($supplier_record["Balance"]);
end_row();
end_table(1);
}
示例9: render
function render($id, $title)
{
global $path_to_root;
include_once $path_to_root . "/includes/ui.inc";
if (!defined('FLOAT_COMP_DELTA')) {
define('FLOAT_COMP_DELTA', 0.004);
}
$today = date2sql(Today());
$sql = "SELECT trans.trans_no, trans.reference, trans.tran_date, trans.due_date, debtor.debtor_no,\n debtor.name, branch.br_name, debtor.curr_code,\n (trans.ov_amount + trans.ov_gst + trans.ov_freight\n + trans.ov_freight_tax + trans.ov_discount) AS total,\n (trans.ov_amount + trans.ov_gst + trans.ov_freight\n + trans.ov_freight_tax + trans.ov_discount - trans.alloc) AS remainder,\n DATEDIFF('{$today}', trans.due_date) AS days\n FROM " . TB_PREF . "debtor_trans as trans, " . TB_PREF . "debtors_master as debtor,\n " . TB_PREF . "cust_branch as branch\n WHERE debtor.debtor_no = trans.debtor_no AND trans.branch_code = branch.branch_code\n AND trans.type = " . ST_SALESINVOICE . " AND (trans.ov_amount + trans.ov_gst + trans.ov_freight\n + trans.ov_freight_tax + trans.ov_discount - trans.alloc) > " . FLOAT_COMP_DELTA . "\n AND DATEDIFF('{$today}', trans.due_date) > 0 ORDER BY days DESC";
if ($this->data_filter != '') {
$sql .= ' AND ' . $this->data_filter;
}
$result = db_query($sql);
$title = db_num_rows($result) . _(" Overdue Sales Invoices");
br(1);
display_heading($title);
br();
$th = array("#", _("Date"), _("Due Date"), _("Customer"), _("Currency"), _("Total"), _("Remainder"), _("Days"));
start_table(TABLESTYLE, "width=98%");
table_header($th);
$k = 0;
//row colour counter
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell(get_trans_view_str(ST_SALESINVOICE, $myrow["trans_no"]));
label_cell(sql2date($myrow['tran_date']));
label_cell(sql2date($myrow['due_date']));
$name = $myrow["debtor_no"] . " " . $myrow["name"];
label_cell($name);
label_cell($myrow['curr_code']);
amount_cell($myrow['total']);
amount_cell($myrow['remainder']);
label_cell($myrow['days'], "align='right'");
end_row();
}
end_table(1);
}
示例10: end_table
end_table(1);
//-----------------------------------------------------------------------------------
echo "<hr/>\n";
$result = get_all_requisition_details(get_post('requisitionid'));
start_form();
start_table(TABLESTYLE, "width=50%");
$th = array(_("Item Code"), _("Item Name"), _("Purpose"), _("Qrder Quantity"), _("Estimate Price"), "", "");
table_header($th);
$k = 0;
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell($myrow["item_code"]);
label_cell($myrow["description"]);
label_cell($myrow["purpose"]);
label_cell($myrow["order_quantity"]);
amount_cell($myrow["estimate_price"]);
edit_button_cell("Edit" . $myrow['requisition_detail_id'], _("Edit"));
delete_button_cell("Delete" . $myrow['requisition_detail_id'], _("Delete"));
end_row();
}
end_table(1);
//-----------------------------------------------------------------------------------
start_table(TABLESTYLE2);
if ($selected_id != -1) {
if ($Mode == 'Edit') {
//editing an existing status code
$myrow = get_requisition_detail($selected_id);
$_POST['item_code'] = $myrow["item_code"];
$_POST['purpose'] = $myrow["purpose"];
$_POST['order_quantity'] = $myrow["order_quantity"];
$_POST['estimate_price'] = $myrow["estimate_price"];
示例11: edit_allocations_for_transaction
function edit_allocations_for_transaction($type, $trans_no)
{
global $table_style;
start_form(false, true);
display_heading(sprintf(tr("Allocation of %s # %d"), systypes::name($_SESSION['alloc']->type), $_SESSION['alloc']->trans_no));
display_heading($_SESSION['alloc']->person_name);
display_heading2(tr("Date:") . " <b>" . $_SESSION['alloc']->date_ . "</b>");
display_heading2(tr("Total:") . " <b>" . price_format($_SESSION['alloc']->amount) . "</b>");
echo "<br>";
if (count($_SESSION['alloc']->allocs) > 0) {
start_table($table_style);
$th = array(tr("Transaction Type"), tr("#"), tr("Date"), tr("Due Date"), tr("Amount"), tr("Other Allocations"), tr("This Allocation"), tr("Left to Allocate"), "", "");
table_header($th);
$k = $counter = $total_allocated = 0;
foreach ($_SESSION['alloc']->allocs as $allocn_item) {
alt_table_row_color($k);
label_cell(systypes::name($allocn_item->type));
label_cell(get_trans_view_str($allocn_item->type, $allocn_item->type_no));
label_cell($allocn_item->date_, "align=right");
label_cell($allocn_item->due_date, "align=right");
amount_cell($allocn_item->amount);
amount_cell($allocn_item->amount_allocated);
if (!check_num('amount' . $counter)) {
$_POST['amount' . $counter] = price_format($allocn_item->current_allocated);
}
amount_cells(null, 'amount' . $counter, $_POST['amount' . $counter]);
$un_allocated = round($allocn_item->amount - $allocn_item->amount_allocated, 6);
hidden("un_allocated" . $counter, $un_allocated);
amount_cell($un_allocated);
label_cell("<a href='#' name=Alloc{$counter} onclick='allocate_all(this.name.substr(5));return true;'>" . tr("All") . "</a>");
label_cell("<a href='#' name=DeAll{$counter} onclick='allocate_none(this.name.substr(5));return true;'>" . tr("None") . "</a>");
end_row();
$total_allocated += input_num('amount' . $counter);
$counter++;
}
label_row(tr("Total Allocated"), price_format($total_allocated), "colspan=6 align=right", "nowrap align=right id='total_allocated'");
if ($_SESSION['alloc']->amount - $total_allocated < 0) {
$font1 = "<font color=red>";
$font2 = "</font>";
} else {
$font1 = $font2 = "";
}
$left_to_allocate = $_SESSION['alloc']->amount - $total_allocated;
$left_to_allocate = price_format($left_to_allocate);
label_row(tr("Left to Allocate"), $font1 . $left_to_allocate . $font2, "colspan=6 align=right ", "nowrap align=right id='left_to_allocate'");
end_table(1);
hidden('TotalNumberOfAllocs', $counter);
// hidden('left_to_allocate', $left_to_allocate);
submit_center_first('UpdateDisplay', tr("Update"));
submit('Process', tr("Process"));
} else {
display_note(tr("There are no unsettled transactions to allocate."), 0, 1);
}
submit_center_last('Cancel', tr("Back to Allocations"));
end_form();
}
示例12: alt_table_row_color
alt_table_row_color($k);
label_cell(get_trans_view_str(ST_SUPPRECEIVE, $myrow["id"]));
label_cell($myrow["reference"]);
label_cell(sql2date($myrow["delivery_date"]));
end_row();
}
end_table();
}
$invoice_result = get_po_invoices_credits($_GET['trans_no']);
$k = 0;
if (db_num_rows($invoice_result) > 0) {
echo "</td><td valign=top>";
// outer table
display_heading2(_("Invoices/Credits"));
start_table(TABLESTYLE);
$th = array(_("#"), _("Date"), _("Total"));
table_header($th);
while ($myrow = db_fetch($invoice_result)) {
alt_table_row_color($k);
label_cell(get_trans_view_str($myrow["type"], $myrow["trans_no"]));
label_cell(sql2date($myrow["tran_date"]));
amount_cell($myrow["Total"]);
end_row();
}
end_table();
}
echo "</td></tr>";
end_table(1);
// outer table
//----------------------------------------------------------------------------------------------------
end_page(true, false, false, ST_PURCHORDER, $_GET['trans_no']);
示例13: div_start
}
}
echo "<hr>";
div_start('summary');
start_table(TABLESTYLE);
$th = array(_("Reconcile Date"), _("Beginning<br>Balance"), _("Ending<br>Balance"), _("Account<br>Total"), _("Reconciled<br>Amount"), _("Difference"));
table_header($th);
start_row();
date_cells("", "reconcile_date", _('Date of bank statement to reconcile'), get_post('bank_date') == '', 0, 0, 0, null, true);
amount_cells_ex("", "beg_balance", 15);
amount_cells_ex("", "end_balance", 15);
$reconciled = input_num('reconciled');
$difference = input_num("end_balance") - input_num("beg_balance") - $reconciled;
amount_cell($total);
amount_cell($reconciled, false, '', "reconciled");
amount_cell($difference, false, '', "difference");
end_row();
end_table();
div_end();
echo "<hr>";
//------------------------------------------------------------------------------------------------
if (!isset($_POST['bank_account'])) {
$_POST['bank_account'] = "";
}
$sql = get_sql_for_bank_account_reconcile($_POST['bank_account'], get_post('reconcile_date'));
$act = get_bank_account($_POST["bank_account"]);
display_heading($act['bank_account_name'] . " - " . $act['bank_curr_code']);
$cols = array(_("Type") => array('fun' => 'systype_name', 'ord' => ''), _("#") => array('fun' => 'trans_view', 'ord' => ''), _("Reference"), _("Date") => 'date', _("Debit") => array('align' => 'right', 'fun' => 'fmt_debit'), _("Credit") => array('align' => 'right', 'insert' => true, 'fun' => 'fmt_credit'), _("Person/Item") => array('fun' => 'fmt_person'), array('insert' => true, 'fun' => 'gl_view'), "X" => array('insert' => true, 'fun' => 'rec_checkbox'));
$table =& new_db_pager('trans_tbl', $sql, $cols);
$table->width = "80%";
display_db_pager($table);
示例14: start_row
// check if it's an overdue work order
if (date_diff(Today(), sql2date($myrow["due_date"]), "d") > 0) {
$row_text = "class='overduebg'";
}
start_row($row_text);
$mpage = $path_to_root . "/dimensions/dimension_entry.php?" . SID . "trans_no=" . $myrow["id"];
label_cell(get_dimensions_trans_view_str(systypes::dimension(), $myrow["id"]));
label_cell(get_dimensions_trans_view_str(systypes::dimension(), $myrow["id"], $myrow["reference"]));
label_cell($myrow["name"]);
label_cell($myrow["type_"]);
label_cell(sql2date($myrow["date_"]));
label_cell(sql2date($myrow["due_date"]));
if (!$outstanding_only) {
label_cell($myrow["closed"] ? tr("Yes") : tr("No"));
}
amount_cell($row[0]);
if ($myrow["closed"] == 0) {
label_cell("<a href='{$mpage}'>" . tr("Edit") . "</a>");
}
end_row();
$j++;
if ($j == 12) {
$j = 1;
table_header($th);
}
//end of page full new headings if
}
//end of while loop
end_table(1);
//---------------------------------------------------------------------------------
end_page();
示例15: render
function render($id, $title)
{
global $path_to_root, $systypes_array;
include_once $path_to_root . "/includes/ui.inc";
$start_date = add_days(Today(), -$this->days_past);
$end_date = add_days(Today(), $this->days_future);
$result = get_bank_trans_for_bank_account($this->bank_act, $start_date, $end_date);
start_table(TABLESTYLE, 'width=98%');
$th = array(_("#"), _("Date"), _("Receipt"), _("Payment"), _("Balance"), _("Person/Item"), _("Memo"), "");
table_header($th);
$bfw = get_balance_before_for_bank_account($this->bank_act, $start_date);
$credit = $debit = 0;
start_row("class='inquirybg' style='font-weight:bold'");
label_cell(_("Opening Balance") . " - " . $start_date, "colspan=4");
display_debit_or_credit_cells($bfw);
label_cell("");
label_cell("", "colspan=2");
end_row();
$running_total = $bfw;
if ($bfw > 0) {
$debit += $bfw;
} else {
$credit += $bfw;
}
$j = 1;
$k = 0;
//row colour counter
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
$running_total += $myrow["amount"];
label_cell(get_trans_view_str($myrow["type"], $myrow["trans_no"]));
$trandate = sql2date($myrow["trans_date"]);
label_cell($trandate);
display_debit_or_credit_cells($myrow["amount"]);
amount_cell($running_total);
label_cell(payment_person_name($myrow["person_type_id"], $myrow["person_id"]));
label_cell(get_comments_string($myrow["type"], $myrow["trans_no"]));
label_cell(get_gl_view_str($myrow["type"], $myrow["trans_no"]));
end_row();
if ($myrow["amount"] > 0) {
$debit += $myrow["amount"];
} else {
$credit += $myrow["amount"];
}
if ($j == 12) {
$j = 1;
table_header($th);
}
$j++;
}
//end of while loop
start_row("class='inquirybg' style='font-weight:bold'");
label_cell(_("Ending Balance") . " - " . $end_date, "colspan=4");
amount_cell($debit + $credit);
label_cell("");
label_cell("", "colspan=2");
end_row();
end_table(2);
}