From 4657251eed9910c5669c859a54051dc54143aa54 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 7 Dec 2008 16:58:13 +0000 Subject: [PATCH] Better layout. Copyright notes. Mailto links, outer table routines. (3. run) --- CHANGELOG.txt | 18 ++++- gl/includes/ui/gl_bank_ui.inc | 23 ++---- gl/includes/ui/gl_journal_ui.inc | 25 ++----- includes/ui/ui_controls.inc | 16 +++-- inventory/adjustments.php | 21 ++++-- inventory/includes/item_adjustments_ui.inc | 44 ++++++------ inventory/includes/stock_transfers_ui.inc | 43 ++++++------ inventory/transfers.php | 11 ++- purchasing/includes/ui/invoice_ui.inc | 82 +++++++++------------- purchasing/includes/ui/po_ui.inc | 45 ++++++------ purchasing/supplier_credit.php | 28 ++++---- purchasing/supplier_invoice.php | 36 +++++----- purchasing/supplier_payment.php | 34 ++++++--- sales/customer_payments.php | 29 ++++---- sales/includes/ui/sales_credit_ui.inc | 30 +++----- sales/includes/ui/sales_order_ui.inc | 53 +++++--------- 16 files changed, 258 insertions(+), 280 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b8aecd5d..fa29eb01 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -20,18 +20,32 @@ Legend: $ -> Affected files 07-Dec-2008 Joe Hunt -! Better layout. Copyright notes. Mailto links. +! Better layout. Copyright notes. Mailto links, outer table routines. $ /admin/company_preferences.php /admin/display_prefs.php - /gl_setup.php + /admin/gl_setup.php /admin/users.php + /gl/includes/ui/gl_bank_ui.inc + /gl/includes/ui/gl_journal_ui.inc /includes/ui_controls.inc /includes/ui_input.inc + /inventory/adjustments.php + /inventory/transfers.php + /inventory/includes/item_adjustments_ui.inc + /inventory/includes/stock_transfers_ui.inc /inventory/manage/locations.php + /purchasing/includes/ui/invoice_ui.inc + /purchasing/includes/ui/po_ui.inc /purchasing/manage/suppliers.php + /purchasing/supplier_credit.php + /purchasing/supplier_invoice.php + /purchasing/supplier_payment.php + /sales/includes/ui/sales_credit_ui.inc + /sales/includes/ui/sales_order_ui.inc /sales/manage/customer_branches.php /sales/manage/customers.php /sales/manage/sales_people.php + /sales/customer_payments.php 05-Dec-2008 Joe Hunt + New fields in suppliers, phone, fax, vat no, contact and credit limit diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index 16266576..cf44945e 100644 --- a/gl/includes/ui/gl_bank_ui.inc +++ b/gl/includes/ui/gl_bank_ui.inc @@ -15,20 +15,16 @@ function display_bank_header(&$order) $payment = $order->trans_type == systypes::bank_payment(); div_start('pmt_header'); - start_table("width=90% $table_style2"); // outer table - echo ""; - echo ""; // inner table + start_outer_table("width=90% $table_style2"); // outer table + table_section(1); + bank_accounts_list_row( $payment ? _("From:") : _("To:"), 'bank_account', null, true); date_row(_("Date:"), 'date_', '', null, 0, 0, 0, null, true); - echo "
"; // inner table - - echo ""; - - echo ""; // inner table + table_section(2, "33%"); if (!isset($_POST['PayType'])) { @@ -90,22 +86,15 @@ function display_bank_header(&$order) exchange_rate_display($bank_currency, $person_currency, $_POST['date_']); - echo "
"; // inner table - - echo ""; - - echo ""; // inner table + table_section(3, "33%"); if (isset($_GET['NewPayment'])) ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::bank_payment())); else ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::bank_deposit())); - echo "
"; // inner table - - echo ""; + end_outer_table(1); // outer table - end_table(1); // outer table div_end(); } //--------------------------------------------------------------------------------- diff --git a/gl/includes/ui/gl_journal_ui.inc b/gl/includes/ui/gl_journal_ui.inc index c5b5eb15..0f39203b 100644 --- a/gl/includes/ui/gl_journal_ui.inc +++ b/gl/includes/ui/gl_journal_ui.inc @@ -19,44 +19,33 @@ function display_order_header(&$Order) global $table_style2; $qes = has_quick_entries(-1, 0); - start_table("$table_style2 width=90%"); - if ($qes) - echo ""; // outer table - else - echo ""; // outer table - echo ""; + start_outer_table("$table_style2 width=90%"); + table_section(1); + start_row(); date_cells(_("Date:"), 'date_'); ref_cells(_("Reference:"), 'ref', '', references::get_next(0)); end_row(); - echo "
"; - if ($qes) - echo ""; // outer table + table_section(2, "20%"); else - echo ""; // outer table + table_section(2, "50%"); - echo ""; start_row(); check_cells(_("Reverse Transaction:"), 'Reverse', null); end_row(); - echo "
"; if ($qes !== false) { - echo ""; // outer table - echo ""; + table_section(3, "50%"); start_row(); quick_entries_list_cells(_("Quick Entry:"), 'person_id', null, -1, 0); amount_cells(_("Total Amount"), 'totamount', null, null, "  ".submit('go', _("Go"), false, false, true)); end_row(); - echo "
"; } - - echo ""; // outer table - end_table(1); + end_outer_table(1); } //--------------------------------------------------------------------------------- diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index 6b8f02d6..7da7e2bc 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -63,23 +63,29 @@ function start_outer_table($extra="", $padding='2', $spacing='0') echo "\n"; // outer table } -function table_section($number=1) +function table_section($number=1, $width=false) { - if ($number == 2) + if ($number > 1) { echo "\n"; - echo "\n"; // outer table + $width = ($width ? "width=$width" : ""); + echo "\n"; // outer table } echo "\n"; } -function end_outer_table($breaks=0) +function end_outer_table($breaks=0, $close_table=true) { - echo "
\n"; + if ($close_table) + echo "\n"; echo "\n"; end_table($breaks); } +function vertical_space() +{ + echo ""; // outer table +} function meta_forward($forward_to, $params="") { global $Ajax; diff --git a/inventory/adjustments.php b/inventory/adjustments.php index 45bf4e92..a500eebc 100644 --- a/inventory/adjustments.php +++ b/inventory/adjustments.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 3; $path_to_root=".."; include_once($path_to_root . "/includes/ui/items_cart.inc"); @@ -212,14 +221,12 @@ start_form(false, true); display_order_header($_SESSION['adj_items']); -start_table("$table_style width=70%", 10); -start_row(); -echo ""; +start_outer_table("$table_style width=70%", 10); + display_adjustment_items(_("Adjustment Items"), $_SESSION['adj_items']); adjustment_options_controls(); -echo ""; -end_row(); -end_table(1); + +end_outer_table(1, false); submit_center_first('Update', _("Update"), '', null); submit_center_last('Process', _("Process Adjustment"), '', true); diff --git a/inventory/includes/item_adjustments_ui.inc b/inventory/includes/item_adjustments_ui.inc index b132bf35..5740eec0 100644 --- a/inventory/includes/item_adjustments_ui.inc +++ b/inventory/includes/item_adjustments_ui.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ include_once($path_to_root . "/includes/ui.inc"); include_once($path_to_root . "/includes/ui/items_cart.inc"); @@ -19,26 +28,18 @@ function display_order_header(&$order) { global $table_style2; - start_table("width=70% $table_style2"); // outer table - echo ""; - echo ""; // inner table + start_outer_table("width=70% $table_style2"); // outer table + table_section(1); locations_list_row(_("Location:"), 'StockLocation', null); ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::inventory_adjustment())); - echo "
"; // inner table - - echo ""; - - echo ""; // inner table + table_section(2, "33%"); date_row(_("Date:"), 'AdjDate'); - echo "
"; // inner table + table_section(3, "33%"); - echo ""; - - echo ""; // inner table movement_types_list_row(_("Detail:"), 'type', null); if (!isset($_POST['Increase'])) @@ -46,10 +47,7 @@ function display_order_header(&$order) yesno_list_row(_("Type:"), 'Increase', $_POST['Increase'], _("Positive Adjustment"), _("Negative Adjustment")); - echo "
"; // inner table - - echo ""; - end_table(1); // outer table + end_outer_table(1); // outer table } //--------------------------------------------------------------------------------- @@ -62,7 +60,7 @@ function display_adjustment_items($title, &$order) div_start('items_table'); start_table("$table_style width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), - _("Unit"), _("Unit Cost"), _("Total")); + _("Unit"), _("Unit Cost"), _("Total"), ""); if ( count($order->line_items)) $th[] = ''; table_header($th); @@ -88,7 +86,7 @@ function display_adjustment_items($title, &$order) edit_button_cell("Edit$line_no", _("Edit"), _('Edit document line')); - edit_button_cell("Delete$line_no", _("Delete"), + delete_button_cell("Delete$line_no", _("Delete"), _('Remove line from document')); end_row(); } @@ -152,10 +150,10 @@ function adjustment_edit_item_controls(&$order, $line_no=-1) if ($id != -1) { - edit_button_cell('UpdateItem', _("Update"), - _('Confirm changes')); - edit_button_cell('CancelItemChanges', _("Cancel"), - _('Cancel changes')); + button_cell('UpdateItem', _("Update"), + _('Confirm changes'), ICON_UPDATE); + button_cell('CancelItemChanges', _("Cancel"), + _('Cancel changes'), ICON_CANCEL); hidden('LineNo', $line_no); set_focus('qty'); } diff --git a/inventory/includes/stock_transfers_ui.inc b/inventory/includes/stock_transfers_ui.inc index b65f5bee..6012afb6 100644 --- a/inventory/includes/stock_transfers_ui.inc +++ b/inventory/includes/stock_transfers_ui.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ include_once($path_to_root . "/includes/ui.inc"); include_once($path_to_root . "/includes/ui/items_cart.inc"); @@ -19,33 +28,24 @@ function display_order_header(&$order) { global $table_style; - start_table("width=70% $table_style"); - echo ""; // outer table - echo ""; + start_outer_table("width=70% $table_style"); + table_section(1); + locations_list_row(_("From Location:"), 'FromStockLocation', null); locations_list_row(_("To Location:"), 'ToStockLocation', null); - echo "
"; - - echo ""; // outer table - - echo ""; + table_section(2, "33%"); ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::location_transfer())); date_row(_("Date:"), 'AdjDate'); - echo "
"; - - echo ""; // outer table + table_section(3, "33%"); - echo ""; movement_types_list_row(_("Transfer Type:"), 'type', null); - echo "
"; - echo ""; - end_table(1); // outer table + end_outer_table(1); // outer table } //--------------------------------------------------------------------------------- @@ -58,6 +58,7 @@ function display_transfer_items($title, &$order) div_start('items_table'); start_table("$table_style width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), ''); + if ( count($order->line_items)) $th[] = ''; table_header($th); $subtotal = 0; $k = 0; //row colour counter @@ -77,7 +78,7 @@ function display_transfer_items($title, &$order) edit_button_cell("Edit$line_no", _("Edit"), _('Edit document line')); - edit_button_cell("Delete$line_no", _("Delete"), + delete_button_cell("Delete$line_no", _("Delete"), _('Remove line from document')); end_row(); } @@ -133,10 +134,10 @@ function transfer_edit_item_controls(&$order, $line_no=-1) if ($id != -1) { - edit_button_cell('UpdateItem', _("Update"), - _('Confirm changes')); - edit_button_cell('CancelItemChanges', _("Cancel"), - _('Cancel changes')); + button_cell('UpdateItem', _("Update"), + _('Confirm changes'), ICON_UPDATE); + button_cell('CancelItemChanges', _("Cancel"), + _('Cancel changes'), ICON_CANCEL); hidden('LineNo', $line_no); set_focus('qty'); } diff --git a/inventory/transfers.php b/inventory/transfers.php index 541791a8..5407c696 100644 --- a/inventory/transfers.php +++ b/inventory/transfers.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 3; $path_to_root=".."; include_once($path_to_root . "/includes/ui/items_cart.inc"); diff --git a/purchasing/includes/ui/invoice_ui.inc b/purchasing/includes/ui/invoice_ui.inc index d72b0dcb..86b2f72c 100644 --- a/purchasing/includes/ui/invoice_ui.inc +++ b/purchasing/includes/ui/invoice_ui.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ //-------------------------------------------------------------------------------------------------- function copy_from_trans(&$supp_trans) @@ -44,17 +53,15 @@ function copy_to_trans(&$supp_trans) function invoice_header(&$supp_trans) { - global $Ajax; + global $Ajax, $table_style; // if vars have been lost, recopy if (!isset($_POST['tran_date'])) copy_from_trans($supp_trans); - start_table("width=100%", 5); - start_row(); - echo""; // outer + start_outer_table("$table_style width=98%", 5); - echo ""; + table_section(1); if (!isset($_POST['supplier_id']) && (get_global_supplier() != reserved_words::get_all())) $_POST['supplier_id'] = get_global_supplier(); @@ -78,11 +85,7 @@ function invoice_header(&$supp_trans) text_row(_("Supplier's Ref.:"), 'supp_reference', $_POST['supp_reference'], 20, 20); - echo "
"; - - echo ""; // outer - - echo ""; + table_section(2, "33%"); date_row(_("Date") . ":", 'tran_date', '', null, 0, 0, 0, "", true); if (isset($_POST['_tran_date_changed'])) { @@ -97,11 +100,7 @@ function invoice_header(&$supp_trans) label_row(_("Terms:"), $supp_trans->terms_description); - echo "
"; - - echo ""; // outer - - echo ""; + table_section(3, "33%"); $supplier_currency = get_supplier_currency($supp_trans->supplier_id); @@ -113,12 +112,9 @@ function invoice_header(&$supp_trans) exchange_rate_display($supplier_currency, $company_currency, $_POST['tran_date']); } - label_row(_("Tax Group:"), $supp_trans->tax_description); - echo "
"; + label_row(_("Tax Group:"), $supp_trans->tax_description); - echo ""; - end_row(); - end_table(); // outer + end_outer_table(); } //-------------------------------------------------------------------------------------------------- @@ -143,12 +139,10 @@ function invoice_totals(&$supp_trans) label_row(_("Credit Note Total"), $display_total, "align=right style='font-weight:bold;color:red;'", "nowrap align=right style='font-weight:bold;color:red;'"); - end_table(); - br(1); + end_table(1); start_table($table_style2); textarea_row(_("Memo:"), "Comments", null, 50, 3); - end_table(); - br(1); + end_table(1); } //-------------------------------------------------------------------------------------------------- @@ -193,24 +187,17 @@ function display_gl_items(&$supp_trans, $mode=0) if (($mode == 2 || $mode == 3) && count($supp_trans->gl_codes) == 0) return 0; - echo "
"; - - start_table("width=95%"); - echo ""; // outertable + start_outer_table("width=95%"); if ($supp_trans->is_invoice) $heading = _("GL Items for this Invoice"); else $heading = _("GL Items for this Credit Note"); - echo ""; - echo ""; - echo "
$heading
"; - - echo ""; // ouer table + vertical_space(); // ouer table div_start('gl_items'); - echo ""; + start_table("$table_style width=100%"); $dim = get_company_pref('use_dimension'); if ($dim == 2) @@ -253,7 +240,7 @@ function display_gl_items(&$supp_trans, $mode=0) if ($mode == 1) { - edit_button_cell("Delete2" . $entered_gl_code->Counter, _("Delete"), + delete_button_cell("Delete2" . $entered_gl_code->Counter, _("Delete"), _('Remove line from document')); label_cell(""); } @@ -276,12 +263,10 @@ function display_gl_items(&$supp_trans, $mode=0) label_row(_("Total"), price_format($total_gl_value), "colspan=".$colspan." align=right", "nowrap align=right"); - echo "
"; + end_table(); div_end(); - echo ""; - - end_table(); // outertable + end_outer_table(0, false); // outertable return $total_gl_value; } @@ -374,9 +359,9 @@ function display_grn_items(&$supp_trans, $mode=0) // if displaying in form, and no items, exit if (($mode == 2 || $mode == 3) && count($supp_trans->grn_items) == 0) return 0; - br(1); - start_table("width=95%"); - echo ""; // outertable + + start_outer_table("width=95%"); + $heading2 = ""; if ($mode == 1) { @@ -410,10 +395,10 @@ function display_grn_items(&$supp_trans, $mode=0) } echo ""; - echo ""; // outer table + vertical_space(); // outer table div_start('grn_items'); - echo ""; + start_table("$table_style width=100%"); if ($mode == 1) { $th = array(_("Delivery"), _("Sequence #"), _("P.O."), _("Item"), _("Description"), @@ -464,7 +449,7 @@ function display_grn_items(&$supp_trans, $mode=0) if ($mode == 1) { - edit_button_cell("Delete" . $entered_grn->id, _("Edit"), _('Edit document line')); + delete_button_cell("Delete" . $entered_grn->id, _("Edit"), _('Edit document line')); if ($supp_trans->is_invoice && $_SESSION["wa_current_user"]->access == 2) label_cell(""); } @@ -490,7 +475,7 @@ function display_grn_items(&$supp_trans, $mode=0) $colspan = 5; label_row(_("Total"), price_format($total_grn_value), "colspan=$colspan align=right", "nowrap align=right"); - echo "
"; + end_table(); if (!$ret) { if ($supp_trans->is_invoice) @@ -502,9 +487,8 @@ function display_grn_items(&$supp_trans, $mode=0) } } div_end(); - echo ""; - end_table(); // outertable + end_outer_table(0, false); // outertable return $total_grn_value; } diff --git a/purchasing/includes/ui/po_ui.inc b/purchasing/includes/ui/po_ui.inc index 1484b91c..74015b44 100644 --- a/purchasing/includes/ui/po_ui.inc +++ b/purchasing/includes/ui/po_ui.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ include_once($path_to_root . "/purchasing/includes/purchasing_db.inc"); // ------------------------------------------------------------------------------ @@ -45,10 +54,9 @@ function display_po_header(&$order) $editable = ($order->order_no == 0); - start_table("width=80% $table_style2"); - echo ""; // outer table - echo ""; + start_outer_table("width=80% $table_style2"); + table_section(1); if ($editable) { if (!isset($_POST['supplier_id']) && (get_global_supplier() != reserved_words::get_all())) @@ -90,11 +98,8 @@ function display_po_header(&$order) label_row(_("Reference:"), $order->reference); } - echo "
"; - - echo ""; // outer table + table_section(2); - echo ""; // check this out????????? //if (!isset($_POST['OrderDate']) || $_POST['OrderDate'] == "") // $_POST['OrderDate'] = $order->orig_order_date; @@ -111,17 +116,13 @@ function display_po_header(&$order) text_row(_("Supplier's Reference:"), 'Requisition', null, 16, 15); - echo "
"; - - echo ""; // outer table - - echo ""; - echo ""; echo ""; + table_section(3); + if (!isset($_POST['StkLocation']) || $_POST['StkLocation'] == "" || isset($_POST['_StkLocation_update']) || !isset($_POST['delivery_address']) || $_POST['delivery_address'] == "") @@ -148,10 +149,8 @@ function display_po_header(&$order) } textarea_row(_("Deliver to:"), 'delivery_address', $_POST['delivery_address'], 35, 4); - echo "
" . _("Receive Into:") . ""; locations_list('StkLocation', null, false, true); echo "
"; - echo ""; - end_table(); // outer table + end_outer_table(); // outer table } //--------------------------------------------------------------------------------------------------- @@ -166,7 +165,7 @@ function display_po_items(&$order, $editable=true) start_table("$table_style width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), - _("Required Delivery Date"), _("Price"), _("Line Total")); + _("Required Delivery Date"), _("Price"), _("Line Total"), ""); if (count($order->line_items)) $th[] = ''; table_header($th); @@ -195,7 +194,7 @@ function display_po_items(&$order, $editable=true) { edit_button_cell("Edit$line_no", _("Edit"), _('Edit document line')); - edit_button_cell("Delete$line_no", _("Delete"), + delete_button_cell("Delete$line_no", _("Delete"), _('Remove line from document')); } end_row(); @@ -328,10 +327,10 @@ function po_item_controls(&$order, $stock_id=null) if ($id!=-1) { - edit_button_cell('UpdateLine', _("Update"), - _('Confirm changes')); - edit_button_cell('CancelUpdate', _("Cancel"), - _('Cancel changes')); + button_cell('UpdateLine', _("Update"), + _('Confirm changes'), ICON_UPDATE); + button_cell('CancelUpdate', _("Cancel"), + _('Cancel changes'), ICON_CANCEL); set_focus('qty'); } else diff --git a/purchasing/supplier_credit.php b/purchasing/supplier_credit.php index 3854b5ae..c6d08a1f 100644 --- a/purchasing/supplier_credit.php +++ b/purchasing/supplier_credit.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $path_to_root=".."; include_once($path_to_root . "/purchasing/includes/supp_trans_class.inc"); @@ -292,29 +301,22 @@ if ($id4 != -1) start_form(false, true); -start_table("$table_style width=98%", 8); -echo ""; // outer table - -echo "
"; - invoice_header($_SESSION['supp_trans']); if ($_POST['supplier_id']=='') display_error('No supplier found for entered search text'); else { - echo ""; // outer table + start_outer_table("$table_style2 width=98%", 5); $total_grn_value = display_grn_items($_SESSION['supp_trans'], 1); $total_gl_value = display_gl_items($_SESSION['supp_trans'], 1); - echo ""; // outer table div_start('inv_tot'); invoice_totals($_SESSION['supp_trans']); div_end(); -} -echo ""; -end_table(1); // outer table + end_outer_table(0, false); +} if ($id != -1) { @@ -325,9 +327,9 @@ if ($id != -1) if (get_post('AddGLCodeToTrans')) $Ajax->activate('inv_tot'); - +br(); submit_center('PostCreditNote', _("Enter Credit Note"), true, '', true); -echo "

"; +br(); end_form(); end_page(); diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php index b7850518..534e55b3 100644 --- a/purchasing/supplier_invoice.php +++ b/purchasing/supplier_invoice.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security=5; $path_to_root=".."; @@ -368,37 +377,26 @@ if ($_SESSION["wa_current_user"]->access == 2) start_form(false, true); -start_table("$table_style2 width=98%", 8); -echo ""; // outer table - -echo "
"; - invoice_header($_SESSION['supp_trans']); + if ($_POST['supplier_id']=='') display_error('No supplier found for entered search text'); else { - echo ""; // outer table - - echo "
"; + start_outer_table("$table_style2 width=98%", 5); display_grn_items($_SESSION['supp_trans'], 1); - //display_grn_items_for_selection(); + display_gl_items($_SESSION['supp_trans'], 1); - //display_gl_controls(); - //echo ""; // outer table - echo "
"; div_start('inv_tot'); invoice_totals($_SESSION['supp_trans']); div_end(); -} -echo ""; -end_table(); // outer table + end_outer_table(0, false); +} //----------------------------------------------------------------------------------------- - if ($id != -1 || $id2 != -1) { $Ajax->activate('grn_items'); @@ -408,9 +406,9 @@ if ($id != -1 || $id2 != -1) if (get_post('AddGLCodeToTrans')) $Ajax->activate('inv_tot'); -echo "
"; +br(); submit_center('PostInvoice', _("Enter Invoice"), true, '', true); -echo "
"; +br(); end_form(); diff --git a/purchasing/supplier_payment.php b/purchasing/supplier_payment.php index 8f997c88..6ec57b01 100644 --- a/purchasing/supplier_payment.php +++ b/purchasing/supplier_payment.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $path_to_root=".."; $page_security = 5; include_once($path_to_root . "/includes/session.inc"); @@ -74,11 +83,13 @@ function display_controls() if (!is_date_in_fiscalyear($_POST['DatePaid'])) $_POST['DatePaid'] = end_fiscalyear(); } - start_table($table_style2, 5, 7); - echo ""; // outer table - - echo ""; + //start_table($table_style2, 5, 7); + //echo "
"; // outer table + start_outer_table($table_style2, 5); + //echo ""; + table_section(1); + bank_accounts_list_row(_("From Bank Account:"), 'bank_account', null, true); amount_row(_("Amount of Payment:"), 'amount'); @@ -86,9 +97,10 @@ function display_controls() date_row(_("Date Paid") . ":", 'DatePaid', '', null, 0, 0, 0, null, true); - echo "
"; - echo "
"; // outer table - echo ""; + table_section(2); + //echo "
"; + //echo "
"; // outer table + //echo ""; supplier_list_row(_("Payment To:"), 'supplier_id', null, false, true); @@ -105,10 +117,10 @@ function display_controls() text_row(_("Memo:"), 'memo_', null, 52,50); - echo "
"; + //echo "
"; - echo ""; - end_table(1); // outer table + //echo ""; + end_outer_table(1); // outer table submit_center('ProcessSuppPayment',_("Enter Payment"), true, '', true); diff --git a/sales/customer_payments.php b/sales/customer_payments.php index 9f8b7902..f4fdf794 100644 --- a/sales/customer_payments.php +++ b/sales/customer_payments.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $path_to_root=".."; $page_security = 3; include_once($path_to_root . "/includes/session.inc"); @@ -169,10 +178,9 @@ function read_customer_data() function display_item_form() { global $table_style2; - start_table($table_style2, 5, 7); - echo ""; // outer table - echo ""; + start_outer_table($table_style2, 5); + table_section(1); if (!isset($_POST['customer_id'])) $_POST['customer_id'] = get_global_customer(false); @@ -193,8 +201,8 @@ function display_item_form() set_global_customer($_POST['customer_id']); if (isset($_POST['HoldAccount']) && $_POST['HoldAccount'] != 0) { - echo "
"; - display_note(_("This customer account is on hold."), 0, 0, "class='redfb'"); + end_outer_table(); + display_error(_("This customer account is on hold.")); } else { $display_discount_percent = percent_format($_POST['pymt_discount']*100) . "%"; @@ -206,9 +214,7 @@ function display_item_form() date_row(_("Date of Deposit:"), 'DateBanked','',null, 0, 0, 0, null, true); - echo ""; - echo ""; // outer table - echo ""; + table_section(2); bank_accounts_list_row(_("Into Bank Account:"), 'bank_account', null, true); @@ -223,10 +229,7 @@ function display_item_form() textarea_row(_("Memo:"), 'memo_', null, 22, 4); - echo "
"; - - echo ""; - end_table(); // outer table + end_outer_table(1); if ($cust_currency != $bank_currency) display_note(_("Amount and discount are in customer's currency.")); diff --git a/sales/includes/ui/sales_credit_ui.inc b/sales/includes/ui/sales_credit_ui.inc index a38c4aed..f4725d3f 100644 --- a/sales/includes/ui/sales_credit_ui.inc +++ b/sales/includes/ui/sales_credit_ui.inc @@ -16,9 +16,9 @@ include_once($path_to_root . "/includes/ui.inc"); function display_credit_header(&$order) { global $table_style, $Ajax; - start_table("width=80% $table_style"); - echo ""; // outer table - echo ""; + + start_outer_table("width=80% $table_style"); + table_section(1); $customer_error = ""; $change_prices = 0; @@ -87,24 +87,17 @@ function display_credit_header(&$order) label_row(_("Reference").':', $_POST['ref'] ); - - echo "
"; - - echo ""; // outer table - if (!is_company_currency($order->customer_currency)) { + table_section(2); + div_start('currency'); - echo ""; label_row(_("Customer Currency:"), $order->customer_currency); exchange_rate_display($order->customer_currency, get_company_currency(), $_POST['OrderDate']); - echo "
"; - echo ""; // outer table div_end(); } - - echo ""; + table_section(3); if (!isset($_POST['sales_type_id'])) $_POST['sales_type_id'] = $order->sales_type; @@ -121,11 +114,8 @@ function display_credit_header(&$order) shippers_list_row(_("Shipping Company:"), 'ShipperID', $order->ship_via); label_row(_("Customer Discount:"), ($order->default_discount * 100) . "%"); - echo "
"; - - echo ""; // outer table - echo ""; + table_section(4); if (!isset($_POST['OrderDate']) || $_POST['OrderDate'] == "") $_POST['OrderDate'] = $order->document_date; @@ -148,11 +138,7 @@ function display_credit_header(&$order) else hidden('dimension2_id', 0); - echo "
"; - - echo ""; - - end_table(1); // outer table + end_outer_table(1); // outer table if ($change_prices != 0) { foreach ($order->line_items as $line_no=>$item) { diff --git a/sales/includes/ui/sales_order_ui.inc b/sales/includes/ui/sales_order_ui.inc index 56926b42..5657a497 100644 --- a/sales/includes/ui/sales_order_ui.inc +++ b/sales/includes/ui/sales_order_ui.inc @@ -214,10 +214,10 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group { global $table_style, $Ajax; - start_table("width=80% $table_style"); - echo ""; // outer table - echo ""; + start_outer_table("width=80% $table_style"); + table_section(1); + $customer_error = ""; $change_prices = 0; @@ -312,24 +312,18 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group ref_cells(_("Reference").':', 'ref', _('Reference number unique for this document type'), null, ''); } - echo "
"; - - echo ""; // outer table - if (!is_company_currency($order->customer_currency)) { + table_section(2); + div_start('currency'); - echo ""; label_row(_("Customer Currency:"), $order->customer_currency); exchange_rate_display($order->customer_currency, get_company_currency(), ($editable ? $_POST['OrderDate'] : $order->document_date)); - echo "
"; div_end(); - echo ""; // outer table } + table_section(3); - - echo ""; if ($order->trans_type == 10 && $order->pos != -1) { sale_payment_list_cells(_('Payment:'), 'cash', null, true); $cash_payment = get_post('cash', 0); @@ -364,11 +358,8 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group } label_row(_("Customer Discount:"), ($order->default_discount * 100) . "%"); - echo "
"; - - echo ""; // outer table - - echo ""; + + table_section(4); if ($editable) { @@ -412,11 +403,8 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group label_row(_("Tax Group:"), $order->tax_group_name); hidden('tax_group_id', $_SESSION['Items']->tax_group_id); } - echo "
"; - - echo ""; - end_table(1); // outer table + end_outer_table(1); // outer table if ($change_prices != 0) { foreach ($order->line_items as $line_no=>$item) { @@ -515,17 +503,17 @@ function display_delivery_details(&$order) { global $table_style2, $Ajax; -div_start('delivery'); + div_start('delivery'); if (get_post('cash', 0)) { // Direct payment sale display_heading(_('Cash payment')); - echo ""; + start_table("$table_style2 width=60%"); label_row(_("Deliver from Location:"), $order->location_name); hidden('Location', $order->Location); label_row(_("Cash account:"), $order->account_name); textarea_row(_("Comments:"), "Comments", $order->Comments, 31, 5); - echo "
"; + end_table(); } else { if ($order->trans_type==10) @@ -544,10 +532,8 @@ div_start('delivery'); $delname = _("Required Delivery Date").':'; } display_heading($title); - echo "
"; - start_table("$table_style2 width=90%"); - echo ""; // outer table - echo ""; + start_outer_table("$table_style2 width=90%"); + table_section(1); locations_list_row(_("Deliver from Location:"), 'Location', null, false, true); @@ -565,11 +551,7 @@ div_start('delivery'); text_row(_("Contact Phone Number:"), 'phone', $order->phone, 25, 25, _('Phone number of ordering person. Defaults to branch phone number')); - echo "
"; - - echo ""; // outer table - - echo ""; + table_section(2); text_row(_("Customer Reference:"), 'cust_ref', $order->cust_ref, 25, 25, _('Customer reference number for this order (if any)')); @@ -579,9 +561,8 @@ div_start('delivery'); price_format(get_post('freight_cost',0))); shippers_list_row(_("Shipping Company:"), 'ship_via', $order->ship_via); - echo "
"; - echo ""; - end_table(1); // outer table + + end_outer_table(1); } div_end(); } -- 2.30.2