本文整理汇总了PHP中label_row函数的典型用法代码示例。如果您正苦于以下问题:PHP label_row函数的具体用法?PHP label_row怎么用?PHP label_row使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了label_row函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render($id, $title)
{
global $path_to_root;
include_once $path_to_root . "/reporting/includes/class.graphic.inc";
$begin = begin_fiscalyear();
$today = Today();
$begin1 = date2sql($begin);
$today1 = date2sql($today);
$sql = "SELECT SUM(amount) AS total, c.class_name, c.ctype FROM\n " . TB_PREF . "gl_trans," . TB_PREF . "chart_master AS a, " . TB_PREF . "chart_types AS t,\n " . TB_PREF . "chart_class AS c WHERE\n account = a.account_code AND a.account_type = t.id AND t.class_id = c.cid\n AND IF(c.ctype > 3, tran_date >= '{$begin1}', tran_date >= '0000-00-00')\n AND tran_date <= '{$today1}' ";
if ($this->data_filter != '') {
$sql .= ' AND ' . $this->data_filter;
}
$sql .= " GROUP BY c.cid ORDER BY c.cid";
$result = db_query($sql, "Transactions could not be calculated");
$calculated = _("Calculated Return");
if ($this->graph_type == 'Table') {
start_table(TABLESTYLE2, "width=98%");
$total = 0;
while ($myrow = db_fetch($result)) {
if ($myrow['ctype'] > 3) {
$total += $myrow['total'];
$myrow['total'] = -$myrow['total'];
}
label_row($myrow['class_name'], number_format2($myrow['total'], user_price_dec()), "class='label' style='font-weight:bold;'", "style='font-weight:bold;' align=right");
}
label_row(" ", "");
label_row($calculated, number_format2(-$total, user_price_dec()), "class='label' style='font-weight:bold;'", "style='font-weight:bold;' align=right");
end_table(1);
} else {
$pg = new graph();
$i = 0;
$total = 0;
while ($myrow = db_fetch($result)) {
if ($myrow['ctype'] > 3) {
$total += $myrow['total'];
$myrow['total'] = -$myrow['total'];
$pg->x[$i] = $myrow['class_name'];
$pg->y[$i] = abs($myrow['total']);
$i++;
}
}
$pg->x[$i] = $calculated;
$pg->y[$i] = -$total;
$pg->title = $title;
$pg->axis_x = _("Class");
$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%'>";
}
}
示例2: 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();
}
示例3: 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();
}
示例4: voiding_controls
function voiding_controls()
{
global $selected_id;
$not_implemented = array(ST_PURCHORDER, ST_SALESORDER, ST_SALESQUOTE, ST_COSTUPDATE);
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
systypes_list_cells(_("Type:"), 'filterType', null, true, $not_implemented);
if (list_updated('filterType')) {
$selected_id = -1;
}
if (!isset($_POST['FromTransNo'])) {
$_POST['FromTransNo'] = "1";
}
if (!isset($_POST['ToTransNo'])) {
$_POST['ToTransNo'] = "999999";
}
ref_cells(_("from #:"), 'FromTransNo');
ref_cells(_("to #:"), 'ToTransNo');
submit_cells('ProcessSearch', _("Search"), '', '', 'default');
end_row();
end_table(1);
$trans_ref = false;
$sql = get_sql_for_view_transactions($_POST['filterType'], $_POST['FromTransNo'], $_POST['ToTransNo'], $trans_ref);
if ($sql == "") {
return;
}
$cols = array(_("#") => array('insert' => true, 'fun' => 'view_link'), _("Reference") => array('fun' => 'ref_view'), _("Date") => array('type' => 'date', 'fun' => 'date_view'), _("GL") => array('insert' => true, 'fun' => 'gl_view'), _("Select") => array('insert' => true, 'fun' => 'select_link'));
$table =& new_db_pager('transactions', $sql, $cols);
$table->width = "40%";
display_db_pager($table);
start_table(TABLESTYLE2);
if ($selected_id != -1) {
hidden('trans_no', $selected_id);
hidden('selected_id', $selected_id);
} else {
hidden('trans_no', '');
$_POST['memo_'] = '';
}
label_row(_("Transaction #:"), $selected_id == -1 ? '' : $selected_id);
date_row(_("Voiding Date:"), 'date_');
textarea_row(_("Memo:"), 'memo_', null, 30, 4);
end_table(1);
if (!isset($_POST['ProcessVoiding'])) {
submit_center('ProcessVoiding', _("Void Transaction"), true, '', 'default');
} else {
if (!exist_transaction($_POST['filterType'], $_POST['trans_no'])) {
display_error(_("The entered transaction does not exist or cannot be voided."));
unset($_POST['trans_no']);
unset($_POST['memo_']);
unset($_POST['date_']);
submit_center('ProcessVoiding', _("Void Transaction"), true, '', 'default');
} else {
display_warning(_("Are you sure you want to void this transaction ? This action cannot be undone."), 0, 1);
br();
submit_center_first('ConfirmVoiding', _("Proceed"), '', true);
submit_center_last('CancelVoiding', _("Cancel"), '', 'cancel');
}
}
end_form();
}
示例5: customer_settings
function customer_settings($selected_id)
{
global $SysPrefs, $path_to_root, $auto_create_branch;
if (!$selected_id) {
if (list_updated('customer_id') || !isset($_POST['CustName'])) {
$_POST['CustName'] = $_POST['cust_ref'] = $_POST['address'] = $_POST['tax_id'] = '';
$_POST['dimension_id'] = 0;
$_POST['dimension2_id'] = 0;
$_POST['sales_type'] = -1;
$_POST['curr_code'] = get_company_currency();
$_POST['credit_status'] = -1;
$_POST['payment_terms'] = $_POST['notes'] = '';
$_POST['discount'] = $_POST['pymt_discount'] = percent_format(0);
$_POST['credit_limit'] = price_format($SysPrefs->default_credit_limit());
}
} else {
$myrow = get_customer($selected_id);
$_POST['CustName'] = $myrow["name"];
$_POST['cust_ref'] = $myrow["debtor_ref"];
$_POST['address'] = $myrow["address"];
$_POST['tax_id'] = $myrow["tax_id"];
$_POST['dimension_id'] = $myrow["dimension_id"];
$_POST['dimension2_id'] = $myrow["dimension2_id"];
$_POST['sales_type'] = $myrow["sales_type"];
$_POST['curr_code'] = $myrow["curr_code"];
$_POST['credit_status'] = $myrow["credit_status"];
$_POST['payment_terms'] = $myrow["payment_terms"];
$_POST['discount'] = percent_format($myrow["discount"] * 100);
$_POST['pymt_discount'] = percent_format($myrow["pymt_discount"] * 100);
$_POST['credit_limit'] = price_format($myrow["credit_limit"]);
$_POST['notes'] = $myrow["notes"];
$_POST['inactive'] = $myrow["inactive"];
}
start_outer_table(TABLESTYLE2);
table_section(1);
table_section_title(_("Name and Address"));
text_row(_("Customer Name:"), 'CustName', $_POST['CustName'], 40, 80);
text_row(_("Customer Short Name:"), 'cust_ref', null, 30, 30);
textarea_row(_("Address:"), 'address', $_POST['address'], 35, 5);
text_row(_("GSTNo:"), 'tax_id', null, 40, 40);
if (!$selected_id || is_new_customer($selected_id)) {
currencies_list_row(_("Customer's Currency:"), 'curr_code', $_POST['curr_code']);
} else {
label_row(_("Customer's Currency:"), $_POST['curr_code']);
hidden('curr_code', $_POST['curr_code']);
}
sales_types_list_row(_("Sales Type/Price List:"), 'sales_type', $_POST['sales_type']);
if ($selected_id) {
record_status_list_row(_("Customer status:"), 'inactive');
} elseif (isset($auto_create_branch) && $auto_create_branch == 1) {
table_section_title(_("Branch"));
text_row(_("Phone:"), 'phone', null, 32, 30);
text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30);
text_row(_("Fax Number:"), 'fax', null, 32, 30);
email_row(_("E-mail:"), 'email', null, 35, 55);
sales_persons_list_row(_("Sales Person:"), 'salesman', null);
}
table_section(2);
table_section_title(_("Sales"));
percent_row(_("Discount Percent:"), 'discount', $_POST['discount']);
percent_row(_("Prompt Payment Discount Percent:"), 'pymt_discount', $_POST['pymt_discount']);
amount_row(_("Credit Limit:"), 'credit_limit', $_POST['credit_limit']);
payment_terms_list_row(_("Payment Terms:"), 'payment_terms', $_POST['payment_terms']);
credit_status_list_row(_("Credit Status:"), 'credit_status', $_POST['credit_status']);
$dim = get_company_pref('use_dimension');
if ($dim >= 1) {
dimensions_list_row(_("Dimension") . " 1:", 'dimension_id', $_POST['dimension_id'], true, " ", false, 1);
}
if ($dim > 1) {
dimensions_list_row(_("Dimension") . " 2:", 'dimension2_id', $_POST['dimension2_id'], true, " ", false, 2);
}
if ($dim < 1) {
hidden('dimension_id', 0);
}
if ($dim < 2) {
hidden('dimension2_id', 0);
}
if ($selected_id) {
start_row();
echo '<td class="label">' . _('Customer branches') . ':</td>';
hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php", '<b>' . (@$_REQUEST['popup'] ? _("Select or &Add") : _("&Add or Edit ")) . '</b>', "debtor_no=" . $selected_id . (@$_REQUEST['popup'] ? '&popup=1' : ''));
end_row();
}
textarea_row(_("General Notes:"), 'notes', null, 35, 5);
if (!$selected_id && isset($auto_create_branch) && $auto_create_branch == 1) {
table_section_title(_("Branch"));
locations_list_row(_("Default Inventory Location:"), 'location');
shippers_list_row(_("Default Shipping Company:"), 'ship_via');
sales_areas_list_row(_("Sales Area:"), 'area', null);
tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null);
}
end_outer_table(1);
div_start('controls');
if (!$selected_id) {
submit_center('submit', _("Add New Customer"), true, '', 'default');
} else {
submit_center_first('submit', _("Update Customer"), _('Update customer data'), @$_REQUEST['popup'] ? true : 'default');
submit_return('select', $selected_id, _("Select this customer and return to document entry."));
submit_center_last('delete', _("Delete Customer"), _('Delete customer data if have been never used'), true);
}
//.........这里部分代码省略.........
示例6: array
$th = array(_("ID"), _("Group Name"), "", "");
inactive_control_column($th);
table_header($th);
$k = 0;
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell($myrow["id"]);
label_cell($myrow["description"]);
inactive_control_cell($myrow["id"], $myrow["inactive"], 'groups', 'id');
edit_button_cell("Edit" . $myrow["id"], _("Edit"));
delete_button_cell("Delete" . $myrow["id"], _("Delete"));
end_row();
}
inactive_control_row($th);
end_table(1);
//-------------------------------------------------------------------------------------------------
start_table(TABLESTYLE2);
if ($selected_id != -1) {
if ($Mode == 'Edit') {
//editing an existing group
$myrow = get_sales_group($selected_id);
$_POST['description'] = $myrow["description"];
}
hidden("selected_id", $selected_id);
label_row(_("ID"), $myrow["id"]);
}
text_row_ex(_("Group Name:"), 'description', 30);
end_table(1);
submit_add_or_update_center($selected_id == -1, '', 'both');
end_form();
end_page();
示例7: read_supp_invoice
read_supp_invoice($trans_no, ST_SUPPCREDIT, $supp_trans);
display_heading("<font color=red>" . _("SUPPLIER CREDIT NOTE") . " # " . $trans_no . "</font>");
echo "<br>";
start_table(TABLESTYLE, "width=95%");
start_row();
label_cells(_("Supplier"), $supp_trans->supplier_name, "class='tableheader2'");
label_cells(_("Reference"), $supp_trans->reference, "class='tableheader2'");
label_cells(_("Supplier's Reference"), $supp_trans->supp_reference, "class='tableheader2'");
end_row();
start_row();
label_cells(_("Invoice Date"), $supp_trans->tran_date, "class='tableheader2'");
label_cells(_("Due Date"), $supp_trans->due_date, "class='tableheader2'");
label_cells(_("Currency"), get_supplier_currency($supp_trans->supplier_id), "class='tableheader2'");
end_row();
comments_display_row(ST_SUPPCREDIT, $trans_no);
end_table(1);
$total_gl = display_gl_items($supp_trans, 3);
$total_grn = display_grn_items($supp_trans, 2);
$display_sub_tot = number_format2($total_gl + $total_grn, user_price_dec());
start_table(TABLESTYLE, "width=95%");
label_row(_("Sub Total"), $display_sub_tot, "align=right", "nowrap align=right width=17%");
$tax_items = get_trans_tax_details(ST_SUPPCREDIT, $trans_no);
display_supp_trans_tax_details($tax_items, 1);
$display_total = number_format2(-($supp_trans->ov_amount + $supp_trans->ov_gst), user_price_dec());
label_row("<font color=red>" . _("TOTAL CREDIT NOTE") . "</font", "<font color=red>{$display_total}</font>", "colspan=1 align=right", "nowrap align=right");
end_table(1);
$voided = is_voided_display(ST_SUPPCREDIT, $trans_no, _("This credit note has been voided."));
if (!$voided) {
display_allocations_from(PT_SUPPLIER, $supp_trans->supplier_id, ST_SUPPCREDIT, $trans_no, -($supp_trans->ov_amount + $supp_trans->ov_gst));
}
end_page(true, false, false, ST_SUPPCREDIT, $trans_no);
示例8: amount_cell
amount_cell($line_total);
end_row();
}
$_POST['ChargeFreightCost'] = get_post('ChargeFreightCost', price_format($_SESSION['Items']->freight_cost));
$colspan = 9;
start_row();
label_cell(_("Shipping Cost"), "colspan={$colspan} align=right");
small_amount_cells(null, 'ChargeFreightCost', $_SESSION['Items']->freight_cost);
end_row();
$inv_items_total = $_SESSION['Items']->get_items_total_dispatch();
$display_sub_total = price_format($inv_items_total + input_num('ChargeFreightCost'));
label_row(_("Sub-total"), $display_sub_total, "colspan={$colspan} align=right", "align=right");
$taxes = $_SESSION['Items']->get_taxes(input_num('ChargeFreightCost'));
$tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['Items']->tax_included);
$display_total = price_format($inv_items_total + input_num('ChargeFreightCost') + $tax_total);
label_row(_("Amount Total"), $display_total, "colspan={$colspan} align=right", "align=right");
end_table(1);
if ($has_marked) {
display_note(_("Marked items have insufficient quantities in stock as on day of delivery."), 0, 1, "class='stockmankofg'");
}
start_table(TABLESTYLE2);
policy_list_row(_("Action For Balance"), "bo_policy", null);
textarea_row(_("Memo"), 'Comments', null, 50, 4);
end_table(1);
div_end();
submit_center_first('Update', _("Update"), _('Refresh document page'), true);
if (isset($_POST['clear_quantity'])) {
submit('reset_quantity', _('Reset quantity'), true, _('Refresh document page'));
} else {
submit('clear_quantity', _('Clear quantity'), true, _('Refresh document page'));
}
示例9: foreach
foreach ($db_connections as $id => $conn) {
$conn['dbuser'] = $_POST['user'];
$conn['dbpassword'] = $_POST['passwd'];
if (!($db = db_open($conn))) {
display_error("Wrong user name or password - " . mysql_error());
} else {
if (!db_import($_FILES['uploadfile']['tmp_name'], $conn)) {
display_error("Bad SQL file or you have already updated the company: " . $id . " " . $conn['name'] . " - " . mysql_error());
} else {
display_notification("Database has been updated for company: " . $id . " " . $conn['name']);
}
}
}
}
}
}
if (!isset($_POST['passwd'])) {
$_POST['passwd'] = "";
}
echo "<form enctype='multipart/form-data' method='post' action='" . $_SERVER['PHP_SELF'] . "'>\n";
echo "<table align='center' width='50%' cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'>\n";
text_row_ex("Database User", "user", 20);
label_row("Password", "<input name='passwd' type='password' value='" . $_POST['passwd'] . "' />");
label_row("Upload Script", "<input name='uploadfile' type='file'>");
submit_row("submit", "Update");
echo "</table>\n";
echo "<br><br>";
echo "<center><span>Choose from Database update scripts in SQL folder. No Datase is updated without a script.</span></center>\n";
echo "<br>";
echo "</form>\n";
echo "</body></html>\n";
示例10: purch_order
$purchase_order = new purch_order();
read_grn($_GET["trans_no"], $purchase_order);
display_heading(tr("Purchase Order Delivery") . " #" . $_GET['trans_no']);
echo "<BR>";
display_grn_summary($purchase_order);
display_heading2(tr("Line Details"));
start_table("colspan=9 {$table_style} width=90%");
$th = array(tr("Item Code"), tr("Item Description"), tr("Delivery Date"), tr("Quantity"), tr("Unit"), tr("Price"), tr("Line Total"), tr("Quantity Invoiced"));
table_header($th);
$total = 0;
$k = 0;
//row colour counter
foreach ($purchase_order->line_items as $stock_item) {
$line_total = $stock_item->qty_received * $stock_item->price;
alt_table_row_color($k);
label_cell($stock_item->stock_id);
label_cell($stock_item->item_description);
label_cell($stock_item->req_del_date, "nowrap align=right");
qty_cell($stock_item->qty_received);
label_cell($stock_item->units);
amount_cell($stock_item->price);
amount_cell($line_total);
qty_cell($stock_item->qty_inv);
end_row();
$total += $line_total;
}
$display_total = number_format2($total, user_price_dec());
label_row(tr("Total Excluding Tax/Shipping"), $display_total, "colspan=6", "nowrap align=right");
end_table(1);
is_voided_display(25, $_GET['trans_no'], tr("This delivery has been voided."));
end_page(true);
示例11: date_row
date_row(_("Date of Deposit:"), 'DateBanked', '', true, 0, 0, 0, null, true);
$comp_currency = get_company_currency();
$cust_currency = get_customer_currency($_POST['customer_id']);
$bank_currency = get_bank_account_currency($_POST['bank_account']);
if ($cust_currency != $bank_currency) {
exchange_rate_display($bank_currency, $cust_currency, $_POST['DateBanked'], $bank_currency == $comp_currency);
}
amount_row(_("Bank Charge:"), 'charge');
end_outer_table(1);
if ($cust_currency == $bank_currency) {
div_start('alloc_tbl');
show_allocatable(false);
div_end();
}
start_table(TABLESTYLE, "width=60%");
label_row(_("Customer prompt payment discount :"), $display_discount_percent);
amount_row(_("Amount of Discount:"), 'discount');
amount_row(_("Amount:"), 'amount');
textarea_row(_("Memo:"), 'memo_', null, 22, 4);
end_table(1);
if ($cust_currency != $bank_currency) {
display_note(_("Amount and discount are in customer's currency."));
}
br();
if ($new) {
submit_center('AddPaymentItem', _("Update Payment"), true, '', 'default');
} else {
submit_center('AddPaymentItem', _("Add Payment"), true, '', 'default');
}
br();
end_form();
示例12: get_item_location
if ($selected_id != -1) {
//editing an existing Location
if ($Mode == 'Edit') {
$myrow = get_item_location($selected_id);
$_POST['loc_code'] = $myrow["loc_code"];
$_POST['location_name'] = $myrow["location_name"];
$_POST['delivery_address'] = $myrow["delivery_address"];
$_POST['contact'] = $myrow["contact"];
$_POST['phone'] = $myrow["phone"];
$_POST['phone2'] = $myrow["phone2"];
$_POST['fax'] = $myrow["fax"];
$_POST['email'] = $myrow["email"];
}
hidden("selected_id", $selected_id);
hidden("loc_code");
label_row(_("Location Code:"), $_POST['loc_code']);
} else {
//end of if $selected_id only do the else when a new record is being entered
text_row(_("Location Code:"), 'loc_code', null, 5, 5);
}
text_row_ex(_("Location Name:"), 'location_name', 50, 50);
text_row_ex(_("Contact for deliveries:"), 'contact', 30, 30);
textarea_row(_("Address:"), 'delivery_address', null, 35, 5);
text_row_ex(_("Telephone No:"), 'phone', 32, 30);
text_row_ex(_("Secondary Phone Number:"), 'phone2', 32, 30);
text_row_ex(_("Facsimile No:"), 'fax', 32, 30);
email_row_ex(_("E-mail:"), 'email', 30);
end_table(1);
submit_add_or_update_center($selected_id == -1, '', 'both');
end_form();
end_page();
示例13: get_user
$myrow = get_user($selected_id);
$_POST['id'] = $myrow["id"];
$_POST['user_id'] = $myrow["user_id"];
$_POST['real_name'] = $myrow["real_name"];
$_POST['phone'] = $myrow["phone"];
$_POST['email'] = $myrow["email"];
$_POST['role_id'] = $myrow["role_id"];
$_POST['language'] = $myrow["language"];
$_POST['print_profile'] = $myrow["print_profile"];
$_POST['rep_popup'] = $myrow["rep_popup"];
$_POST['pos'] = $myrow["pos"];
}
hidden('selected_id', $selected_id);
hidden('user_id');
start_row();
label_row(_("User login:"), $_POST['user_id']);
} else {
//end of if $selected_id only do the else when a new record is being entered
text_row(_("User Login:"), "user_id", null, 22, 20);
$_POST['language'] = user_language();
$_POST['print_profile'] = user_print_profile();
$_POST['rep_popup'] = user_rep_popup();
$_POST['pos'] = user_pos();
}
$_POST['password'] = "";
password_row(_("Password:"), 'password', $_POST['password']);
if ($selected_id != -1) {
table_section_title(_("Enter a new password to change, leave empty to keep current."));
}
text_row_ex(_("Full Name") . ":", 'real_name', 50);
text_row_ex(_("Telephone No.:"), 'phone', 30);
示例14: display_item_form
function display_item_form()
{
global $table_style2;
start_table($table_style2, 5, 7);
echo "<tr><td valign=top>";
// outer table
echo "<table>";
if (!isset($_POST['customer_id'])) {
$_POST['customer_id'] = get_global_customer(false);
}
if (!isset($_POST['DateBanked'])) {
$_POST['DateBanked'] = Today();
if (!is_date_in_fiscalyear($_POST['DateBanked'])) {
$_POST['DateBanked'] = end_fiscalyear();
}
}
customer_list_row(tr("From Customer:"), 'customer_id', null, false, true);
if (db_customer_has_branches($_POST['customer_id'])) {
customer_branches_list_row(tr("Branch:"), $_POST['customer_id'], 'BranchID', null, false, true, true);
} else {
hidden('BranchID', reserved_words::get_any_numeric());
}
read_customer_data();
set_global_customer($_POST['customer_id']);
if (isset($_POST['HoldAccount']) && $_POST['HoldAccount'] != 0) {
echo "</table></table>";
display_note(tr("This customer account is on hold."), 0, 0, "class='redfb'");
} else {
$display_discount_percent = percent_format($_POST['pymt_discount'] * 100) . "%";
amount_row(tr("Amount:"), 'amount');
amount_row(tr("Amount of Discount:"), 'discount');
label_row(tr("Customer prompt payment discount :"), $display_discount_percent);
date_row(tr("Date of Deposit:"), 'DateBanked');
echo "</table>";
echo "</td><td valign=top class='tableseparator'>";
// outer table
echo "<table>";
bank_accounts_list_row(tr("Into Bank Account:"), 'bank_account', null, true);
$cust_currency = get_customer_currency($_POST['customer_id']);
$bank_currency = get_bank_account_currency($_POST['bank_account']);
if ($cust_currency != $bank_currency) {
exchange_rate_display($cust_currency, $bank_currency, $_POST['DateBanked']);
}
bank_trans_types_list_row(tr("Type:"), 'ReceiptType', null);
text_row(tr("Reference:"), 'ref', null, 20, 40);
textarea_row(tr("Memo:"), 'memo_', null, 22, 4);
echo "</table>";
echo "</td></tr>";
end_table();
// outer table
if ($cust_currency != $bank_currency) {
display_note(tr("Amount and discount are in customer's currency."));
}
echo "<br>";
submit_center('AddPaymentItem', tr("Add Payment"));
}
echo "<br>";
}
示例15: price_format
$_POST['ChargeFreightCost'] = price_format(0);
}
}
$accumulate_shipping = get_company_pref('accumulate_shipping');
if ($is_batch_invoice && $accumulate_shipping) {
set_delivery_shipping_sum(array_keys($_SESSION['Items']->src_docs));
}
$colspan = 9;
start_row();
label_cell(_("Shipping Cost"), "colspan={$colspan} align=right");
small_amount_cells(null, 'ChargeFreightCost', null);
if ($is_batch_invoice) {
label_cell('', 'colspan=2');
}
end_row();
$inv_items_total = $_SESSION['Items']->get_items_total_dispatch();
$display_sub_total = price_format($inv_items_total + input_num('ChargeFreightCost'));
label_row(_("Sub-total"), $display_sub_total, "colspan={$colspan} align=right", "align=right", $is_batch_invoice ? 2 : 0);
$taxes = $_SESSION['Items']->get_taxes(input_num('ChargeFreightCost'));
$tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['Items']->tax_included, $is_batch_invoice ? 2 : 0);
$display_total = price_format($inv_items_total + input_num('ChargeFreightCost') + $tax_total);
label_row(_("Invoice Total"), $display_total, "colspan={$colspan} align=right", "align=right", $is_batch_invoice ? 2 : 0);
end_table(1);
div_end();
start_table(TABLESTYLE2);
textarea_row(_("Memo"), 'Comments', null, 50, 4);
end_table(1);
submit_center_first('Update', _("Update"), _('Refresh document page'), true);
submit_center_last('process_invoice', _("Process Invoice"), _('Check entered data and save document'), 'default');
end_form();
end_page();