本文整理汇总了PHP中label_cell函数的典型用法代码示例。如果您正苦于以下问题:PHP label_cell函数的具体用法?PHP label_cell怎么用?PHP label_cell使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了label_cell函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_wo_issue_details
function display_wo_issue_details($issue_no)
{
$result = get_work_order_issue_details($issue_no);
if (db_num_rows($result) == 0) {
display_note(_("There are no items for this issue."));
} else {
start_table(TABLESTYLE);
$th = array(_("Component"), _("Quantity"), _("Units"));
table_header($th);
$j = 1;
$k = 0;
//row colour counter
$total_cost = 0;
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell($myrow["stock_id"] . " - " . $myrow["description"]);
qty_cell($myrow["qty_issued"], false, get_qty_dec($myrow["stock_id"]));
label_cell($myrow["units"]);
end_row();
$j++;
if ($j == 12) {
$j = 1;
table_header($th);
}
//end of page full new headings if
}
//end of while
end_table();
}
}
示例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";
$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);
}
示例4: display_trial_balance
function display_trial_balance()
{
global $table_style, $path_to_root;
start_table($table_style);
$tableheader = "<tr>\n <td rowspan=2 class='tableheader'>" . tr("Account") . "</td>\n <td rowspan=2 class='tableheader'>" . tr("Account Name") . "</td>\n\t\t<td colspan=2 class='tableheader'>" . tr("Brought Forward") . "</td>\n\t\t<td colspan=2 class='tableheader'>" . tr("This Period") . "</td>\n\t\t<td colspan=2 class='tableheader'>" . tr("Balance") . "</td>\n\t\t</tr><tr>\n\t\t<td class='tableheader'>" . tr("Debit") . "</td>\n <td class='tableheader'>" . tr("Credit") . "</td>\n\t\t<td class='tableheader'>" . tr("Debit") . "</td>\n\t\t<td class='tableheader'>" . tr("Credit") . "</td>\n <td class='tableheader'>" . tr("Debit") . "</td>\n <td class='tableheader'>" . tr("Credit") . "</td>\n </tr>";
echo $tableheader;
$k = 0;
$accounts = get_gl_accounts();
while ($account = db_fetch($accounts)) {
if (is_account_balancesheet($account["account_code"])) {
$begin = null;
} else {
$begin = begin_fiscalyear();
if ($_POST['TransFromDate'] < $begin) {
$begin = $_POST['TransFromDate'];
}
$begin = add_days($begin, -1);
}
$prev_balance = get_balance($account["account_code"], $begin, $_POST['TransFromDate'], false, false);
$curr_balance = get_balance($account["account_code"], $_POST['TransFromDate'], $_POST['TransToDate']);
if (check_value("NoZero") && !$prev_balance && !$curr_balance) {
continue;
}
alt_table_row_color($k);
$url = "<a href='{$path_to_root}/gl/inquiry/gl_account_inquiry.php?" . SID . "TransFromDate=" . $_POST["TransFromDate"] . "&TransToDate=" . $_POST["TransToDate"] . "&account=" . $account["account_code"] . "'>" . $account["account_code"] . "</a>";
label_cell($url);
label_cell($account["account_name"]);
display_debit_or_credit_cells($prev_balance);
display_debit_or_credit_cells($curr_balance);
display_debit_or_credit_cells($prev_balance + $curr_balance);
end_row();
}
end_table(1);
}
示例5: 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%'>";
}
}
示例6: 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%'>";
}
}
示例7: 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%'>";
}
}
示例8: 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();
}
示例9: display_gl_heading
function display_gl_heading($myrow)
{
global $table_style;
$trans_name = systypes::name($_GET['type_id']);
start_table("{$table_style} width=95%");
$th = array(tr("General Ledger Transaction Details"), tr("Date"), tr("Person/Item"));
table_header($th);
start_row();
label_cell("{$trans_name} #" . $_GET['trans_no']);
label_cell(sql2date($myrow["tran_date"]));
label_cell(payment_person_types::person_name($myrow["person_type_id"], $myrow["person_id"]));
end_row();
comments_display_row($_GET['type_id'], $_GET['trans_no']);
end_table(1);
}
示例10: display_gl_heading
function display_gl_heading($myrow)
{
global $systypes_array;
$trans_name = $systypes_array[$_GET['type_id']];
start_table(TABLESTYLE, "width='95%'");
$th = array(_("General Ledger Transaction Details"), _("Reference"), _("Date"), _("Person/Item"));
table_header($th);
start_row();
label_cell("{$trans_name} #" . $_GET['trans_no']);
label_cell($myrow["reference"]);
label_cell(sql2date($myrow["tran_date"]));
label_cell(payment_person_name($myrow["person_type_id"], $myrow["person_id"]));
end_row();
comments_display_row($_GET['type_id'], $_GET['trans_no']);
end_table(1);
}
示例11: 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();
}
示例12: display_wo_production
function display_wo_production($prod_id)
{
global $table_style;
$myrow = get_work_order_produce($prod_id);
start_table($table_style);
$th = array(tr("Production #"), tr("Reference"), tr("For Work Order #"), tr("Item"), tr("Quantity Manufactured"), tr("Date"));
table_header($th);
start_row();
label_cell($myrow["id"]);
label_cell($myrow["reference"]);
label_cell(get_trans_view_str(systypes::work_order(), $myrow["workorder_id"]));
label_cell($myrow["stock_id"] . " - " . $myrow["StockDescription"]);
qty_cell($myrow["quantity"]);
label_cell(sql2date($myrow["date_"]));
end_row();
comments_display_row(29, $prod_id);
end_table(1);
is_voided_display(29, $prod_id, tr("This production has been voided."));
}
示例13: display_gl_heading
function display_gl_heading($myrow)
{
global $systypes_array;
$title = "";
//moodlearning
if ($myrow['type'] == 55 || $myrow['type'] == 1) {
if ($myrow['type'] == 0) {
$title = "JV No.";
$num = substr($ser['year'], 2);
}
if ($myrow['type'] == 55) {
$voucher_type = "Check Voucher";
$title = "CV No.";
$myDateTime = DateTime::createFromFormat('Y-m-d', $myrow['tran_date']);
$newDateString = $myDateTime->format('d-m-Y');
$year = substr($newDateString, 8) . "-";
}
}
$trans_name = $systypes_array[$_GET['type_id']];
start_table(TABLESTYLE, "width=95%");
if ($myrow['type'] == 0 || $myrow['type'] == 1 || $myrow['type'] == 55) {
$th = array(_("General Ledger Transaction Details"), _("Reference"), _("Date"), _("Person/Item"), $title);
} else {
$th = array(_("General Ledger Transaction Details"), _("Reference"), _("Date"), _("Person/Item"));
}
table_header($th);
start_row();
if ($custom == 0) {
label_cell("{$trans_name} #" . $_GET['type_id']);
} else {
label_cell("{$trans_name} #" . get_customized_no($myrow['type'], $myrow['type_no']));
}
label_cell($myrow["reference"]);
label_cell(sql2date($myrow["tran_date"]));
label_cell(payment_person_name($myrow["person_type_id"], $myrow["person_id"]));
if ($myrow['type'] == 0 || $myrow['type'] == 1 || $myrow['type'] == 55) {
label_cell($year . str_pad(get_customized_no($myrow['type'], $myrow['type_no']), 4, 0, STR_PAD_LEFT));
}
//moodlearning
end_row();
comments_display_row($_GET['type_id'], $_GET['trans_no']);
end_table(1);
}
示例14: display_wo_production
function display_wo_production($prod_id)
{
$myrow = get_work_order_produce($prod_id);
br(1);
start_table(TABLESTYLE);
$th = array(_("Production #"), _("Reference"), _("For Work Order #"), _("Item"), _("Quantity Manufactured"), _("Date"));
table_header($th);
start_row();
label_cell($myrow["id"]);
label_cell($myrow["reference"]);
label_cell(get_trans_view_str(ST_WORKORDER, $myrow["workorder_id"]));
label_cell($myrow["stock_id"] . " - " . $myrow["StockDescription"]);
qty_cell($myrow["quantity"], false, get_qty_dec($myrow["stock_id"]));
label_cell(sql2date($myrow["date_"]));
end_row();
comments_display_row(ST_MANURECEIVE, $prod_id);
end_table(1);
is_voided_display(ST_MANURECEIVE, $prod_id, _("This production has been voided."));
}
示例15: 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);
}