本文整理汇总了PHP中div_end函数的典型用法代码示例。如果您正苦于以下问题:PHP div_end函数的具体用法?PHP div_end怎么用?PHP div_end使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了div_end函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit_allocations_for_transaction
function edit_allocations_for_transaction($type, $trans_no)
{
global $systypes_array;
$cart = $_SESSION['alloc'];
display_heading(sprintf(_("Allocation of %s # %d"), $systypes_array[$cart->type], $cart->trans_no));
display_heading($cart->person_name);
display_heading2(_("Date:") . " <b>" . $cart->date_ . "</b>");
display_heading2(_("Total:") . " <b>" . price_format($cart->bank_amount) . ' ' . $cart->currency . "</b>");
if ($cart->currency != $cart->person_curr) {
$total = _("Total in clearing currency:") . " <b>" . price_format($cart->amount) . "</b>" . sprintf(" %s (%s %s/%s)", $cart->person_curr, exrate_format($cart->bank_amount / $cart->amount), $cart->currency, $cart->person_curr);
display_heading2($total);
}
echo "<br>";
start_form();
div_start('alloc_tbl');
if (count($cart->allocs) > 0) {
show_allocatable(true);
submit_center_first('UpdateDisplay', _("Refresh"), _('Start again allocation of selected amount'), true);
submit('Process', _("Process"), true, _('Process allocations'), 'default');
submit_center_last('Cancel', _("Back to Allocations"), _('Abandon allocations and return to selection of allocatable amounts'), 'cancel');
} else {
display_note(_("There are no unsettled transactions to allocate."), 0, 1);
submit_center('Cancel', _("Back to Allocations"), true, _('Abandon allocations and return to selection of allocatable amounts'), 'cancel');
}
div_end();
end_form();
}
示例2: show
public function show()
{
$list_div = array('id' => $this->name . '_div', 'class' => 'list');
$list = array('id' => $this->name . '_list', 'class' => 'list');
echo div_start($list_div);
echo table($this->items, $list);
echo div_end();
}
示例3: edit_allocations_for_transaction
function edit_allocations_for_transaction($type, $trans_no)
{
global $systypes_array;
start_form();
display_heading(_("Allocation of") . " " . $systypes_array[$_SESSION['alloc']->type] . " # " . $_SESSION['alloc']->trans_no);
display_heading($_SESSION['alloc']->person_name);
display_heading2(_("Date:") . " <b>" . $_SESSION['alloc']->date_ . "</b>");
display_heading2(_("Total:") . " <b>" . price_format(-$_SESSION['alloc']->amount) . "</b>");
echo "<br>";
div_start('alloc_tbl');
if (count($_SESSION['alloc']->allocs) > 0) {
show_allocatable(true);
submit_center_first('UpdateDisplay', _("Refresh"), _('Start again allocation of selected amount'), true);
submit('Process', _("Process"), true, _('Process allocations'), 'default');
submit_center_last('Cancel', _("Back to Allocations"), _('Abandon allocations and return to selection of allocatable amounts'), 'cancel');
} else {
display_note(_("There are no unsettled transactions to allocate."), 0, 1);
submit_center('Cancel', _("Back to Allocations"), true, _('Abandon allocations and return to selection of allocatable amounts'), 'cancel');
}
div_end();
end_form();
}
示例4: display_kit_items
function display_kit_items($selected_kit)
{
$result = get_item_kit($selected_kit);
div_start('bom');
start_table(TABLESTYLE, "width='60%'");
$th = array(_("Stock Item"), _("Description"), _("Quantity"), _("Units"), '', '');
table_header($th);
$k = 0;
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell($myrow["stock_id"]);
label_cell($myrow["comp_name"]);
qty_cell($myrow["quantity"], false, $myrow["units"] == '' ? 0 : get_qty_dec($myrow["comp_name"]));
label_cell($myrow["units"] == '' ? _('kit') : $myrow["units"]);
edit_button_cell("Edit" . $myrow['id'], _("Edit"));
delete_button_cell("Delete" . $myrow['id'], _("Delete"));
end_row();
}
//END WHILE LIST LOOP
end_table();
div_end();
}
示例5: display_bom_items
function display_bom_items($selected_parent)
{
$result = get_bom($selected_parent);
div_start('bom');
start_table(TABLESTYLE, "width=60%");
$th = array(_("Code"), _("Description"), _("Location"), _("Work Centre"), _("Quantity"), _("Units"), '', '');
table_header($th);
$k = 0;
while ($myrow = db_fetch($result)) {
alt_table_row_color($k);
label_cell($myrow["component"]);
label_cell($myrow["description"]);
label_cell($myrow["location_name"]);
label_cell($myrow["WorkCentreDescription"]);
qty_cell($myrow["quantity"], false, get_qty_dec($myrow["component"]));
label_cell($myrow["units"]);
edit_button_cell("Edit" . $myrow['id'], _("Edit"));
delete_button_cell("Delete" . $myrow['id'], _("Delete"));
end_row();
}
//END WHILE LIST LOOP
end_table();
div_end();
}
示例6: customer_settings
//.........这里部分代码省略.........
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);
}
div_end();
}
示例7: show_results
function show_results()
{
global $path_to_root;
/*Now get the transactions */
div_start('trans_tbl');
start_table(TABLESTYLE);
$netAmounts = check_value('NetAmounts');
if ($netAmounts) {
$net = _("Net");
} else {
$net = _("Gross");
}
$th = array(_("Type"), _("Description"), _("Tax") . "<br>" . _("Amount"), $net . "<br>" . _("Outputs") . "/" . _("Inputs"));
table_header($th);
$k = 0;
$total = 0;
$bdate = date2sql($_POST['TransFromDate']);
$edate = date2sql($_POST['TransToDate']);
$taxes = get_tax_cash_summary($_POST['TransFromDate'], $_POST['TransToDate']);
while ($tx = db_fetch($taxes)) {
$payable = $tx['payable'];
$collectible = $tx['collectible'];
$net = $collectible + $payable;
$total += $net;
alt_table_row_color($k);
label_cell($tx['name'] . " " . $tx['rate'] . "%");
label_cell(_("Charged on sales") . " (" . _("Output Tax") . "):");
amount_cell($payable);
if ($netAmounts) {
amount_cell($tx['net_output']);
} else {
amount_cell($tx['gross_output']);
}
end_row();
alt_table_row_color($k);
label_cell($tx['name'] . " " . $tx['rate'] . "%");
label_cell(_("Paid on purchases") . " (" . _("Input Tax") . "):");
amount_cell($collectible);
if ($netAmounts) {
amount_cell($tx['net_input']);
} else {
amount_cell($tx['gross_input']);
}
end_row();
alt_table_row_color($k);
label_cell("<b>" . $tx['name'] . " " . $tx['rate'] . "%</b>");
label_cell("<b>" . _("Net payable or collectible") . ":</b>");
amount_cell($net, true);
label_cell("");
end_row();
}
alt_table_row_color($k);
label_cell("");
label_cell("<b>" . _("Total payable or refund") . ":</b>");
amount_cell($total, true);
label_cell("");
end_row();
end_table(2);
div_end();
}
示例8: display_profit_and_loss
function display_profit_and_loss()
{
global $path_to_root, $sel;
if (!isset($_POST['Dimension'])) {
$_POST['Dimension'] = 0;
}
if (!isset($_POST['Dimension2'])) {
$_POST['Dimension2'] = 0;
}
$dimension = $_POST['Dimension'];
$dimension2 = $_POST['Dimension2'];
$from = $_POST['TransFromDate'];
$to = $_POST['TransToDate'];
$compare = $_POST['Compare'];
if (isset($_POST["AccGrp"]) && strlen($_POST['AccGrp']) > 0) {
$drilldown = 1;
} else {
$drilldown = 0;
}
// Root level
$dec = 0;
$pdec = user_percent_dec();
if ($compare == 0 || $compare == 2) {
$end = $to;
if ($compare == 2) {
$begin = $from;
} else {
$begin = begin_fiscalyear();
}
} elseif ($compare == 1) {
$begin = add_months($from, -12);
$end = add_months($to, -12);
}
div_start('pl_tbl');
start_table(TABLESTYLE, "width=50%");
$tableheader = "<tr>\n <td class='tableheader'>" . _("Group/Account Name") . "</td>\n <td class='tableheader'>" . _("Period") . "</td>\n\t\t<td class='tableheader'>" . $sel[$compare] . "</td>\n\t\t<td class='tableheader'>" . _("Achieved %") . "</td>\n </tr>";
if (!$drilldown) {
$parent = -1;
$classper = 0.0;
$classacc = 0.0;
$salesper = 0.0;
$salesacc = 0.0;
//Get classes for PL
$classresult = get_account_classes(false, 0);
while ($class = db_fetch($classresult)) {
$class_per_total = 0;
$class_acc_total = 0;
$convert = get_class_type_convert($class["ctype"]);
//Print Class Name
table_section_title($class["class_name"], 4);
echo $tableheader;
//Get Account groups/types under this group/type
$typeresult = get_account_types(false, $class['cid'], -1);
while ($accounttype = db_fetch($typeresult)) {
$TypeTotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, $compare, $convert, $dec, $pdec, $rep, $dimension, $dimension2, $drilldown, $path_to_root);
$class_per_total += $TypeTotal[0];
$class_acc_total += $TypeTotal[1];
if ($TypeTotal[0] != 0 || $TypeTotal[1] != 0) {
$url = "<a href='{$path_to_root}/gl/inquiry/profit_loss.php?TransFromDate=" . $from . "&TransToDate=" . $to . "&Compare=" . $compare . "&Dimension=" . $dimension . "&Dimension2=" . $dimension2 . "&AccGrp=" . $accounttype['id'] . "'>" . $accounttype['id'] . " " . $accounttype['name'] . "</a>";
alt_table_row_color($k);
label_cell($url);
amount_cell($TypeTotal[0] * $convert);
amount_cell($TypeTotal[1] * $convert);
amount_cell(Achieve($TypeTotal[0], $TypeTotal[1]));
end_row();
}
}
//Print Class Summary
start_row("class='inquirybg' style='font-weight:bold'");
label_cell(_('Total') . " " . $class["class_name"]);
amount_cell($class_per_total * $convert);
amount_cell($class_acc_total * $convert);
amount_cell(Achieve($class_per_total, $class_acc_total));
end_row();
$salesper += $class_per_total;
$salesacc += $class_acc_total;
}
start_row("class='inquirybg' style='font-weight:bold'");
label_cell(_('Calculated Return'));
amount_cell($salesper * -1);
amount_cell($salesacc * -1);
amount_cell(achieve($salesper, $salesacc));
end_row();
} else {
//Level Pointer : Global variable defined in order to control display of root
global $levelptr;
$levelptr = 0;
$accounttype = get_account_type($_POST["AccGrp"]);
$classid = $accounttype["class_id"];
$class = get_account_class($classid);
$convert = get_class_type_convert($class["ctype"]);
//Print Class Name
table_section_title($_POST["AccGrp"] . " " . get_account_type_name($_POST["AccGrp"]), 4);
echo $tableheader;
$classtotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, $compare, $convert, $dec, $pdec, $rep, $dimension, $dimension2, $drilldown, $path_to_root);
}
end_table(1);
// outer table
div_end();
}
示例9: display_credit_options
function display_credit_options()
{
global $Ajax;
br();
if (isset($_POST['_CreditType_update'])) {
$Ajax->activate('options');
}
div_start('options');
start_table(TABLESTYLE2);
credit_type_list_row(_("Credit Note Type"), 'CreditType', null, true);
if ($_POST['CreditType'] == "Return") {
/*if the credit note is a return of goods then need to know which location to receive them into */
if (!isset($_POST['Location'])) {
$_POST['Location'] = $_SESSION['Items']->Location;
}
locations_list_row(_("Items Returned to Location"), 'Location', $_POST['Location']);
} else {
/* the goods are to be written off to somewhere */
gl_all_accounts_list_row(_("Write off the cost of the items to"), 'WriteOffGLCode', null);
}
textarea_row(_("Memo"), "CreditText", null, 51, 3);
echo "</table>";
div_end();
}
示例10: pager
//.........这里部分代码省略.........
if ($cell == '') {
label_cell('');
} else {
qty_cell($cell, false, isset($col['dec']) ? $col['dec'] : null);
}
break;
case 'email':
email_cell($cell, isset($col['align']) ? "align='" . $col['align'] . "'" : null);
break;
case 'rate':
label_cell(number_format2($cell, user_exrate_dec()), "align=center");
break;
case 'inactive':
if (get_post('show_inactive')) {
$pager->inactive_control_cell($row);
}
break;
default:
// case 'text':
if (isset($col['align'])) {
label_cell($cell, "align='" . $col['align'] . "'");
} else {
label_cell($cell);
}
case 'skip':
// column not displayed
}
}
end_row();
}
// end of while loop
if ($pager->footer_fun) {
// if set footer handler
start_row("class='{$pager->footer_class}'");
$fun = $pager->footer_fun;
if (method_exists($pager, $fun)) {
$h = $pager->{$fun}($pager);
} elseif (function_exists($fun)) {
$h = $fun($pager);
}
foreach ($h as $c) {
// draw footer columns
$pars = isset($c[1]) ? $c[1] : '';
label_cell($c[0], $pars);
}
end_row();
}
start_row("class='navibar'");
$colspan = count($pager->columns);
$inact = @$pager->inactive_ctrl == true ? ' ' . checkbox(null, 'show_inactive', null, true) . _("Show also Inactive") : '';
end_row();
end_table();
$but_pref = $pager->name . '_page_';
// if (@$pager->inactive_ctrl)
// submit('Update', _('Update'), true, '', null); // inactive update
$context = array('first' => $this->pager_button($but_pref . 'first', _('«'), $pager->first_page), 'previous' => $this->pager_button($but_pref . 'prev', _('‹'), $pager->prev_page), 'next' => $this->pager_button($but_pref . 'next', _('›'), $pager->next_page), 'last' => $this->pager_button($but_pref . 'last', _('»'), $pager->last_page));
$from = ($pager->curr_page - 1) * $pager->page_len + 1;
$to = $from + $pager->page_len - 1;
if ($to > $pager->rec_count) {
$to = $pager->rec_count;
}
$all = $pager->rec_count;
// echo sprintf(_('Records %d-%d of %d'), $from, $to, $all);
// echo $inact;
// echo "</td>";
echo ThemeBootstrap::get()->renderBlock('controls.twig.html', 'pager', $context);
/*
if ($pager->rec_count) {
echo "<td colspan=$colspan class='navibar' style='border:none;padding:3px;'>";
echo "<div style='float:right;'>";
$but_pref = $pager->name . '_page_';
start_table();
start_row();
if (@$pager->inactive_ctrl)
submit('Update', _('Update'), true, '', null); // inactive update
echo navi_button_cell($but_pref . 'first', _('First'), $pager->first_page, 'right');
echo navi_button_cell($but_pref . 'prev', _('Prev'), $pager->prev_page, 'right');
echo navi_button_cell($but_pref . 'next', _('Next'), $pager->next_page, 'right');
echo navi_button_cell($but_pref . 'last', _('Last'), $pager->last_page, 'right');
end_row();
end_table();
echo "</div>";
$from = ($pager->curr_page - 1) * $pager->page_len + 1;
$to = $from + $pager->page_len - 1;
if ($to > $pager->rec_count)
$to = $pager->rec_count;
$all = $pager->rec_count;
echo sprintf(_('Records %d-%d of %d'), $from, $to, $all);
echo $inact;
echo "</td>";
} else {
label_cell(_('No records') . $inact, "colspan=$colspan class='navibar'");
}
*/
if (isset($pager->marker_txt)) {
display_note($pager->marker_txt, 0, 1, "class='{$pager->notice_class}'");
}
div_end();
return true;
}
示例11: Today
echo '<tr>';
$from = Today();
$from = add_days($from, 1);
$bal = get_balance_before_for_bank_account(1, $from);
//echo $trans_no = kv_get_next_trans_no(99) + 1;
if ($total_net <= $bal) {
submit_cells('pay_salary', _("Process Payout"), '', _('Show Results'), 'default');
} else {
display_warning(" Your Current Account Balance is lower than the payout!.");
}
echo '</tr>';
end_table();
} else {
display_warning(" Paid Already!.");
}
div_end();
}
end_form();
if (get_post('RefreshInquiry')) {
$Ajax->activate('gross_salary');
$Ajax->activate('leave_days');
$Ajax->activate('monthly_loan');
$Ajax->activate('totals_tbl');
}
if (get_post('pay_salary')) {
global $Refs;
$pay_slip_id = add_payslip($_POST['year'], $_POST['month'], $_POST['empl_id'], $_POST['basic'], $_POST['da'], $_POST['hra'], $_POST['convey_allow'], $_POST['edu_other_allow'], $_POST['pf'], $_POST['lop_amount'], $_POST['tds'], $_POST['total_ded'], $_POST['total_net'], $_POST['date_of_pay']);
add_gl_trans(99, $pay_slip_id, $_POST['date_of_pay'], 5410, 0, 0, 'employee Salary #' . $_POST['empl_id'], $_POST['total_net']);
add_gl_trans(99, $pay_slip_id, $_POST['date_of_pay'], 1060, 0, 0, 'employee Salary #' . $_POST['empl_id'], -$_POST['total_net']);
$trans_no = kv_get_next_trans_no(99) + 1;
$ref = get_next_reference(99);
示例12: supplier_settings
//.........这里部分代码省略.........
$_POST['credit_limit'] = price_format($myrow["credit_limit"]);
$_POST['tax_group_id'] = $myrow["tax_group_id"];
$_POST['tax_included'] = $myrow["tax_included"];
$_POST['payable_account'] = $myrow["payable_account"];
$_POST['purchase_account'] = $myrow["purchase_account"];
$_POST['payment_discount_account'] = $myrow["payment_discount_account"];
$_POST['notes'] = $myrow["notes"];
$_POST['inactive'] = $myrow["inactive"];
} else {
$_POST['supp_name'] = $_POST['supp_ref'] = $_POST['address'] = $_POST['supp_address'] = $_POST['tax_group_id'] = $_POST['website'] = $_POST['supp_account_no'] = $_POST['notes'] = '';
$_POST['dimension_id'] = 0;
$_POST['dimension2_id'] = 0;
$_POST['tax_included'] = 0;
$_POST['sales_type'] = -1;
$_POST['gst_no'] = $_POST['bank_account'] = '';
$_POST['payment_terms'] = '';
$_POST['credit_limit'] = price_format(0);
$company_record = get_company_prefs();
$_POST['curr_code'] = $company_record["curr_default"];
$_POST['payable_account'] = $company_record["creditors_act"];
$_POST['purchase_account'] = '';
// default/item's cogs account
$_POST['payment_discount_account'] = $company_record['pyt_discount_act'];
}
table_section_title(_("Basic Data"));
text_row(_("Supplier Name:"), 'supp_name', null, 42, 40);
text_row(_("Supplier Short Name:"), 'supp_ref', null, 30, 30);
text_row(_("GSTNo:"), 'gst_no', null, 42, 40);
link_row(_("Website:"), 'website', null, 35, 55);
if ($supplier_id && !is_new_supplier($supplier_id) && (key_in_foreign_table($_POST['supplier_id'], 'supp_trans', 'supplier_id') || key_in_foreign_table($_POST['supplier_id'], 'purch_orders', 'supplier_id'))) {
label_row(_("Supplier's Currency:"), $_POST['curr_code']);
hidden('curr_code', $_POST['curr_code']);
} else {
currencies_list_row(_("Supplier's Currency:"), 'curr_code', null);
}
tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null);
text_row(_("Our Customer No:"), 'supp_account_no', null, 42, 40);
table_section_title(_("Purchasing"));
text_row(_("Bank Name/Account:"), 'bank_account', null, 42, 40);
amount_row(_("Credit Limit:"), 'credit_limit', null);
payment_terms_list_row(_("Payment Terms:"), 'payment_terms', null);
//
// tax_included option from supplier record is used directly in update_average_cost() function,
// therefore we can't edit the option after any transaction waas done for the supplier.
//
if (is_new_supplier($supplier_id)) {
check_row(_("Prices contain tax included:"), 'tax_included');
} else {
hidden('tax_included');
label_row(_("Prices contain tax included:"), $_POST['tax_included'] ? _('Yes') : _('No'));
}
table_section_title(_("Accounts"));
gl_all_accounts_list_row(_("Accounts Payable Account:"), 'payable_account', $_POST['payable_account']);
gl_all_accounts_list_row(_("Purchase Account:"), 'purchase_account', $_POST['purchase_account'], false, false, _("Use Item Inventory/COGS Account"));
gl_all_accounts_list_row(_("Purchase Discount Account:"), 'payment_discount_account', $_POST['payment_discount_account']);
if (!$supplier_id) {
table_section_title(_("Contact Data"));
text_row(_("Phone Number:"), 'phone', null, 32, 30);
text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30);
}
table_section(2);
$dim = get_company_pref('use_dimension');
if ($dim >= 1) {
table_section_title(_("Dimension"));
dimensions_list_row(_("Dimension") . " 1:", 'dimension_id', null, true, " ", false, 1);
if ($dim > 1) {
dimensions_list_row(_("Dimension") . " 2:", 'dimension2_id', null, true, " ", false, 2);
}
}
if ($dim < 1) {
hidden('dimension_id', 0);
}
if ($dim < 2) {
hidden('dimension2_id', 0);
}
table_section_title(_("Addresses"));
textarea_row(_("Mailing Address:"), 'address', null, 35, 5);
textarea_row(_("Physical Address:"), 'supp_address', null, 35, 5);
table_section_title(_("General"));
textarea_row(_("General Notes:"), 'notes', null, 35, 5);
if ($supplier_id) {
record_status_list_row(_("Supplier status:"), 'inactive');
} else {
table_section_title(_("Contact Data"));
text_row(_("Contact Person:"), 'contact', null, 42, 40);
text_row(_("Fax Number:"), 'fax', null, 32, 30);
email_row(_("E-mail:"), 'email', null, 35, 55);
languages_list_row(_("Document Language:"), 'rep_lang', null, _('System default'));
}
end_outer_table(1);
div_start('controls');
if ($supplier_id) {
submit_center_first('submit', _("Update Supplier"), _('Update supplier data'), @$_REQUEST['popup'] ? true : 'default');
submit_return('select', get_post('supplier_id'), _("Select this supplier and return to document entry."));
submit_center_last('delete', _("Delete Supplier"), _('Delete supplier data if have been never used'), true);
} else {
submit_center('submit', _("Add New Supplier Details"), true, '', 'default');
}
div_end();
}
示例13: array
if ($this->the_user->level < 3) {
$menu = array($this->lang->line('system') => array('id' => 'system_tab', 'name' => 'system', 'class' => 'settings_tab', 'onclick' => "window.location.href='/settings?tab=system'"), $this->lang->line('users') => array('id' => 'users_tab', 'name' => 'users', 'class' => 'settings_tab', 'onclick' => "window.location.href='/settings?tab=users'"), $this->lang->line('products') => array('id' => 'products_tab', 'name' => 'products', 'class' => 'settings_tab', 'onclick' => "window.location.href='/settings?tab=products'"), $this->lang->line('clients') => array('id' => 'clients_tab', 'name' => 'clients', 'class' => 'settings_tab', 'onclick' => "window.location.href='/settings?tab=clients'"));
} else {
$menu = array($this->lang->line('system') => array('id' => 'system_tab', 'name' => 'system', 'class' => 'settings_tab', 'onclick' => "window.location.href='/settings?tab=system'"));
}
echo div_start($settings_wrapper);
foreach ($menu as $item => $attr) {
echo div_start($attr);
echo $item;
echo div_end();
}
echo div_start($settings_container);
switch ($tab) {
case 'system':
default:
$this->load->view('settings/system');
break;
case 'users':
$this->load->view('settings/users');
break;
case 'products':
$this->load->view('settings/products');
break;
case 'clients':
$this->load->view('settings/clients');
break;
}
echo div_end();
//Container
echo div_end();
//Wrapper
示例14: display_languages
function display_languages()
{
global $table_style, $installed_languages, $dflt_lang, $GetText;
$th = array(_("Language"), _("Name"), _("Encoding"), _("Right To Left"), _("Installed"), _("Available"), _("Default"), "", "");
$currlang = $_SESSION["language"]->code;
div_start('lang_tbl');
start_form();
//
// select/display system locales support for sites using native gettext
//
if (function_exists('gettext')) {
if (check_value('DisplayAll')) {
array_insert($th, 7, _("Supported"));
}
start_table();
check_row(_('Display also languages not supported by server locales'), 'DisplayAll', null, true);
end_table();
}
start_table(TABLESTYLE);
table_header($th);
$k = 0;
// get list of all (available and installed) langauges
$langs = get_languages_list();
foreach ($langs as $pkg_name => $lng) {
if ($lng == 'C') {
// skip default locale (aka no translation)
continue;
}
$lang = $lng['code'];
$lang_name = $lng['name'];
$charset = $lng['encoding'];
$rtl = @$lng['rtl'] == 'yes' || @$lng['rtl'] === true;
$available = @$lng['available'];
$installed = @$lng['version'];
$id = @$lng['local_id'];
if ($lang == $currlang) {
start_row("class='stockmankobg'");
} else {
alt_table_row_color($k);
}
$support = $GetText->check_support($lang, $charset);
if (function_exists('gettext') && !$support && !get_post('DisplayAll')) {
continue;
}
label_cell($lang);
label_cell($available ? get_package_view_str($lang, $lang_name) : $lang_name);
label_cell($charset);
label_cell($rtl ? _("Yes") : _("No"));
label_cell($id === null ? _("None") : ($available && $installed ? $installed : _("Unknown")));
label_cell($available ? $available : _("None"));
label_cell($id === null ? '' : radio(null, 'CurDflt', $id, $dflt_lang == $lang, true), "align='center'");
if (function_exists('gettext') && check_value('DisplayAll')) {
label_cell($support ? _("Yes") : _("No"));
}
if (!$available && $lang != 'C') {
// manually installed language
button_cell('Edit' . $id, _("Edit"), _('Edit non standard language configuration'), ICON_EDIT);
} elseif (check_pkg_upgrade($installed, $available)) {
// outdated or not installed language in repo
button_cell('Update' . $pkg_name, $installed ? _("Update") : _("Install"), _('Upload and install latest language package'), ICON_DOWN);
} else {
label_cell('');
}
if ($id !== null && $lang != $currlang && $lang != 'C') {
delete_button_cell('Delete' . $id, _('Delete'));
submit_js_confirm('Delete' . $id, sprintf(_("You are about to remove language \\'%s\\'.\nDo you want to continue ?"), $lang_name));
} else {
label_cell('');
}
end_row();
}
end_table();
display_note(_("The marked language is the current language which cannot be deleted."), 0, 0, "class='currentfg'");
br();
submit_center_first('Refresh', _("Update default"), '', null);
submit_center_last('Add', _("Add new language manually"), '', false);
end_form();
div_end();
}
示例15: item_settings
//.........这里部分代码省略.........
$_POST['del_image'] = 0;
$_POST['inactive'] = $myrow["inactive"];
$_POST['editable'] = $myrow["editable"];
}
label_row(_("Item Code/ISBN:"), $_POST['NewStockID']);
hidden('NewStockID', $_POST['NewStockID']);
set_focus('description');
}
/*=================MOODLEARNING====================*/
level_list_row(_("Level:"), 'level_id', null);
/*=================================================*/
text_row(_("Name:"), 'description', null, 52, 200);
textarea_row(_('Description:'), 'long_description', null, 42, 3);
stock_categories_list_row(_("Category/Subject:"), 'category_id', null, false, $new_item);
if ($new_item && (list_updated('category_id') || !isset($_POST['units']))) {
$category_record = get_item_category($_POST['category_id']);
$_POST['level_id'] = $category_record["level_id"];
// moodlearning edit
$_POST['subject_id'] = $category_record["level_id"];
$_POST['tax_type_id'] = $category_record["dflt_tax_type"];
$_POST['units'] = $category_record["dflt_units"];
$_POST['mb_flag'] = $category_record["dflt_mb_flag"];
$_POST['inventory_account'] = $category_record["dflt_inventory_act"];
$_POST['cogs_account'] = $category_record["dflt_cogs_act"];
$_POST['sales_account'] = $category_record["dflt_sales_act"];
$_POST['adjustment_account'] = $category_record["dflt_adjustment_act"];
$_POST['assembly_account'] = $category_record["dflt_assembly_act"];
$_POST['dimension_id'] = $category_record["dflt_dim1"];
$_POST['dimension2_id'] = $category_record["dflt_dim2"];
$_POST['no_sale'] = $category_record["dflt_no_sale"];
$_POST['editable'] = 0;
}
$fresh_item = !isset($_POST['NewStockID']) || $new_item || check_usage($_POST['stock_id'], false);
item_tax_types_list_row(_("Item Tax Type:"), 'tax_type_id', null);
stock_item_types_list_row(_("Item Type:"), 'mb_flag', null, $fresh_item);
stock_units_list_row(_('Units of Measure:'), 'units', null, $fresh_item);
check_row(_("Editable description:"), 'editable');
check_row(_("Exclude from sales:"), 'no_sale');
table_section(2);
$dim = get_company_pref('use_dimension');
if ($dim >= 1) {
table_section_title(_("Dimensions"));
dimensions_list_row(_("Dimension") . " 1", 'dimension_id', null, true, " ", false, 1);
if ($dim > 1) {
dimensions_list_row(_("Dimension") . " 2", 'dimension2_id', null, true, " ", false, 2);
}
}
if ($dim < 1) {
hidden('dimension_id', 0);
}
if ($dim < 2) {
hidden('dimension2_id', 0);
}
table_section_title(_("GL Accounts"));
gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', $_POST['sales_account']);
if (!is_service($_POST['mb_flag'])) {
gl_all_accounts_list_row(_("Inventory Account:"), 'inventory_account', $_POST['inventory_account']);
gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'cogs_account', $_POST['cogs_account']);
gl_all_accounts_list_row(_("Inventory Adjustments Account:"), 'adjustment_account', $_POST['adjustment_account']);
} else {
gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'cogs_account', $_POST['cogs_account']);
hidden('inventory_account', $_POST['inventory_account']);
hidden('adjustment_account', $_POST['adjustment_account']);
}
if (is_manufactured($_POST['mb_flag'])) {
gl_all_accounts_list_row(_("Item Assembly Costs Account:"), 'assembly_account', $_POST['assembly_account']);
} else {
hidden('assembly_account', $_POST['assembly_account']);
}
table_section_title(_("Other"));
// Add image upload for New Item - by Joe
file_row(_("Image File (.jpg)") . ":", 'pic', 'pic');
// Add Image upload for New Item - by Joe
$stock_img_link = "";
$check_remove_image = false;
if (isset($_POST['NewStockID']) && file_exists(company_path() . '/images/' . item_img_name($_POST['NewStockID']) . ".jpg")) {
// 31/08/08 - rand() call is necessary here to avoid caching problems. Thanks to Peter D.
$stock_img_link .= "<img id='item_img' alt = '[" . $_POST['NewStockID'] . ".jpg" . "]' src='" . company_path() . '/images/' . item_img_name($_POST['NewStockID']) . ".jpg?nocache=" . rand() . "'" . " height='{$pic_height}' border='0'>";
$check_remove_image = true;
} else {
$stock_img_link .= _("No image");
}
label_row(" ", $stock_img_link);
if ($check_remove_image) {
check_row(_("Delete Image:"), 'del_image');
}
record_status_list_row(_("Item status:"), 'inactive');
end_outer_table(1);
div_start('controls');
if (!isset($_POST['NewStockID']) || $new_item) {
submit_center('addupdate', _("Insert New Item"), true, '', 'default');
} else {
submit_center_first('addupdate', _("Update Item"), '', @$_REQUEST['popup'] ? true : 'default');
submit_return('select', get_post('stock_id'), _("Select this items and return to document entry."), 'default');
submit('clone', _("Clone This Item"), true, '', true);
submit('delete', _("Delete This Item"), true, '', true);
submit_center_last('cancel', _("Cancel"), _("Cancel Edition"), 'cancel');
}
div_end();
}