From d9b4de9d7e9d3ba77f6ece752fd6cc988effd8f1 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Wed, 14 Apr 2010 21:01:47 +0000 Subject: [PATCH] Replaced the global variables for table styles to defined CSS classes. --- CHANGELOG.txt | 4 +++ access/login.php | 2 +- admin/attachments.php | 8 ++--- admin/backups.php | 2 +- admin/change_current_user_password.php | 2 +- admin/company_preferences.php | 2 +- admin/create_coy.php | 8 ++--- admin/display_prefs.php | 2 +- admin/fiscalyears.php | 8 ++--- admin/forms_setup.php | 2 +- admin/gl_setup.php | 3 +- admin/inst_lang.php | 8 ++--- admin/inst_module.php | 12 +++----- admin/inst_upgrade.php | 2 +- admin/payment_terms.php | 4 +-- admin/print_profiles.php | 2 +- admin/printers.php | 4 +-- admin/security_roles.php | 6 ++-- admin/shipping_companies.php | 4 +-- admin/system_diagnostics.php | 2 +- admin/tags.php | 4 +-- admin/users.php | 4 +-- admin/view_print_transaction.php | 3 +- admin/void_transaction.php | 4 +-- dimensions/dimension_entry.php | 2 +- dimensions/includes/dimensions_ui.inc | 4 +-- dimensions/inquiry/search_dimensions.php | 2 +- dimensions/view/view_dimension.php | 4 +-- gl/bank_account_reconcile.php | 4 +-- gl/bank_transfer.php | 4 +-- gl/gl_bank.php | 2 +- gl/gl_budget.php | 4 +-- gl/gl_journal.php | 2 +- gl/includes/ui/gl_bank_ui.inc | 8 ++--- gl/includes/ui/gl_journal_ui.inc | 8 ++--- gl/inquiry/balance_sheet.php | 6 ++-- gl/inquiry/bank_inquiry.php | 4 +-- gl/inquiry/gl_account_inquiry.php | 8 ++--- gl/inquiry/gl_trial_balance.php | 6 ++-- gl/inquiry/journal_inquiry.php | 2 +- gl/inquiry/profit_loss.php | 6 ++-- gl/inquiry/tax_inquiry.php | 9 ++---- gl/manage/bank_accounts.php | 4 +-- gl/manage/currencies.php | 8 ++--- gl/manage/exchange_rates.php | 5 ++-- gl/manage/gl_account_classes.php | 4 +-- gl/manage/gl_account_types.php | 4 +-- gl/manage/gl_accounts.php | 4 +-- gl/manage/gl_quick_entries.php | 8 ++--- gl/view/bank_transfer_view.php | 2 +- gl/view/gl_deposit_view.php | 4 +-- gl/view/gl_payment_view.php | 4 +-- gl/view/gl_trans_view.php | 6 ++-- includes/db_pager.inc | 1 - includes/types.inc | 6 ++++ includes/ui/allocation_cart.inc | 4 +-- includes/ui/db_pager_view.inc | 4 +-- includes/ui/ui_controls.inc | 14 ++++++--- includes/ui/ui_view.inc | 7 ++--- inventory/adjustments.php | 2 +- inventory/cost_update.php | 2 +- inventory/includes/item_adjustments_ui.inc | 8 ++--- inventory/includes/stock_transfers_ui.inc | 8 ++--- inventory/inquiry/stock_movements.php | 4 +-- inventory/inquiry/stock_status.php | 2 +- inventory/manage/item_categories.php | 4 +-- inventory/manage/item_codes.php | 4 +-- inventory/manage/item_units.php | 4 +-- inventory/manage/items.php | 4 +-- inventory/manage/locations.php | 4 +-- inventory/manage/movement_types.php | 4 +-- inventory/manage/sales_kits.php | 12 ++++---- inventory/prices.php | 4 +-- inventory/purchasing_data.php | 4 +-- inventory/reorder_level.php | 2 +- inventory/transfers.php | 2 +- inventory/view/view_adjustment.php | 4 +-- inventory/view/view_transfer.php | 7 ++--- manufacturing/includes/manufacturing_ui.inc | 29 +++++++++---------- .../includes/work_order_issue_ui.inc | 4 +-- manufacturing/inquiry/bom_cost_inquiry.php | 2 +- manufacturing/manage/bom_edit.php | 8 ++--- manufacturing/manage/work_centres.php | 4 +-- manufacturing/search_work_orders.php | 2 +- manufacturing/view/wo_issue_view.php | 8 ++--- manufacturing/view/wo_production_view.php | 4 +-- manufacturing/work_order_add_finished.php | 2 +- manufacturing/work_order_costs.php | 2 +- manufacturing/work_order_entry.php | 2 +- manufacturing/work_order_issue.php | 2 +- manufacturing/work_order_release.php | 2 +- purchasing/includes/ui/grn_ui.inc | 4 +-- purchasing/includes/ui/invoice_ui.inc | 24 ++++++--------- purchasing/includes/ui/po_ui.inc | 11 +++---- purchasing/inquiry/po_search.php | 2 +- purchasing/inquiry/po_search_completed.php | 2 +- .../inquiry/supplier_allocation_inquiry.php | 2 +- purchasing/inquiry/supplier_inquiry.php | 6 ++-- purchasing/manage/suppliers.php | 6 ++-- purchasing/po_entry_items.php | 2 +- purchasing/po_receive_items.php | 4 +-- purchasing/supplier_payment.php | 4 +-- purchasing/view/view_grn.php | 2 +- purchasing/view/view_po.php | 8 ++--- purchasing/view/view_supp_credit.php | 4 +-- purchasing/view/view_supp_invoice.php | 4 +-- purchasing/view/view_supp_payment.php | 2 +- reporting/includes/reports_classes.inc | 2 +- sales/create_recurrent_invoices.php | 2 +- sales/credit_note_entry.php | 2 +- sales/customer_credit_invoice.php | 22 +++++++------- sales/customer_delivery.php | 10 +++---- sales/customer_invoice.php | 6 ++-- sales/customer_payments.php | 4 +-- sales/includes/ui/sales_credit_ui.inc | 20 ++++++------- sales/includes/ui/sales_order_ui.inc | 14 ++++----- sales/inquiry/customer_allocation_inquiry.php | 2 +- sales/inquiry/customer_inquiry.php | 6 ++-- sales/inquiry/sales_deliveries_view.php | 2 +- sales/inquiry/sales_orders_view.php | 2 +- sales/manage/credit_status.php | 4 +-- sales/manage/customer_branches.php | 2 +- sales/manage/customers.php | 4 +-- sales/manage/recurrent_invoices.php | 4 +-- sales/manage/sales_areas.php | 4 +-- sales/manage/sales_groups.php | 4 +-- sales/manage/sales_people.php | 4 +-- sales/manage/sales_points.php | 4 +-- sales/manage/sales_types.php | 4 +-- sales/sales_order_entry.php | 2 +- sales/view/view_credit.php | 10 +++---- sales/view/view_dispatch.php | 12 ++++---- sales/view/view_invoice.php | 12 ++++---- sales/view/view_receipt.php | 2 +- sales/view/view_sales_order.php | 12 ++++---- taxes/item_tax_types.php | 6 ++-- taxes/tax_groups.php | 6 ++-- taxes/tax_types.php | 4 +-- themes/aqua/renderer.php | 4 --- themes/cool/renderer.php | 4 --- themes/default/renderer.php | 4 --- 141 files changed, 338 insertions(+), 387 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 16183903..23f7c459 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +14-Apr-2010 Joe Hunt +! Replaced the global variables for table styles to defined CSS classes. +$ all files that includes the call to start_table and start_outer_table + 14-Apr-2010 Joe Hunt/ AVB3 + Added 'View Attachments' if any in all popup view windows $ /admin/db/attachments_db.inc diff --git a/access/login.php b/access/login.php index 0c77bc80..c60819a9 100644 --- a/access/login.php +++ b/access/login.php @@ -66,7 +66,7 @@ function set_fullmode() { div_start('_page_body'); br();br(); start_form(false, false, $_SESSION['timeout']['uri'], "loginform"); - start_table("class='login'"); + start_table(false, "class='login'"); start_row(); echo ""; if (!$login_timeout) { // FA logo diff --git a/admin/attachments.php b/admin/attachments.php index ce4498f6..34ae4c46 100644 --- a/admin/attachments.php +++ b/admin/attachments.php @@ -146,7 +146,7 @@ function viewing_controls() { start_form(); - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); systypes_list_row(_("Type:"), 'filterType', null, true); @@ -157,14 +157,12 @@ function viewing_controls() function display_rows($type) { - global $table_style; - $rows = get_attached_documents($type); $th = array(_("#"), _("Description"), _("Filename"), _("Size"), _("Filetype"), _("Date Uploaded"), "", "", "", ""); div_start('transactions'); start_form(); - start_table($table_style); + start_table(TABLESTYLE); table_header($th); $k = 0; while ($row = db_fetch($rows)) @@ -198,7 +196,7 @@ if (isset($_POST['filterType'])) start_form(true); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/admin/backups.php b/admin/backups.php index 9f6efa55..4011a2a5 100644 --- a/admin/backups.php +++ b/admin/backups.php @@ -159,7 +159,7 @@ if (get_post('upload')) } //------------------------------------------------------------------------------- start_form(true, true); -start_outer_table($table_style2); +start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Create backup")); textarea_row(_("Comments:"), 'comments', null, 30, 8); diff --git a/admin/change_current_user_password.php b/admin/change_current_user_password.php index 29112d03..247517a2 100644 --- a/admin/change_current_user_password.php +++ b/admin/change_current_user_password.php @@ -66,7 +66,7 @@ if (isset($_POST['UPDATE_ITEM'])) start_form(); -start_table($table_style); +start_table(TABLESTYLE); $myrow = get_user($_SESSION["wa_current_user"]->user); diff --git a/admin/company_preferences.php b/admin/company_preferences.php index bc550789..74a9faec 100644 --- a/admin/company_preferences.php +++ b/admin/company_preferences.php @@ -153,7 +153,7 @@ if ($_POST['add_pct'] == -1) $_POST['round_to'] = $myrow['round_to']; $_POST['del_coy_logo'] = 0; -start_outer_table($table_style2); +start_outer_table(TABLESTYLE2); table_section(1); diff --git a/admin/create_coy.php b/admin/create_coy.php index aa765395..1ee6d400 100644 --- a/admin/create_coy.php +++ b/admin/create_coy.php @@ -243,7 +243,7 @@ function handle_delete() function display_companies() { - global $table_style, $def_coy, $db_connections; + global $def_coy, $db_connections; $coyno = $_SESSION["wa_current_user"]->company; @@ -255,7 +255,7 @@ function display_companies() document.location.replace('create_coy.php?c=df&id='+id) } "; - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Company"), _("Database Host"), _("Database User"), _("Database Name"), _("Table Pref"), _("Default"), "", ""); @@ -302,7 +302,7 @@ function display_companies() function display_company_edit($selected_id) { - global $def_coy, $db_connections, $tb_pref_counter, $table_style2; + global $def_coy, $db_connections, $tb_pref_counter; if ($selected_id != -1) $n = $selected_id; @@ -324,7 +324,7 @@ function display_company_edit($selected_id) } "; - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/admin/display_prefs.php b/admin/display_prefs.php index 78809c0c..0e208491 100644 --- a/admin/display_prefs.php +++ b/admin/display_prefs.php @@ -60,7 +60,7 @@ if (isset($_POST['setprefs'])) start_form(); -start_outer_table($table_style2); +start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Decimal Places")); diff --git a/admin/fiscalyears.php b/admin/fiscalyears.php index bae4e4bb..6f307164 100644 --- a/admin/fiscalyears.php +++ b/admin/fiscalyears.php @@ -120,8 +120,6 @@ function handle_delete() function display_fiscalyears() { - global $table_style; - $company_year = get_company_pref('f_year'); $result = get_all_fiscalyears(); @@ -129,7 +127,7 @@ function display_fiscalyears() display_note(_("Warning: Deleting a fiscal year all transactions are removed and converted into relevant balances. This process is irreversible!"), 0, 0, "class='currentfg'"); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Fiscal Year Begin"), _("Fiscal Year End"), _("Closed"), "", ""); table_header($th); @@ -176,10 +174,10 @@ function display_fiscalyears() function display_fiscalyear_edit($selected_id) { - global $table_style2, $Mode; + global $Mode; start_form(); - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/admin/forms_setup.php b/admin/forms_setup.php index f282b92d..f0065576 100644 --- a/admin/forms_setup.php +++ b/admin/forms_setup.php @@ -38,7 +38,7 @@ if (isset($_POST['setprefs'])) start_form(); -start_outer_table($table_style2); +start_outer_table(TABLESTYLE2); $systypes = get_systypes(); table_section(1); diff --git a/admin/gl_setup.php b/admin/gl_setup.php index 7d3f23f1..997a2bda 100644 --- a/admin/gl_setup.php +++ b/admin/gl_setup.php @@ -71,8 +71,7 @@ if (isset($_POST['submit']) && can_process()) start_form(); -//start_outer_table("class='tablestyle'"); -start_outer_table($table_style2, 5); +start_outer_table(TABLESTYLE2); table_section(1); diff --git a/admin/inst_lang.php b/admin/inst_lang.php index ee44fdf4..858e13a6 100644 --- a/admin/inst_lang.php +++ b/admin/inst_lang.php @@ -123,7 +123,7 @@ function handle_delete() function display_languages() { - global $table_style, $installed_languages, $dflt_lang; + global $installed_languages, $dflt_lang; $lang = $_SESSION["language"]->code; @@ -135,7 +135,7 @@ function display_languages() document.location.replace('inst_lang.php?c=df&id='+id) } "; - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Language"), _("Name"), _("Encoding"), _("Right To Left"), _("Default"), "", ""); table_header($th); @@ -179,7 +179,7 @@ function display_languages() function display_language_edit($selected_id) { - global $installed_languages, $table_style2, $dflt_lang; + global $installed_languages, $dflt_lang; if ($selected_id != -1) $n = $selected_id; @@ -196,7 +196,7 @@ function display_language_edit($selected_id) } "; - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/admin/inst_module.php b/admin/inst_module.php index d8b00450..844244b7 100644 --- a/admin/inst_module.php +++ b/admin/inst_module.php @@ -188,9 +188,7 @@ function handle_delete() function display_extensions() { - global $table_style; - - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Name"),_("Tab"), _("Link text"), _("Folder"), _("Filename"), _("Access extensions"),"", ""); table_header($th); @@ -229,9 +227,7 @@ function display_extensions() function company_extensions($id) { - global $table_style; - - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Name"),_("Tab"), _("Link text"), _("Active")); @@ -271,12 +267,12 @@ function company_extensions($id) function display_ext_edit($selected_id) { - global $table_style2, $Mode; + global $Mode; $extensions = get_company_extensions(); - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != -1 && $extensions[$selected_id]['type'] == 'plugin') { diff --git a/admin/inst_upgrade.php b/admin/inst_upgrade.php index 670ecb15..49c97bbd 100644 --- a/admin/inst_upgrade.php +++ b/admin/inst_upgrade.php @@ -169,7 +169,7 @@ if (get_post('Upgrade')) } start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Version"), _("Description"), _("Sql file"), _("Install"), _("Force upgrade")); table_header($th); diff --git a/admin/payment_terms.php b/admin/payment_terms.php index a6aa77e7..4e07c6e4 100644 --- a/admin/payment_terms.php +++ b/admin/payment_terms.php @@ -107,7 +107,7 @@ if ($Mode == 'RESET') $result = get_payment_terms_all(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Description"), _("Following Month On"), _("Due After (Days)"), "", ""); inactive_control_column($th); table_header($th); @@ -151,7 +151,7 @@ end_table(1); //------------------------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); $day_in_following_month = $days_before_due = 0; if ($selected_id != -1) diff --git a/admin/print_profiles.php b/admin/print_profiles.php index f9972980..fb959dfb 100644 --- a/admin/print_profiles.php +++ b/admin/print_profiles.php @@ -144,7 +144,7 @@ while ($myrow = db_fetch($result)) { $prints[$myrow['report']] = $myrow['printer']; } -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Report Id"), _("Description"), _("Printer")); table_header($th); diff --git a/admin/printers.php b/admin/printers.php index 3334d6b7..8d11b726 100644 --- a/admin/printers.php +++ b/admin/printers.php @@ -80,7 +80,7 @@ if ($Mode == 'RESET') $result = get_all_printers(); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Name"), _("Description"), _("Host"), _("Printer Queue"),'',''); table_header($th); @@ -108,7 +108,7 @@ echo '
'; start_form(); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/admin/security_roles.php b/admin/security_roles.php index bce6661f..2727af4c 100644 --- a/admin/security_roles.php +++ b/admin/security_roles.php @@ -173,7 +173,7 @@ if (!isset($_POST['role']) || get_post('clone') || list_updated('role')) { start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); security_roles_list_cells(_("Role:"). " ", 'role', null, true, true, check_value('show_inactive')); $new_role = get_post('role')==''; @@ -191,13 +191,13 @@ if (find_submit('_Section')) { } //----------------------------------------------------------------------------------------------- div_start('details'); -start_table($table_style2); +start_table(TABLESTYLE2); text_row(_("Role name:"), 'name', null, 20, 22); text_row(_("Role description:"), 'description', null, 50, 52); record_status_list_row(_("Current status:"), 'inactive'); end_table(1); - start_table("$table_style width=40%"); + start_table(TABLESTYLE, "width=40%"); $k = $j = 0; //row colour counter $ext = $sec = $m = -1; diff --git a/admin/shipping_companies.php b/admin/shipping_companies.php index fa7b2641..cb994d3f 100644 --- a/admin/shipping_companies.php +++ b/admin/shipping_companies.php @@ -87,7 +87,7 @@ if ($Mode == 'RESET') $result = get_shippers(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Name"), _("Contact Person"), _("Phone Number"), _("Secondary Phone"), _("Address"), "", ""); inactive_control_column($th); table_header($th); @@ -113,7 +113,7 @@ end_table(1); //---------------------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/admin/system_diagnostics.php b/admin/system_diagnostics.php index 44cd37ce..4e554290 100644 --- a/admin/system_diagnostics.php +++ b/admin/system_diagnostics.php @@ -297,7 +297,7 @@ function tst_extconfig() } //------------------------------------------------------------------------------------------------- -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); $th = array(_("Test"), _('Test type'), _("Value"), _("Comments")); table_header($th); diff --git a/admin/tags.php b/admin/tags.php index f87d98d6..d6f46da9 100644 --- a/admin/tags.php +++ b/admin/tags.php @@ -124,7 +124,7 @@ if ($Mode == 'RESET') $result = get_tags($_POST['type'], check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Tag Name"), _("Tag Description"), "", ""); inactive_control_column($th); table_header($th); @@ -147,7 +147,7 @@ end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) // We've selected a tag { diff --git a/admin/users.php b/admin/users.php index 5737c0e6..9fde1d93 100644 --- a/admin/users.php +++ b/admin/users.php @@ -109,7 +109,7 @@ if ($Mode == 'RESET') $result = get_users(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("User login"), _("Full Name"), _("Phone"), _("E-mail"), _("Last Visit"), _("Access Level"), "", ""); @@ -153,7 +153,7 @@ while ($myrow = db_fetch($result)) inactive_control_row($th); end_table(1); //------------------------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); $_POST['email'] = ""; if ($selected_id != -1) diff --git a/admin/view_print_transaction.php b/admin/view_print_transaction.php index 65bc42d4..5a6d5738 100644 --- a/admin/view_print_transaction.php +++ b/admin/view_print_transaction.php @@ -47,7 +47,7 @@ function viewing_controls() { display_note(_("Only documents can be printed.")); - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); systypes_list_cells(_("Type:"), 'filterType', null, true); @@ -91,7 +91,6 @@ function check_valid_entries() function handle_search() { - global $table_style; if (check_valid_entries()==true) { $trans_ref = false; diff --git a/admin/void_transaction.php b/admin/void_transaction.php index 9fd0184b..0dcd918d 100644 --- a/admin/void_transaction.php +++ b/admin/void_transaction.php @@ -104,11 +104,9 @@ function exist_transaction($type, $type_no) function voiding_controls() { - global $table_style2; - start_form(); - start_table($table_style2); + start_table(TABLESTYLE2); systypes_list_row(_("Transaction Type:"), "filterType", null, true); diff --git a/dimensions/dimension_entry.php b/dimensions/dimension_entry.php index 0777c2a3..8ee8fb8a 100644 --- a/dimensions/dimension_entry.php +++ b/dimensions/dimension_entry.php @@ -223,7 +223,7 @@ if (isset($_POST['reopen'])) start_form(); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/dimensions/includes/dimensions_ui.inc b/dimensions/includes/dimensions_ui.inc index edff4b6d..925d0313 100644 --- a/dimensions/includes/dimensions_ui.inc +++ b/dimensions/includes/dimensions_ui.inc @@ -15,7 +15,7 @@ include_once($path_to_root . "/includes/ui.inc"); function display_dimension_balance($id, $from, $to) { - global $path_to_root, $table_style; + global $path_to_root; $result = get_dimension_balance_all($id, $from, $to); @@ -27,7 +27,7 @@ function display_dimension_balance($id, $from, $to) { display_heading2(_("Balance for this Dimension")); br(); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Account"), _("Debit"), _("Credit")); table_header($th); diff --git a/dimensions/inquiry/search_dimensions.php b/dimensions/inquiry/search_dimensions.php index 49c2dc0b..ccf72ada 100644 --- a/dimensions/inquiry/search_dimensions.php +++ b/dimensions/inquiry/search_dimensions.php @@ -67,7 +67,7 @@ if (isset($_GET["stock_id"])) start_form(false, false, $_SERVER['PHP_SELF'] ."?outstanding_only=$outstanding_only"); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("Reference:"), 'OrderNumber', '',null, '', true); diff --git a/dimensions/view/view_dimension.php b/dimensions/view/view_dimension.php index 98668027..28b16de1 100644 --- a/dimensions/view/view_dimension.php +++ b/dimensions/view/view_dimension.php @@ -49,7 +49,7 @@ if (strlen($myrow[0]) == 0) exit; } -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("#"), _("Reference"), _("Name"), _("Type"), _("Date"), _("Due Date")); table_header($th); @@ -74,7 +74,7 @@ if ($myrow["closed"] == true) start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); if (!isset($_POST['TransFromDate'])) diff --git a/gl/bank_account_reconcile.php b/gl/bank_account_reconcile.php index f59ee696..4fa56550 100644 --- a/gl/bank_account_reconcile.php +++ b/gl/bank_account_reconcile.php @@ -161,7 +161,7 @@ if (isset($_POST['Reconcile'])) { //------------------------------------------------------------------------------------------------ start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); bank_accounts_list_cells(_("Account:"), 'bank_account', null, true); @@ -194,7 +194,7 @@ echo "
"; div_start('summary'); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Reconcile Date"), _("Beginning
Balance"), _("Ending
Balance"), _("Account
Total"),_("Reconciled
Amount"), _("Difference")); table_header($th); diff --git a/gl/bank_transfer.php b/gl/bank_transfer.php index 7ec52cc8..5ed84c08 100644 --- a/gl/bank_transfer.php +++ b/gl/bank_transfer.php @@ -53,13 +53,13 @@ if (isset($_POST['_DatePaid_changed'])) { function gl_payment_controls() { - global $table_style2, $Refs; + global $Refs; $home_currency = get_company_currency(); start_form(); - start_outer_table($table_style2, 5); + start_outer_table(TABLESTYLE2); table_section(1); diff --git a/gl/gl_bank.php b/gl/gl_bank.php index b3b3345c..1c85bcca 100644 --- a/gl/gl_bank.php +++ b/gl/gl_bank.php @@ -272,7 +272,7 @@ start_form(); display_bank_header($_SESSION['pay_items']); -start_table("$table_style2 width=90%", 10); +start_table(TABLESTYLE2, "width=90%", 10); start_row(); echo ""; display_gl_items($_SESSION['pay_items']->trans_type==ST_BANKPAYMENT ? diff --git a/gl/gl_budget.php b/gl/gl_budget.php index 26c64862..585be9b4 100644 --- a/gl/gl_budget.php +++ b/gl/gl_budget.php @@ -59,7 +59,7 @@ start_form(); if (db_has_gl_accounts()) { $dim = get_company_pref('use_dimension'); - start_table($table_style2); + start_table(TABLESTYLE2); fiscalyears_list_row(_("Fiscal Year:"), 'fyear', null); gl_all_accounts_list_row(_("Account Code:"), 'account', null); if (!isset($_POST['dim1'])) @@ -84,7 +84,7 @@ if (db_has_gl_accounts()) submit_row('submit', _("Get"), true, '', '', true); end_table(1); div_start('budget_tbl'); - start_table($table_style2); + start_table(TABLESTYLE2); $showdims = (($dim == 1 && $_POST['dim1'] == 0) || ($dim == 2 && $_POST['dim1'] == 0 && $_POST['dim2'] == 0)); if ($showdims) diff --git a/gl/gl_journal.php b/gl/gl_journal.php index 035de8ac..bc3e15e9 100644 --- a/gl/gl_journal.php +++ b/gl/gl_journal.php @@ -321,7 +321,7 @@ start_form(); display_order_header($_SESSION['journal_items']); -start_table("$table_style2 width=90%", 10); +start_table(TABLESTYLE2, "width=90%", 10); start_row(); echo ""; display_gl_items(_("Rows"), $_SESSION['journal_items']); diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index 46408216..1c36613c 100644 --- a/gl/includes/ui/gl_bank_ui.inc +++ b/gl/includes/ui/gl_bank_ui.inc @@ -11,12 +11,12 @@ ***********************************************************************/ function display_bank_header(&$order) { - global $table_style2, $Ajax, $Refs; + global $Ajax, $Refs; $payment = $order->trans_type == ST_BANKPAYMENT; div_start('pmt_header'); - start_outer_table("width=90% $table_style2"); // outer table + start_outer_table(TABLESTYLE2, "width=90%"); // outer table table_section(1); @@ -111,14 +111,14 @@ function display_bank_header(&$order) function display_gl_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; $dim = get_company_pref('use_dimension'); $colspan = ($dim == 2 ? 4 : ($dim == 1 ? 3 : 2)); display_heading($title); div_start('items_table'); - start_table("$table_style colspan=7 width=95%"); + start_table(TABLESTYLE, "colspan=7 width=95%"); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", diff --git a/gl/includes/ui/gl_journal_ui.inc b/gl/includes/ui/gl_journal_ui.inc index 7d13dd45..f48e5178 100644 --- a/gl/includes/ui/gl_journal_ui.inc +++ b/gl/includes/ui/gl_journal_ui.inc @@ -16,11 +16,11 @@ include_once($path_to_root . "/includes/ui/items_cart.inc"); function display_order_header(&$Order) { - global $table_style2, $Ajax; + global $Ajax; $qes = has_quick_entries(QE_JOURNAL); $new = $Order->order_id==0; - start_outer_table("$table_style2 width=90%"); + start_outer_table(TABLESTYLE2, "width=90%"); table_section(1, $qes ? "20%" : ""); start_row(); @@ -71,14 +71,14 @@ function display_order_header(&$Order) function display_gl_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; display_heading($title); $dim = get_company_pref('use_dimension'); div_start('items_table'); - start_table("$table_style colspan=7 width=95%"); + start_table(TABLESTYLE, "colspan=7 width=95%"); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", _("Dimension")." 2", _("Debit"), _("Credit"), _("Memo"), ""); diff --git a/gl/inquiry/balance_sheet.php b/gl/inquiry/balance_sheet.php index 8fb0b676..22dee85c 100644 --- a/gl/inquiry/balance_sheet.php +++ b/gl/inquiry/balance_sheet.php @@ -114,7 +114,7 @@ function display_type ($type, $typename, $from, $to, $convert, $drilldown, $path function inquiry_controls() { - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); date_cells(_("As at:"), 'TransToDate'); submit_cells('Show',_("Show"),'','', 'default'); end_table(); @@ -125,7 +125,7 @@ function inquiry_controls() function display_balance_sheet() { - global $path_to_root, $table_style; + global $path_to_root; $from = begin_fiscalyear(); $to = $_POST['TransToDate']; @@ -140,7 +140,7 @@ function display_balance_sheet() div_start('balance_tbl'); - start_table("width=30% $table_style"); + start_table(TABLESTYLE, "width=30%"); if (!$drilldown) //Root Level { diff --git a/gl/inquiry/bank_inquiry.php b/gl/inquiry/bank_inquiry.php index c37e4184..dddc9b47 100644 --- a/gl/inquiry/bank_inquiry.php +++ b/gl/inquiry/bank_inquiry.php @@ -39,7 +39,7 @@ if (get_post('Show')) //------------------------------------------------------------------------------------------------ start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); bank_accounts_list_cells(_("Account:"), 'bank_account', null); @@ -62,7 +62,7 @@ div_start('trans_tbl'); $act = get_bank_account($_POST["bank_account"]); display_heading($act['bank_account_name']." - ".$act['bank_curr_code']); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Type"), _("#"), _("Reference"), _("Date"), _("Debit"), _("Credit"), _("Balance"), _("Person/Item"), ""); diff --git a/gl/inquiry/gl_account_inquiry.php b/gl/inquiry/gl_account_inquiry.php index 5612e363..8d414a54 100644 --- a/gl/inquiry/gl_account_inquiry.php +++ b/gl/inquiry/gl_account_inquiry.php @@ -61,12 +61,10 @@ if (!isset($_POST["amount_max"])) function gl_inquiry_controls() { - global $table_style2; - $dim = get_company_pref('use_dimension'); start_form(); - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); gl_all_accounts_list_cells(_("Account:"), 'account', null, false, false, "All Accounts"); date_cells(_("from:"), 'TransFromDate', '', null, -30); @@ -95,7 +93,7 @@ function gl_inquiry_controls() function show_results() { - global $path_to_root, $table_style, $systypes_array; + global $path_to_root, $systypes_array; if (!isset($_POST["account"])) $_POST["account"] = null; @@ -122,7 +120,7 @@ function show_results() input_num("amount_min") == 0 && input_num("amount_max") == 0; - start_table($table_style); + start_table(TABLESTYLE); $first_cols = array(_("Type"), _("#"), _("Date")); diff --git a/gl/inquiry/gl_trial_balance.php b/gl/inquiry/gl_trial_balance.php index 50ff2e3d..fbd23e94 100644 --- a/gl/inquiry/gl_trial_balance.php +++ b/gl/inquiry/gl_trial_balance.php @@ -39,7 +39,7 @@ function gl_inquiry_controls() { start_form(); - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); date_cells(_("From:"), 'TransFromDate', '', null, -30); date_cells(_("To:"), 'TransToDate'); @@ -55,10 +55,10 @@ function gl_inquiry_controls() function display_trial_balance() { - global $table_style, $path_to_root; + global $path_to_root; div_start('balance_tbl'); - start_table($table_style); + start_table(TABLESTYLE); $tableheader = " " . _("Account") . " " . _("Account Name") . " diff --git a/gl/inquiry/journal_inquiry.php b/gl/inquiry/journal_inquiry.php index 66b9aaf1..54dfa1c0 100644 --- a/gl/inquiry/journal_inquiry.php +++ b/gl/inquiry/journal_inquiry.php @@ -39,7 +39,7 @@ if (!isset($_POST['filterType'])) start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("Reference:"), 'Ref', '',null, _('Enter reference fragment or leave empty')); diff --git a/gl/inquiry/profit_loss.php b/gl/inquiry/profit_loss.php index d83dbf82..3af0e4a7 100644 --- a/gl/inquiry/profit_loss.php +++ b/gl/inquiry/profit_loss.php @@ -148,7 +148,7 @@ function Achieve($d1, $d2) function inquiry_controls() { - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); date_cells(_("From:"), 'TransFromDate', '', null, -30); date_cells(_("To:"), 'TransToDate'); @@ -171,7 +171,7 @@ function inquiry_controls() function display_profit_and_loss() { - global $path_to_root, $table_style, $sel; + global $path_to_root, $sel; $dim = get_company_pref('use_dimension'); $dimension = $dimension2 = 0; @@ -206,7 +206,7 @@ function display_profit_and_loss() div_start('pl_tbl'); - start_table("width=50% $table_style"); + start_table(TABLESTYLE, "width=50%"); $tableheader = " " . _("Group/Account Name") . " diff --git a/gl/inquiry/tax_inquiry.php b/gl/inquiry/tax_inquiry.php index 394963ab..6022fcd7 100644 --- a/gl/inquiry/tax_inquiry.php +++ b/gl/inquiry/tax_inquiry.php @@ -53,12 +53,9 @@ if (get_post('TransFromDate') == "" && get_post('TransToDate') == "") function tax_inquiry_controls() { - global $table_style2; - start_form(); - //start_table($table_style2); - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); date_cells(_("from:"), 'TransFromDate', '', null, -30); @@ -76,11 +73,11 @@ function tax_inquiry_controls() function show_results() { - global $path_to_root, $table_style; + global $path_to_root; /*Now get the transactions */ div_start('trans_tbl'); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Type"), _("Description"), _("Amount"), _("Outputs")."/"._("Inputs")); table_header($th); diff --git a/gl/manage/bank_accounts.php b/gl/manage/bank_accounts.php index 5ec75616..fa441ef0 100644 --- a/gl/manage/bank_accounts.php +++ b/gl/manage/bank_accounts.php @@ -97,7 +97,7 @@ if ($Mode == 'RESET') $result = get_bank_accounts(check_value('show_inactive')); start_form(); -start_table("$table_style width='80%'"); +start_table(TABLESTYLE, "width='80%'"); $th = array(_("Account Name"), _("Type"), _("Currency"), _("GL Account"), _("Bank"), _("Number"), _("Bank Address"), _("Dflt"), '',''); @@ -133,7 +133,7 @@ end_table(1); $is_editing = $selected_id != -1; -start_table($table_style2); +start_table(TABLESTYLE2); if ($is_editing) { diff --git a/gl/manage/currencies.php b/gl/manage/currencies.php index 856bc2b2..c040e173 100644 --- a/gl/manage/currencies.php +++ b/gl/manage/currencies.php @@ -134,12 +134,10 @@ function handle_delete() function display_currencies() { - global $table_style; - $company_currency = get_company_currency(); $result = get_currencies(check_value('show_inactive')); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Abbreviation"), _("Symbol"), _("Currency Name"), _("Hundredths name"), _("Country"), _("Auto update"), "", ""); inactive_control_column($th); @@ -183,9 +181,9 @@ function display_currencies() function display_currency_edit($selected_id) { - global $table_style2, $Mode; + global $Mode; - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != '') { diff --git a/gl/manage/exchange_rates.php b/gl/manage/exchange_rates.php index 05cbc04e..eaa0796f 100644 --- a/gl/manage/exchange_rates.php +++ b/gl/manage/exchange_rates.php @@ -101,7 +101,6 @@ function del_link($row) function display_rates($curr_code) { - global $table_style; } @@ -109,9 +108,9 @@ function display_rates($curr_code) function display_rate_edit() { - global $selected_id, $table_style2, $Ajax; + global $selected_id, $Ajax; - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != "") { diff --git a/gl/manage/gl_account_classes.php b/gl/manage/gl_account_classes.php index a2d8bda4..2e9bf09a 100644 --- a/gl/manage/gl_account_classes.php +++ b/gl/manage/gl_account_classes.php @@ -105,7 +105,7 @@ if ($Mode == 'RESET') $result = get_account_classes(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Class ID"), _("Class Name"), _("Class Type"), "", ""); if (isset($use_oldstyle_convert) && $use_oldstyle_convert == 1) $th[2] = _("Balance Sheet"); @@ -136,7 +136,7 @@ inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != "") { diff --git a/gl/manage/gl_account_types.php b/gl/manage/gl_account_types.php index 7cc32aa4..b399725c 100644 --- a/gl/manage/gl_account_types.php +++ b/gl/manage/gl_account_types.php @@ -118,7 +118,7 @@ if ($Mode == 'RESET') $result = get_account_types(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Group ID"), _("Group Name"), _("Subgroup Of"), _("Class Type"), "", ""); inactive_control_column($th); table_header($th); @@ -154,7 +154,7 @@ inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != "") { diff --git a/gl/manage/gl_accounts.php b/gl/manage/gl_accounts.php index 96ba6529..900bf366 100644 --- a/gl/manage/gl_accounts.php +++ b/gl/manage/gl_accounts.php @@ -188,7 +188,7 @@ start_form(); if (db_has_gl_accounts()) { - start_table("class = 'tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); gl_all_accounts_list_cells(null, 'AccountList', null, false, false, _('New account'), true, check_value('show_inactive')); @@ -202,7 +202,7 @@ if (db_has_gl_accounts()) } br(1); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_account != "") { diff --git a/gl/manage/gl_quick_entries.php b/gl/manage/gl_quick_entries.php index 555c0888..d5d0ef34 100644 --- a/gl/manage/gl_quick_entries.php +++ b/gl/manage/gl_quick_entries.php @@ -174,7 +174,7 @@ if ($Mode2 == 'RESET2') $result = get_quick_entries(); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Description"), _("Type"), "", ""); table_header($th); @@ -200,7 +200,7 @@ if (list_updated('type') || (isset($_POST['bal_type']) && list_updated('bal_type } start_form(); div_start('qe'); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { @@ -245,7 +245,7 @@ if ($selected_id != -1) display_heading(_("Quick Entry Lines") . " - " . $_POST['description']); $result = get_quick_entry_lines($selected_id); start_form(); - start_table($table_style2); + start_table(TABLESTYLE2); $dim = get_company_pref('use_dimension'); if ($dim == 2) $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Dimension"), _("Dimension")." 2", "", ""); @@ -295,7 +295,7 @@ if ($selected_id != -1) start_form(); div_start('edit_line'); - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id2 != -1) { diff --git a/gl/view/bank_transfer_view.php b/gl/view/bank_transfer_view.php index a2e0da4b..5d0d0a02 100644 --- a/gl/view/bank_transfer_view.php +++ b/gl/view/bank_transfer_view.php @@ -61,7 +61,7 @@ if ($from_trans['bank_curr_code'] != $to_trans['bank_curr_code']) display_heading($systypes_array[ST_BANKTRANSFER] . " #$trans_no"); echo "
"; -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); start_row(); label_cells(_("From Bank Account"), $from_trans['bank_account_name'], "class='tableheader2'"); diff --git a/gl/view/gl_deposit_view.php b/gl/view/gl_deposit_view.php index 26da4d4f..949282b5 100644 --- a/gl/view/gl_deposit_view.php +++ b/gl/view/gl_deposit_view.php @@ -48,7 +48,7 @@ echo "
"; display_heading(_("GL Deposit") . " #$trans_no"); echo "
"; -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); if ($show_currencies) { @@ -93,7 +93,7 @@ else if ($show_currencies) display_heading2(_("Item Amounts are Shown in :") . " " . $company_currency); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $dim = get_company_pref('use_dimension'); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", _("Dimension")." 2", diff --git a/gl/view/gl_payment_view.php b/gl/view/gl_payment_view.php index 6b05b6d6..f9c3520d 100644 --- a/gl/view/gl_payment_view.php +++ b/gl/view/gl_payment_view.php @@ -46,7 +46,7 @@ if ($from_trans['bank_curr_code'] != $company_currency) display_heading(_("GL Payment") . " #$trans_no"); echo "
"; -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); if ($show_currencies) { @@ -92,7 +92,7 @@ else display_heading2(_("Item Amounts are Shown in :") . " " . $company_currency); echo "
"; - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $dim = get_company_pref('use_dimension'); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", _("Dimension")." 2", diff --git a/gl/view/gl_trans_view.php b/gl/view/gl_trans_view.php index 14d1bd13..11b4082b 100644 --- a/gl/view/gl_trans_view.php +++ b/gl/view/gl_trans_view.php @@ -29,9 +29,9 @@ if (!isset($_GET['type_id']) || !isset($_GET['trans_no'])) function display_gl_heading($myrow) { - global $table_style, $systypes_array; + global $systypes_array; $trans_name = $systypes_array[$_GET['type_id']]; - start_table("$table_style width=95%"); + start_table(TABLESTYLE, "width=95%"); $th = array(_("General Ledger Transaction Details"), _("Reference"), _("Date"), _("Person/Item")); table_header($th); @@ -77,7 +77,7 @@ while ($myrow = db_fetch($result)) if (!$heading_shown) { display_gl_heading($myrow); - start_table("$table_style width=95%"); + start_table(TABLESTYLE, "width=95%"); table_header($th); $heading_shown = true; } diff --git a/includes/db_pager.inc b/includes/db_pager.inc index cf67659a..9e414aff 100644 --- a/includes/db_pager.inc +++ b/includes/db_pager.inc @@ -61,7 +61,6 @@ class db_pager { // $name is base name for pager controls function db_pager($sql, $name, $table = null, $page_len=0) { - global $table_style; $this->width = "95%"; if ($page_len == 0) $page_len = user_query_size(); $this->name = $name; diff --git a/includes/types.inc b/includes/types.inc index 352ddcc5..570f0c68 100644 --- a/includes/types.inc +++ b/includes/types.inc @@ -176,6 +176,12 @@ define('ANY_NUMERIC', -1); define('ALL_TEXT', ''); define('ALL_NUMERIC', -1); +//---------------------------------------------------------------------------------- +// Special class values for tables (start_table()) +define('TABLESTYLE', 1); +define('TABLESTYLE2', 2); +define('TABLESTYLE_NOBORDER', 3); + //---------------------------------------------------------------------------------- define('TAG_ACCOUNT', 1); diff --git a/includes/ui/allocation_cart.inc b/includes/ui/allocation_cart.inc index bd84f5cc..be0ebc58 100644 --- a/includes/ui/allocation_cart.inc +++ b/includes/ui/allocation_cart.inc @@ -249,13 +249,13 @@ class allocation_item function show_allocatable($show_totals) { - global $table_style, $systypes_array; + global $systypes_array; $k = $counter = $total_allocated = 0; if (count($_SESSION['alloc']->allocs)) { - start_table("$table_style width=60%"); + start_table(TABLESTYLE, "width=60%"); $th = array(_("Transaction Type"), _("#"), _("Date"), _("Due Date"), _("Amount"), _("Other Allocations"), _("This Allocation"), _("Left to Allocate"),'',''); table_header($th); diff --git a/includes/ui/db_pager_view.inc b/includes/ui/db_pager_view.inc index d941cf90..e8718c63 100644 --- a/includes/ui/db_pager_view.inc +++ b/includes/ui/db_pager_view.inc @@ -40,7 +40,7 @@ function navi_button_cell($name, $value, $enabled=true, $align='left') { // Sql paged table view. Call this function inside form. // function display_db_pager(&$pager) { - global $table_style, $use_popup_windows, $use_date_picker, $path_to_root; + global $use_popup_windows, $use_date_picker, $path_to_root; $pager->select_records(); @@ -61,7 +61,7 @@ function display_db_pager(&$pager) { } } /* show a table of records returned by the sql */ - start_table("$table_style width=$pager->width"); + start_table(TABLESTYLE, "width=$pager->width"); table_header($headers); if($pager->header_fun) { // if set header handler diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index 34c0431a..6a43115f 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -59,9 +59,15 @@ function end_form($breaks=0) echo "\n"; } -function start_table($extra="", $padding='2', $spacing='0') +function start_table($class=false, $extra="", $padding='2', $spacing='0') { echo "
\n"; @@ -74,11 +80,11 @@ function end_table($breaks=0) br($breaks); } -function start_outer_table($extra="", $padding='2', $spacing='0', $br=false) +function start_outer_table($class=false, $extra="", $padding='2', $spacing='0', $br=false) { if ($br) br(); - start_table($extra, $padding, $spacing); + start_table($class, $extra, $padding, $spacing); echo "\n"; // outer table } @@ -147,7 +153,7 @@ function hyperlink_back($center=true, $no_menu=true, $type_no=0, $trans_no=0) { if ($center) echo "
"; - start_table("width=30%"); + start_table(false, "width=30%"); start_row(); if ($no_menu) { diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index fe54a261..19e94b3e 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -283,13 +283,12 @@ function exchange_rate_display($from_currency, $to_currency, $date_, $edit_rate= function is_voided_display($type, $id, $label) { - global $table_style; $void_entry = get_voided_entry($type, $id); if ($void_entry == null) return false; - start_table("width=50% $table_style"); + start_table(TABLESTYLE, "width=50%"); echo "$label
"; echo "" . _("Date Voided:") . " " . sql2date($void_entry["date_"]) . "
"; if (strlen($void_entry["memo_"]) > 0) @@ -440,14 +439,14 @@ function display_footer_exit() function display_allocations($alloc_result, $total) { - global $table_style, $systypes_array; + global $systypes_array; if (!$alloc_result || db_num_rows($alloc_result) == 0) return; display_heading2(_("Allocations")); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array( _("Type"), _("Number"), _("Date"), _("Total Amount"), _("Left to Allocate"), _("This Allocation")); diff --git a/inventory/adjustments.php b/inventory/adjustments.php index 51b097be..205a3cb2 100644 --- a/inventory/adjustments.php +++ b/inventory/adjustments.php @@ -223,7 +223,7 @@ start_form(); display_order_header($_SESSION['adj_items']); -start_outer_table("$table_style width=70%", 10); +start_outer_table(TABLESTYLE, "width=70%", 10); display_adjustment_items(_("Adjustment Items"), $_SESSION['adj_items']); adjustment_options_controls(); diff --git a/inventory/cost_update.php b/inventory/cost_update.php index 088cad58..03db733e 100644 --- a/inventory/cost_update.php +++ b/inventory/cost_update.php @@ -102,7 +102,7 @@ hidden("OldMaterialCost", $myrow["material_cost"]); hidden("OldLabourCost", $myrow["labour_cost"]); hidden("OldOverheadCost", $myrow["overhead_cost"]); -start_table($table_style2); +start_table(TABLESTYLE2); $dec1 = $dec2 = $dec3 = 0; $_POST['material_cost'] = price_decimal_format($myrow["material_cost"], $dec1); $_POST['labour_cost'] = price_decimal_format($myrow["labour_cost"], $dec2); diff --git a/inventory/includes/item_adjustments_ui.inc b/inventory/includes/item_adjustments_ui.inc index cfe697fa..f7af3dad 100644 --- a/inventory/includes/item_adjustments_ui.inc +++ b/inventory/includes/item_adjustments_ui.inc @@ -26,9 +26,9 @@ function add_to_order(&$order, $new_item, $new_item_qty, $standard_cost) function display_order_header(&$order) { - global $table_style2, $Refs; + global $Refs; - start_outer_table("width=70% $table_style2"); // outer table + start_outer_table(TABLESTYLE2, "width=70%"); // outer table table_section(1); locations_list_row(_("Location:"), 'StockLocation', null); @@ -54,11 +54,11 @@ function display_order_header(&$order) function display_adjustment_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; display_heading($title); div_start('items_table'); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Unit Cost"), _("Total"), ""); if ( count($order->line_items)) $th[] = ''; diff --git a/inventory/includes/stock_transfers_ui.inc b/inventory/includes/stock_transfers_ui.inc index 33df8fde..474fc9df 100644 --- a/inventory/includes/stock_transfers_ui.inc +++ b/inventory/includes/stock_transfers_ui.inc @@ -26,9 +26,9 @@ function add_to_order(&$order, $new_item, $new_item_qty, $standard_cost) function display_order_header(&$order) { - global $table_style, $Refs; + global $Refs; - start_outer_table("width=70% $table_style"); + start_outer_table(TABLESTYLE, "width=70%"); table_section(1); @@ -52,11 +52,11 @@ function display_order_header(&$order) function display_transfer_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; display_heading($title); div_start('items_table'); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), ''); if ( count($order->line_items)) $th[] = ''; table_header($th); diff --git a/inventory/inquiry/stock_movements.php b/inventory/inquiry/stock_movements.php index e8f6a257..020ab3f4 100644 --- a/inventory/inquiry/stock_movements.php +++ b/inventory/inquiry/stock_movements.php @@ -44,7 +44,7 @@ start_form(); if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); stock_items_list_cells(_("Item:"), 'stock_id', $_POST['stock_id']); @@ -66,7 +66,7 @@ $result = get_stock_movements($_POST['stock_id'], $_POST['StockLocation'], $_POST['BeforeDate'], $_POST['AfterDate']); div_start('doc_tbl'); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Type"), _("#"), _("Reference"), _("Date"), _("Detail"), _("Quantity In"), _("Quantity Out"), _("Quantity On Hand")); diff --git a/inventory/inquiry/stock_status.php b/inventory/inquiry/stock_status.php index d3d8781a..1ccbca0d 100644 --- a/inventory/inquiry/stock_status.php +++ b/inventory/inquiry/stock_status.php @@ -58,7 +58,7 @@ if (is_service($mb_flag)) $loc_details = get_loc_details($_POST['stock_id']); -start_table($table_style); +start_table(TABLESTYLE); if ($kitset_or_service == true) { diff --git a/inventory/manage/item_categories.php b/inventory/manage/item_categories.php index d8dbb69e..b52d67c8 100644 --- a/inventory/manage/item_categories.php +++ b/inventory/manage/item_categories.php @@ -94,7 +94,7 @@ if (list_updated('mb_flag')) { $result = get_item_categories(check_value('show_inactive')); start_form(); -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); $th = array(_("Name"), _("Tax type"), _("Units"), _("Type"), _("Sales Act"), _("Inventory Account"), _("COGS Account"), _("Adjustment Account"), _("Assembly Account"), "", ""); @@ -129,7 +129,7 @@ echo '
'; //---------------------------------------------------------------------------------- div_start('details'); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/inventory/manage/item_codes.php b/inventory/manage/item_codes.php index d26f6f41..d423b921 100644 --- a/inventory/manage/item_codes.php +++ b/inventory/manage/item_codes.php @@ -117,7 +117,7 @@ $dflt_cat = $result['category_id']; $result = get_all_item_codes($_POST['stock_id']); div_start('code_table'); - start_table("$table_style width=60%"); + start_table(TABLESTYLE, "width=60%"); $th = array(_("EAN/UPC Code"), _("Quantity"), _("Units"), _("Description"),_("Category"), "", ""); @@ -169,7 +169,7 @@ if ($selected_id != '') { } echo "
"; -start_table($table_style2); +start_table(TABLESTYLE2); hidden('code_id', $selected_id); diff --git a/inventory/manage/item_units.php b/inventory/manage/item_units.php index 9a23f645..fa63bbe5 100644 --- a/inventory/manage/item_units.php +++ b/inventory/manage/item_units.php @@ -90,7 +90,7 @@ if ($Mode == 'RESET') $result = get_all_item_units(check_value('show_inactive')); start_form(); -start_table("$table_style width=40%"); +start_table(TABLESTYLE, "width=40%"); $th = array(_('Unit'), _('Description'), _('Decimals'), "", ""); inactive_control_column($th); @@ -117,7 +117,7 @@ end_table(1); //---------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != '') { diff --git a/inventory/manage/items.php b/inventory/manage/items.php index 900641ec..0793bb38 100644 --- a/inventory/manage/items.php +++ b/inventory/manage/items.php @@ -245,7 +245,7 @@ start_form(true); if (db_has_stock_items()) { - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); stock_items_list_cells(_("Select an item:"), 'stock_id', null, _('New item'), true, check_value('show_inactive')); @@ -261,7 +261,7 @@ if (db_has_stock_items()) } div_start('details'); -start_outer_table($table_style2, 5); +start_outer_table(TABLESTYLE2); table_section(1); diff --git a/inventory/manage/locations.php b/inventory/manage/locations.php index 1deb1f20..0bae7585 100644 --- a/inventory/manage/locations.php +++ b/inventory/manage/locations.php @@ -142,7 +142,7 @@ if ($Mode == 'RESET') $result = get_item_locations(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Location Code"), _("Location Name"), _("Address"), _("Phone"), _("Secondary Phone"), "", ""); inactive_control_column($th); table_header($th); @@ -168,7 +168,7 @@ end_table(); echo '
'; -start_table($table_style2); +start_table(TABLESTYLE2); $_POST['email'] = ""; if ($selected_id != -1) diff --git a/inventory/manage/movement_types.php b/inventory/manage/movement_types.php index edec494b..e7086f94 100644 --- a/inventory/manage/movement_types.php +++ b/inventory/manage/movement_types.php @@ -90,7 +90,7 @@ if ($Mode == 'RESET') $result = get_all_movement_type(check_value('show_inactive')); start_form(); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Description"), "", ""); inactive_control_column($th); @@ -112,7 +112,7 @@ end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/inventory/manage/sales_kits.php b/inventory/manage/sales_kits.php index 16a78f87..2aef8e8b 100644 --- a/inventory/manage/sales_kits.php +++ b/inventory/manage/sales_kits.php @@ -34,11 +34,9 @@ if (isset($_GET['item_code'])) //-------------------------------------------------------------------------------------------------- function display_kit_items($selected_kit) { - global $table_style; - $result = get_item_kit($selected_kit); -div_start('bom'); - start_table("$table_style width=60%"); + div_start('bom'); + start_table(TABLESTYLE, "width=60%"); $th = array(_("Stock Item"), _("Description"), _("Quantity"), _("Units"), '',''); table_header($th); @@ -197,14 +195,14 @@ $selected_kit = $_POST['item_code']; //---------------------------------------------------------------------------------- if (get_post('item_code') == '') { // New sales kit entry - start_table($table_style2); + start_table(TABLESTYLE2); text_row(_("Alias/kit code:"), 'kit_code', null, 20, 21); } else { // Kit selected so display bom or edit component $_POST['description'] = $props['description']; $_POST['category'] = $props['category_id']; - start_table($table_style2); + start_table(TABLESTYLE2); text_row(_("Description:"), 'description', null, 50, 200); stock_categories_list_row(_("Category:"), 'category', null); submit_row('update_name', _("Update"), false, 'align=center colspan=2', _('Update kit/alias name'), true); @@ -212,7 +210,7 @@ if (get_post('item_code') == '') { end_table(1); display_kit_items($selected_kit); echo '
'; - start_table($table_style2); + start_table(TABLESTYLE2); } if ($Mode == 'Edit') { diff --git a/inventory/prices.php b/inventory/prices.php index 8666a05f..dfac2aa5 100644 --- a/inventory/prices.php +++ b/inventory/prices.php @@ -128,7 +128,7 @@ if (list_updated('stock_id') || isset($_POST['_curr_abrev_update']) || isset($_P $prices_list = get_prices($_POST['stock_id']); div_start('price_table'); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Currency"), _("Sales Type"), _("Price"), "", ""); table_header($th); @@ -169,7 +169,7 @@ if ($Mode == 'Edit') hidden('selected_id', $selected_id); div_start('price_details'); -start_table($table_style2); +start_table(TABLESTYLE2); currencies_list_row(_("Currency:"), 'curr_abrev', null, true); diff --git a/inventory/purchasing_data.php b/inventory/purchasing_data.php index 7bb09a54..f7b44c4d 100644 --- a/inventory/purchasing_data.php +++ b/inventory/purchasing_data.php @@ -122,7 +122,7 @@ else } else { - start_table("$table_style width=65%"); + start_table(TABLESTYLE, "width=65%"); $th = array(_("Supplier"), _("Price"), _("Currency"), _("Supplier's Unit"), _("Conversion Factor"), _("Supplier's Description"), "", ""); @@ -174,7 +174,7 @@ if ($Mode =='Edit') br(); hidden('selected_id', $selected_id); -start_table($table_style2); +start_table(TABLESTYLE2); if ($Mode == 'Edit') { diff --git a/inventory/reorder_level.php b/inventory/reorder_level.php index 787348a5..4e8f02c4 100644 --- a/inventory/reorder_level.php +++ b/inventory/reorder_level.php @@ -52,7 +52,7 @@ div_end(); set_global_stock_item($_POST['stock_id']); div_start('reorders'); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Location"), _("Quantity On Hand"), _("Re-Order Level")); table_header($th); diff --git a/inventory/transfers.php b/inventory/transfers.php index 9e6cbd85..26859e59 100644 --- a/inventory/transfers.php +++ b/inventory/transfers.php @@ -224,7 +224,7 @@ start_form(); display_order_header($_SESSION['transfer_items']); -start_table("$table_style width=70%", 10); +start_table(TABLESTYLE, "width=70%", 10); start_row(); echo ""; display_transfer_items(_("Items"), $_SESSION['transfer_items']); diff --git a/inventory/view/view_adjustment.php b/inventory/view/view_adjustment.php index 1d87892b..e5722c54 100644 --- a/inventory/view/view_adjustment.php +++ b/inventory/view/view_adjustment.php @@ -38,7 +38,7 @@ while ($adjustment = db_fetch($adjustment_items)) { $adjustment_type = get_movement_type($adjustment['person_id']) ; - start_table("$table_style2 width=90%"); + start_table(TABLESTYLE2, "width=90%"); start_row(); label_cells(_("At Location"), $adjustment['location_name'], "class='tableheader2'"); label_cells(_("Reference"), $adjustment['reference'], "class='tableheader2'", "colspan=6"); @@ -51,7 +51,7 @@ while ($adjustment = db_fetch($adjustment_items)) $header_shown = true; echo "
"; - start_table("$table_style width=90%"); + start_table(TABLESTYLE, "width=90%"); $th = array(_("Item"), _("Description"), _("Quantity"), _("Units"), _("Unit Cost")); diff --git a/inventory/view/view_transfer.php b/inventory/view/view_transfer.php index bf3e540b..86ad8bfa 100644 --- a/inventory/view/view_transfer.php +++ b/inventory/view/view_transfer.php @@ -33,7 +33,7 @@ $to_trans = $transfer_items[1]; display_heading($systypes_array[ST_LOCTRANSFER] . " #$trans_no"); echo "
"; -start_table("$table_style2 width=90%"); +start_table(TABLESTYLE2, "width=90%"); start_row(); label_cells(_("Item"), $from_trans['stock_id'] . " - " . $from_trans['description'], "class='tableheader2'"); @@ -49,10 +49,9 @@ end_row(); comments_display_row(ST_LOCTRANSFER, $trans_no); -end_table(1); +end_table(2); -echo "
"; -start_table("$table_style width=90%"); +start_table(TABLESTYLE, "width=90%"); $th = array(_("Item"), _("Description"), _("Quantity"), _("Units")); table_header($th); diff --git a/manufacturing/includes/manufacturing_ui.inc b/manufacturing/includes/manufacturing_ui.inc index 426356d9..f2cde17f 100644 --- a/manufacturing/includes/manufacturing_ui.inc +++ b/manufacturing/includes/manufacturing_ui.inc @@ -15,8 +15,6 @@ include_once($path_to_root . "/includes/ui.inc"); function display_bom($item_check) { - global $table_style; - $result = get_bom($item_check); if (db_num_rows($result) == 0) @@ -26,7 +24,7 @@ function display_bom($item_check) else { - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Component"), _("Description"), _("Work Centre"), _("From Location"), _("Quantity"), _("Unit Cost"), _("Total Cost")); @@ -70,7 +68,7 @@ function display_bom($item_check) function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null) { - global $table_style, $SysPrefs; + global $SysPrefs; $result = get_wo_requirements($woid); @@ -81,7 +79,7 @@ function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null) else { - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Component"), _("From Location"), _("Work Centre"), _("Unit Quantity"), _("Total Quantity"), _("Units Issued"), _("On Hand")); @@ -145,7 +143,7 @@ function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null) function display_wo_productions($woid) { - global $path_to_root, $table_style; + global $path_to_root; $result = get_work_order_productions($woid); @@ -155,7 +153,7 @@ function display_wo_productions($woid) } else { - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Reference"), _("Date"), _("Quantity")); table_header($th); @@ -188,7 +186,7 @@ function display_wo_productions($woid) function display_wo_issues($woid) { - global $path_to_root, $table_style; + global $path_to_root; $result = get_work_order_issues($woid); @@ -198,7 +196,7 @@ function display_wo_issues($woid) } else { - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Reference"), _("Date")); table_header($th); @@ -224,9 +222,8 @@ function display_wo_issues($woid) function display_wo_payments($woid) { - global $path_to_root, $table_style, $wo_cost_types; + global $path_to_root, $wo_cost_types; - //$result = get_bank_trans(null, null, PT_WORKORDER, $woid); $result = get_gl_wo_cost_trans($woid); if (db_num_rows($result) == 0) @@ -235,7 +232,7 @@ function display_wo_payments($woid) } else { - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Type"), _("Date"), _("Amount")); table_header($th); @@ -263,7 +260,7 @@ function display_wo_payments($woid) function display_wo_details($woid, $suppress_view_link=false) { - global $table_style, $wo_types_array; + global $wo_types_array; $myrow = get_work_order($woid); @@ -273,7 +270,7 @@ function display_wo_details($woid, $suppress_view_link=false) exit; } - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); if ($myrow["released"] == true) $th = array(_("#"), _("Reference"), _("Type"), _("Manufactured Item"), @@ -319,7 +316,7 @@ function display_wo_details($woid, $suppress_view_link=false) function display_wo_details_quick($woid, $suppress_view_link=false) { - global $table_style, $wo_types_array; + global $wo_types_array; $myrow = get_work_order($woid); @@ -329,7 +326,7 @@ function display_wo_details_quick($woid, $suppress_view_link=false) exit; } - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("#"), _("Reference"), _("Type"), _("Manufactured Item"), _("Into Location"), _("Date"), _("Quantity")); diff --git a/manufacturing/includes/work_order_issue_ui.inc b/manufacturing/includes/work_order_issue_ui.inc index 5924f2cc..dac556de 100644 --- a/manufacturing/includes/work_order_issue_ui.inc +++ b/manufacturing/includes/work_order_issue_ui.inc @@ -25,11 +25,11 @@ function add_to_issue(&$order, $new_item, $new_item_qty, $standard_cost) function display_issue_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; display_heading($title); div_start('items_table'); - start_table("$table_style width=80% colspan=7"); + start_table(TABLESTYLE, "width=80% colspan=7"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Unit Cost"), ''); if ( count($order->line_items)) $th[] = ''; diff --git a/manufacturing/inquiry/bom_cost_inquiry.php b/manufacturing/inquiry/bom_cost_inquiry.php index 9b311a7d..40612fe2 100644 --- a/manufacturing/inquiry/bom_cost_inquiry.php +++ b/manufacturing/inquiry/bom_cost_inquiry.php @@ -31,7 +31,7 @@ if (list_updated('stock_id')) $Ajax->activate('_page_body'); start_form(false, true); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); stock_manufactured_items_list_row(_("Select a manufacturable item:"), 'stock_id', null, false, true); end_table(); br(); diff --git a/manufacturing/manage/bom_edit.php b/manufacturing/manage/bom_edit.php index e963d563..1593ee28 100644 --- a/manufacturing/manage/bom_edit.php +++ b/manufacturing/manage/bom_edit.php @@ -64,11 +64,9 @@ else function display_bom_items($selected_parent) { - global $table_style; - $result = get_bom($selected_parent); div_start('bom'); - start_table("$table_style width=60%"); + start_table(TABLESTYLE, "width=60%"); $th = array(_("Code"), _("Description"), _("Location"), _("Work Centre"), _("Quantity"), _("Units"),'',''); table_header($th); @@ -167,7 +165,7 @@ if ($Mode == 'RESET') start_form(); start_form(false, true); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); stock_manufactured_items_list_row(_("Select a manufacturable item:"), 'stock_id', null, false, true); if (list_updated('stock_id')) $Ajax->activate('_page_body'); @@ -189,7 +187,7 @@ start_form(); //-------------------------------------------------------------------------------------- echo '
'; - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/manufacturing/manage/work_centres.php b/manufacturing/manage/work_centres.php index b9199690..10fcf365 100644 --- a/manufacturing/manage/work_centres.php +++ b/manufacturing/manage/work_centres.php @@ -97,7 +97,7 @@ if ($Mode == 'RESET') $result = get_all_work_centres(check_value('show_inactive')); start_form(); -start_table("$table_style width=50%"); +start_table(TABLESTYLE, "width=50%"); $th = array(_("Name"), _("description"), "", ""); inactive_control_column($th); table_header($th); @@ -120,7 +120,7 @@ inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/manufacturing/search_work_orders.php b/manufacturing/search_work_orders.php index f212a1a8..6d52e5f5 100644 --- a/manufacturing/search_work_orders.php +++ b/manufacturing/search_work_orders.php @@ -62,7 +62,7 @@ if (isset($_GET["stock_id"])) start_form(false, false, $_SERVER['PHP_SELF'] ."?outstanding_only=$outstanding_only"); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("Reference:"), 'OrderNumber', '',null, '', true); diff --git a/manufacturing/view/wo_issue_view.php b/manufacturing/view/wo_issue_view.php index 4c236516..63b815b6 100644 --- a/manufacturing/view/wo_issue_view.php +++ b/manufacturing/view/wo_issue_view.php @@ -36,12 +36,10 @@ if ($_GET['trans_no'] != "") function display_wo_issue($issue_no) { - global $table_style; - $myrow = get_work_order_issue($issue_no); br(1); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Issue #"), _("Reference"), _("For Work Order #"), _("Item"), _("From Location"), _("To Work Centre"), _("Date of Issue")); table_header($th); @@ -67,8 +65,6 @@ function display_wo_issue($issue_no) function display_wo_issue_details($issue_no) { - global $table_style; - $result = get_work_order_issue_details($issue_no); if (db_num_rows($result) == 0) @@ -77,7 +73,7 @@ function display_wo_issue_details($issue_no) } else { - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Component"), _("Quantity"), _("Units")); table_header($th); diff --git a/manufacturing/view/wo_production_view.php b/manufacturing/view/wo_production_view.php index c79983fb..e3aa2ef6 100644 --- a/manufacturing/view/wo_production_view.php +++ b/manufacturing/view/wo_production_view.php @@ -37,12 +37,10 @@ if ($_GET['trans_no'] != "") function display_wo_production($prod_id) { - global $table_style; - $myrow = get_work_order_produce($prod_id); br(1); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Production #"), _("Reference"), _("For Work Order #"), _("Item"), _("Quantity Manufactured"), _("Date")); table_header($th); diff --git a/manufacturing/work_order_add_finished.php b/manufacturing/work_order_add_finished.php index c23dc93f..953e863f 100644 --- a/manufacturing/work_order_add_finished.php +++ b/manufacturing/work_order_add_finished.php @@ -185,7 +185,7 @@ $dec = get_qty_dec($wo_details["stock_id"]); if (!isset($_POST['quantity']) || $_POST['quantity'] == '') $_POST['quantity'] = qty_format(max($wo_details["units_reqd"] - $wo_details["units_issued"], 0), $wo_details["stock_id"], $dec); -start_table($table_style2); +start_table(TABLESTYLE2); br(); ref_row(_("Reference:"), 'ref', '', $Refs->get_next(29)); diff --git a/manufacturing/work_order_costs.php b/manufacturing/work_order_costs.php index 2e72cf10..0603dc15 100644 --- a/manufacturing/work_order_costs.php +++ b/manufacturing/work_order_costs.php @@ -133,7 +133,7 @@ start_form(); hidden('selected_id', $_POST['selected_id']); //hidden('WOReqQuantity', $_POST['WOReqQuantity']); -start_table($table_style2); +start_table(TABLESTYLE2); br(); diff --git a/manufacturing/work_order_entry.php b/manufacturing/work_order_entry.php index d6bea933..aaba58d4 100644 --- a/manufacturing/work_order_entry.php +++ b/manufacturing/work_order_entry.php @@ -326,7 +326,7 @@ if (get_post('_type_update')) start_form(); -start_table($table_style2); +start_table(TABLESTYLE2); $existing_comments = ""; diff --git a/manufacturing/work_order_issue.php b/manufacturing/work_order_issue.php index 1b129f35..e126bf96 100644 --- a/manufacturing/work_order_issue.php +++ b/manufacturing/work_order_issue.php @@ -211,7 +211,7 @@ echo "
"; start_form(); -start_table("$table_style width=90%", 10); +start_table(TABLESTYLE, "width=90%", 10); echo ""; display_issue_items(_("Items to Issue"), $_SESSION['issue_items']); issue_options_controls(); diff --git a/manufacturing/work_order_release.php b/manufacturing/work_order_release.php index 0d58b749..edacd995 100644 --- a/manufacturing/work_order_release.php +++ b/manufacturing/work_order_release.php @@ -89,7 +89,7 @@ $_POST['memo_'] = ""; if (can_process($myrow)) { - start_table($table_style2); + start_table(TABLESTYLE2); label_row(_("Work Order #:"), $selected_id); label_row(_("Work Order Reference:"), $myrow["wo_ref"]); diff --git a/purchasing/includes/ui/grn_ui.inc b/purchasing/includes/ui/grn_ui.inc index 986d5a9f..cfb2f26c 100644 --- a/purchasing/includes/ui/grn_ui.inc +++ b/purchasing/includes/ui/grn_ui.inc @@ -13,8 +13,8 @@ function display_grn_summary(&$po, $editable=false) { - global $table_style2, $Refs; - start_table("$table_style2 width=90%"); + global $Refs; + start_table(TABLESTYLE2, "width=90%"); start_row(); label_cells(_("Supplier"), $po->supplier_name, "class='tableheader2'"); diff --git a/purchasing/includes/ui/invoice_ui.inc b/purchasing/includes/ui/invoice_ui.inc index bc03ee82..051e949e 100644 --- a/purchasing/includes/ui/invoice_ui.inc +++ b/purchasing/includes/ui/invoice_ui.inc @@ -55,13 +55,13 @@ function copy_to_trans(&$supp_trans) function invoice_header(&$supp_trans) { - global $Ajax, $table_style2, $Refs; + global $Ajax, $Refs; // if vars have been lost, recopy if (!isset($_POST['tran_date'])) copy_from_trans($supp_trans); - start_outer_table("width=95% $table_style2"); + start_outer_table(TABLESTYLE2, "width=95%"); table_section(1); @@ -137,13 +137,11 @@ function invoice_header(&$supp_trans) function invoice_totals(&$supp_trans) { - global $table_style, $table_style2; - copy_to_trans($supp_trans); $dim = get_company_pref('use_dimension'); $colspan = ($dim == 2 ? 7 : ($dim == 1 ? 6 : 5)); - start_table("$table_style width=95%"); + start_table(TABLESTYLE, "width=95%"); label_row(_("Sub-total:"), price_format( $supp_trans->ov_amount), "colspan=$colspan align=right", "align=right"); $taxes = $supp_trans->get_taxes($supp_trans->tax_group_id); @@ -158,7 +156,7 @@ function invoice_totals(&$supp_trans) $display_total, "colspan=$colspan align=right style='font-weight:bold;color:red;'", "nowrap align=right style='font-weight:bold;color:red;'"); end_table(1); - start_table($table_style2); + start_table(TABLESTYLE2); textarea_row(_("Memo:"), "Comments", null, 50, 3); end_table(1); } @@ -166,8 +164,6 @@ function invoice_totals(&$supp_trans) //-------------------------------------------------------------------------------------------------- function display_gl_controls(&$supp_trans, $k) { - global $table_style, $table_style2; - $accs = get_supplier_accounts($supp_trans->supplier_id); $_POST['gl_code'] = $accs['purchase_account']; @@ -199,7 +195,7 @@ function display_gl_controls(&$supp_trans, $k) function display_gl_items(&$supp_trans, $mode=0) { - global $table_style, $table_style2, $path_to_root, $Ajax; + global $path_to_root, $Ajax; // if displaying in form, and no items, exit if (($mode == 2 || $mode == 3) && count($supp_trans->gl_codes) == 0) @@ -210,7 +206,7 @@ function display_gl_items(&$supp_trans, $mode=0) else $heading = _("GL Items for this Credit Note"); - start_outer_table("$table_style width=95%"); + start_outer_table(TABLESTYLE, "width=95%"); if ($mode == 1) { @@ -240,7 +236,7 @@ function display_gl_items(&$supp_trans, $mode=0) end_outer_table(0, false); div_start('gl_items'); - start_table("$table_style width=95%"); + start_table(TABLESTYLE, "width=95%"); $dim = get_company_pref('use_dimension'); if ($dim == 2) @@ -318,8 +314,6 @@ function display_gl_items(&$supp_trans, $mode=0) function display_grn_items_for_selection(&$supp_trans, $k) { - global $table_style; - if ($supp_trans->is_invoice) $result = get_grn_items(0, $supp_trans->supplier_id, true); else @@ -407,7 +401,7 @@ function display_grn_items_for_selection(&$supp_trans, $k) function display_grn_items(&$supp_trans, $mode=0) { - global $table_style, $path_to_root; + global $path_to_root; $ret = true; // if displaying in form, and no items, exit @@ -460,7 +454,7 @@ function display_grn_items(&$supp_trans, $mode=0) end_outer_table(0, false); div_start('grn_items'); - start_table("$table_style width=95%"); + start_table(TABLESTYLE, "width=95%"); if ($mode == 1) { $th = array(_("Delivery"), _("Sequence #"), _("P.O."), _("Item"), _("Description"), diff --git a/purchasing/includes/ui/po_ui.inc b/purchasing/includes/ui/po_ui.inc index c862cca2..1e6f4f79 100644 --- a/purchasing/includes/ui/po_ui.inc +++ b/purchasing/includes/ui/po_ui.inc @@ -83,11 +83,11 @@ function create_new_po($trans_type, $trans_no) function display_po_header(&$order) { - global $table_style2, $Ajax, $Refs; + global $Ajax, $Refs; $editable = ($order->order_no == 0); - start_outer_table("width=80% $table_style2"); + start_outer_table(TABLESTYLE2, "width=80%"); table_section(1); if ($editable) @@ -190,12 +190,10 @@ function display_po_header(&$order) function display_po_items(&$order, $editable=true) { - global $table_style; - display_heading(_("Order Items")); div_start('items_table'); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Received"), _("Unit"), @@ -257,8 +255,7 @@ function display_po_items(&$order, $editable=true) function display_po_summary(&$po, $is_self=false, $editable=false) { - global $table_style; - start_table("$table_style width=90%"); + start_table(TABLESTYLE, "width=90%"); start_row(); label_cells(_("Reference"), $po->reference, "class='tableheader2'"); diff --git a/purchasing/inquiry/po_search.php b/purchasing/inquiry/po_search.php index e0108a40..54cb22ef 100644 --- a/purchasing/inquiry/po_search.php +++ b/purchasing/inquiry/po_search.php @@ -57,7 +57,7 @@ if (get_post('SearchOrders')) start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("#:"), 'order_number', '',null, '', true); diff --git a/purchasing/inquiry/po_search_completed.php b/purchasing/inquiry/po_search_completed.php index fad27dc5..c612639f 100644 --- a/purchasing/inquiry/po_search_completed.php +++ b/purchasing/inquiry/po_search_completed.php @@ -55,7 +55,7 @@ if (get_post('SearchOrders')) start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("#:"), 'order_number', '',null, '', true); diff --git a/purchasing/inquiry/supplier_allocation_inquiry.php b/purchasing/inquiry/supplier_allocation_inquiry.php index 14cb3290..eb7cedc1 100644 --- a/purchasing/inquiry/supplier_allocation_inquiry.php +++ b/purchasing/inquiry/supplier_allocation_inquiry.php @@ -42,7 +42,7 @@ start_form(); if (!isset($_POST['supplier_id'])) $_POST['supplier_id'] = get_global_supplier(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); supplier_list_cells(_("Select a supplier: "), 'supplier_id', $_POST['supplier_id'], true); diff --git a/purchasing/inquiry/supplier_inquiry.php b/purchasing/inquiry/supplier_inquiry.php index ea5c8384..645cbab8 100644 --- a/purchasing/inquiry/supplier_inquiry.php +++ b/purchasing/inquiry/supplier_inquiry.php @@ -41,7 +41,7 @@ start_form(); if (!isset($_POST['supplier_id'])) $_POST['supplier_id'] = get_global_supplier(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); supplier_list_cells(_("Select a supplier:"), 'supplier_id', null, true); @@ -61,8 +61,6 @@ set_global_supplier($_POST['supplier_id']); function display_supplier_summary($supplier_record) { - global $table_style; - $past1 = get_company_pref('past_due_days'); $past2 = 2 * $past1; $nowdue = "1-" . $past1 . " " . _('Days'); @@ -70,7 +68,7 @@ function display_supplier_summary($supplier_record) $pastdue2 = _('Over') . " " . $past2 . " " . _('Days'); - start_table("width=80% $table_style"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Currency"), _("Terms"), _("Current"), $nowdue, $pastdue1, $pastdue2, _("Total Balance")); diff --git a/purchasing/manage/suppliers.php b/purchasing/manage/suppliers.php index 398b2aca..b2fa6393 100644 --- a/purchasing/manage/suppliers.php +++ b/purchasing/manage/suppliers.php @@ -123,8 +123,8 @@ start_form(); if (db_has_suppliers()) { - start_table("", 3); -// start_table("class = 'tablestyle_noborder'"); + start_table(false, "", 3); +// start_table(TABLESTYLE_NOBORDER); start_row(); supplier_list_cells(_("Select a supplier: "), 'supplier_id', null, _('New supplier'), true, check_value('show_inactive')); @@ -141,7 +141,7 @@ else hidden('supplier_id', get_post('supplier_id')); } -start_outer_table($table_style2, 5); +start_outer_table(TABLESTYLE2); table_section(1); diff --git a/purchasing/po_entry_items.php b/purchasing/po_entry_items.php index 73cad845..3820d7ef 100644 --- a/purchasing/po_entry_items.php +++ b/purchasing/po_entry_items.php @@ -478,7 +478,7 @@ echo "
"; display_po_items($_SESSION['PO']); -start_table($table_style2); +start_table(TABLESTYLE2); textarea_row(_("Memo:"), 'Comments', null, 70, 4); end_table(1); diff --git a/purchasing/po_receive_items.php b/purchasing/po_receive_items.php index 5d3f28d1..90a9ffe5 100644 --- a/purchasing/po_receive_items.php +++ b/purchasing/po_receive_items.php @@ -53,10 +53,8 @@ if ((!isset($_GET['PONumber']) || $_GET['PONumber'] == 0) && !isset($_SESSION['P function display_po_receive_items() { - global $table_style; - div_start('grn_items'); - start_table("colspan=7 $table_style width=90%"); + start_table(TABLESTYLE, "colspan=7 width=90%"); $th = array(_("Item Code"), _("Description"), _("Ordered"), _("Units"), _("Received"), _("Outstanding"), _("This Delivery"), _("Price"), _("Total")); table_header($th); diff --git a/purchasing/supplier_payment.php b/purchasing/supplier_payment.php index 938c2a8d..2ceac5f3 100644 --- a/purchasing/supplier_payment.php +++ b/purchasing/supplier_payment.php @@ -249,7 +249,7 @@ if (isset($_POST['ProcessSuppPayment'])) start_form(); - start_outer_table("$table_style2 width=60%", 5); + start_outer_table(TABLESTYLE2, "width=60%", 5); table_section(1); @@ -285,7 +285,7 @@ start_form(); div_end(); } - start_table("$table_style width=60%"); + start_table(TABLESTYLE, "width=60%"); amount_row(_("Amount of Discount:"), 'discount'); amount_row(_("Amount of Payment:"), 'amount'); textarea_row(_("Memo:"), 'memo_', null, 22, 4); diff --git a/purchasing/view/view_grn.php b/purchasing/view/view_grn.php index 8336ff2c..19d07198 100644 --- a/purchasing/view/view_grn.php +++ b/purchasing/view/view_grn.php @@ -36,7 +36,7 @@ display_grn_summary($purchase_order); display_heading2(_("Line Details")); -start_table("colspan=9 $table_style width=90%"); +start_table(TABLESTYLE, "colspan=9 width=90%"); $th = array(_("Item Code"), _("Item Description"), _("Delivery Date"), _("Quantity"), _("Unit"), _("Price"), _("Line Total"), _("Quantity Invoiced")); diff --git a/purchasing/view/view_po.php b/purchasing/view/view_po.php index 04f50477..0c009493 100644 --- a/purchasing/view/view_po.php +++ b/purchasing/view/view_po.php @@ -35,12 +35,12 @@ read_po($_GET['trans_no'], $purchase_order); echo "
"; display_po_summary($purchase_order, true); -start_table("$table_style width=90%", 6); +start_table(TABLESTYLE, "width=90%", 6); echo ""; // outer table display_heading2(_("Line Details")); -start_table("colspan=9 $table_style width=100%"); +start_table(TABLESTYLE, "colspan=9 width=100%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), _("Line Total"), _("Requested By"), _("Quantity Received"), _("Quantity Invoiced")); @@ -101,7 +101,7 @@ if (db_num_rows($grns_result) > 0) echo ""; // outer table display_heading2(_("Deliveries")); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Reference"), _("Delivered On")); table_header($th); while ($myrow = db_fetch($grns_result)) @@ -126,7 +126,7 @@ if (db_num_rows($invoice_result) > 0) echo ""; // outer table display_heading2(_("Invoices/Credits")); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Date"), _("Total")); table_header($th); while ($myrow = db_fetch($invoice_result)) diff --git a/purchasing/view/view_supp_credit.php b/purchasing/view/view_supp_credit.php index 93134847..5c8ec92f 100644 --- a/purchasing/view/view_supp_credit.php +++ b/purchasing/view/view_supp_credit.php @@ -38,7 +38,7 @@ read_supp_invoice($trans_no, ST_SUPPCREDIT, $supp_trans); display_heading(_("SUPPLIER CREDIT NOTE") . " # " . $trans_no); echo "
"; -start_table($table_style2); +start_table(TABLESTYLE2); start_row(); label_cells(_("Supplier"), $supp_trans->supplier_name, "class='tableheader2'"); label_cells(_("Reference"), $supp_trans->reference, "class='tableheader2'"); @@ -57,7 +57,7 @@ $total_grn = display_grn_items($supp_trans, 2); $display_sub_tot = number_format2($total_gl+$total_grn,user_price_dec()); -start_table("$table_style width=95%"); +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); diff --git a/purchasing/view/view_supp_invoice.php b/purchasing/view/view_supp_invoice.php index 87b54f5d..0aa672fe 100644 --- a/purchasing/view/view_supp_invoice.php +++ b/purchasing/view/view_supp_invoice.php @@ -41,7 +41,7 @@ $supplier_curr_code = get_supplier_currency($supp_trans->supplier_id); display_heading(_("SUPPLIER INVOICE") . " # " . $trans_no); echo "
"; -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); start_row(); label_cells(_("Supplier"), $supp_trans->supplier_name, "class='tableheader2'"); label_cells(_("Reference"), $supp_trans->reference, "class='tableheader2'"); @@ -62,7 +62,7 @@ $total_grn = display_grn_items($supp_trans, 2); $display_sub_tot = number_format2($total_gl+$total_grn,user_price_dec()); -start_table("width=95% $table_style"); +start_table(TABLESTYLE, "width=95%"); label_row(_("Sub Total"), $display_sub_tot, "align=right", "nowrap align=right width=15%"); $tax_items = get_trans_tax_details(ST_SUPPINVOICE, $trans_no); diff --git a/purchasing/view/view_supp_payment.php b/purchasing/view/view_supp_payment.php index 4c6c45ad..f37d0a77 100644 --- a/purchasing/view/view_supp_payment.php +++ b/purchasing/view/view_supp_payment.php @@ -47,7 +47,7 @@ echo "
"; display_heading(_("Payment to Supplier") . " #$trans_no"); echo "
"; -start_table("$table_style2 width=80%"); +start_table(TABLESTYLE2, "width=80%"); start_row(); label_cells(_("To Supplier"), $receipt['supplier_name'], "class='tableheader2'"); diff --git a/reporting/includes/reports_classes.inc b/reporting/includes/reports_classes.inc index c824ddc3..9de492e2 100644 --- a/reporting/includes/reports_classes.inc +++ b/reporting/includes/reports_classes.inc @@ -47,7 +47,7 @@ class BoxReports function getDisplay($class=null) { - global $table_style, $path_to_root, $pdf_debug, $Ajax; + global $path_to_root, $pdf_debug, $Ajax; $temp = array_values($this->ar_classes); diff --git a/sales/create_recurrent_invoices.php b/sales/create_recurrent_invoices.php index f1bbe4b5..3ccbbff7 100644 --- a/sales/create_recurrent_invoices.php +++ b/sales/create_recurrent_invoices.php @@ -94,7 +94,7 @@ if (isset($_GET['recurrent'])) $result = get_recurrent_invoices(); -start_table("$table_style width=70%"); +start_table(TABLESTYLE, "width=70%"); $th = array(_("Description"), _("Template No"),_("Customer"),_("Branch")."/"._("Group"),_("Days"),_("Monthly"),_("Begin"),_("End"),_("Last Created"),""); table_header($th); $k = 0; diff --git a/sales/credit_note_entry.php b/sales/credit_note_entry.php index 7723936c..ff5a171e 100644 --- a/sales/credit_note_entry.php +++ b/sales/credit_note_entry.php @@ -264,7 +264,7 @@ hidden('cart_id'); $customer_error = display_credit_header($_SESSION['Items']); if ($customer_error == "") { - start_table("$table_style width=80%", 10); + start_table(TABLESTYLE, "width=80%", 10); echo ""; display_credit_items(_("Credit Note Items"), $_SESSION['Items']); credit_options_controls($_SESSION['Items']); diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index 5d6a3dbd..c86f82b3 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -233,15 +233,13 @@ if (isset($_POST['Location'])) { function display_credit_items() { - global $table_style, $table_style2; - start_form(); hidden('cart_id'); - start_table("$table_style2 width=80%", 5); + start_table(TABLESTYLE2, "width=80%", 5); echo ""; // outer table - start_table("$table_style width=100%"); + start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'"); label_cells(_("Branch"), get_branch_name($_SESSION['Items']->Branch), "class='tableheader2'"); @@ -274,7 +272,7 @@ function display_credit_items() echo "";// outer table - start_table("$table_style width=100%"); + start_table(TABLESTYLE, "width=100%"); label_row(_("Invoice Date"), $_SESSION['Items']->src_date, "class='tableheader2'"); @@ -287,7 +285,7 @@ function display_credit_items() end_table(1); // outer table div_start('credit_items'); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Invoiced Quantity"), _("Units"), _("Credit Quantity"), _("Price"), _("Discount %"), _("Total")); table_header($th); @@ -347,14 +345,14 @@ function display_credit_items() //----------------------------------------------------------------------------- function display_credit_options() { - global $table_style2, $Ajax; - echo "
"; + global $Ajax; + br(); -if (isset($_POST['_CreditType_update'])) - $Ajax->activate('options'); +i f (isset($_POST['_CreditType_update'])) + $Ajax->activate('options'); - div_start('options'); - start_table("$table_style2"); + div_start('options'); + start_table(TABLESTYLE2); credit_type_list_row(_("Credit Note Type"), 'CreditType', null, true); diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index c263ea06..408b5705 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -320,10 +320,10 @@ if (isset($_POST['Update']) || isset($_POST['_Location_update'])) { start_form(); hidden('cart_id'); -start_table("$table_style2 width=80%", 5); +start_table(TABLESTYLE2, "width=80%", 5); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'"); label_cells(_("Branch"), get_branch_name($_SESSION['Items']->Branch), "class='tableheader2'"); @@ -372,7 +372,7 @@ end_table(); echo "";// outer table -start_table("$table_style width=90%"); +start_table(TABLESTYLE, "width=90%"); if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) { $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->payment, $_POST['DispatchDate']); @@ -395,7 +395,7 @@ if ($row['dissallow_invoices'] == 1) } display_heading(_("Delivery Items")); div_start('Items'); -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); $new = $_SESSION['Items']->trans_no==0; $th = array(_("Item Code"), _("Item Description"), @@ -482,7 +482,7 @@ end_table(1); if ($has_marked) { display_note(_("Marked items have insufficient quantities in stock as on day of delivery."), 0, 1, "class='red'"); } -start_table($table_style2); +start_table(TABLESTYLE2); policy_list_row(_("Action For Balance"), "bo_policy", null); diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index 97859b3e..49976bbc 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -355,7 +355,7 @@ $is_edition = $_SESSION['Items']->trans_type == ST_SALESINVOICE && $_SESSION['It start_form(); hidden('cart_id'); -start_table("$table_style2 width=80%", 5); +start_table(TABLESTYLE2, "width=80%", 5); start_row(); label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'"); @@ -420,7 +420,7 @@ if ($row['dissallow_invoices'] == 1) display_heading(_("Invoice Items")); div_start('Items'); -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Delivered"), _("Units"), _("Invoiced"), _("This Invoice"), _("Price"), _("Tax Type"), _("Discount"), _("Total")); @@ -529,7 +529,7 @@ label_row(_("Invoice Total"), $display_total, "colspan=$colspan align=right","al end_table(1); div_end(); -start_table($table_style2); +start_table(TABLESTYLE2); textarea_row(_("Memo"), 'Comments', null, 50, 4); end_table(1); diff --git a/sales/customer_payments.php b/sales/customer_payments.php index 565d9f95..e8b51f99 100644 --- a/sales/customer_payments.php +++ b/sales/customer_payments.php @@ -213,7 +213,7 @@ function read_customer_data() start_form(); - start_outer_table("$table_style2 width=60%", 5); + start_outer_table(TABLESTYLE2, "width=60%", 5); table_section(1); customer_list_row(_("From Customer:"), 'customer_id', null, false, true); @@ -266,7 +266,7 @@ start_form(); div_end(); } - start_table("$table_style width=60%"); + start_table(TABLESTYLE, "width=60%"); label_row(_("Customer prompt payment discount :"), $display_discount_percent); amount_row(_("Amount of Discount:"), 'discount'); diff --git a/sales/includes/ui/sales_credit_ui.inc b/sales/includes/ui/sales_credit_ui.inc index 6f281c6f..78040725 100644 --- a/sales/includes/ui/sales_credit_ui.inc +++ b/sales/includes/ui/sales_credit_ui.inc @@ -15,9 +15,9 @@ include_once($path_to_root . "/includes/ui.inc"); function display_credit_header(&$order) { - global $table_style, $Ajax, $Refs; + global $Ajax, $Refs; - start_outer_table("width=80% $table_style"); + start_outer_table(TABLESTYLE, "width=80%"); table_section(1); $customer_error = ""; @@ -159,11 +159,11 @@ function display_credit_header(&$order) function display_credit_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; display_heading($title); div_start('items_table'); - start_table("$table_style width=90%"); + start_table(TABLESTYLE, "width=90%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), _("Discount %"), _("Total"),''); @@ -308,14 +308,14 @@ function credit_edit_item_controls(&$order, $rowcounter, $line_no=-1) function credit_options_controls($credit) { - global $table_style2, $Ajax; - echo "
"; + global $Ajax; + br(); -if (isset($_POST['_CreditType_update'])) - $Ajax->activate('options'); + if (isset($_POST['_CreditType_update'])) + $Ajax->activate('options'); - div_start('options'); - start_table("$table_style2"); + div_start('options'); + start_table(TABLESTYLE2); credit_type_list_row(_("Credit Note Type"), 'CreditType', null, true); diff --git a/sales/includes/ui/sales_order_ui.inc b/sales/includes/ui/sales_order_ui.inc index 9c6925f4..d2f20082 100644 --- a/sales/includes/ui/sales_order_ui.inc +++ b/sales/includes/ui/sales_order_ui.inc @@ -132,12 +132,12 @@ function get_customer_details_to_order(&$order, $customer_id, $branch_id) function display_order_summary($title, &$order, $editable_items=false) { - global $table_style, $path_to_root, $SysPrefs; + global $path_to_root, $SysPrefs; display_heading($title); div_start('items_table'); - start_table("$table_style colspan=7 width=90%"); + start_table(TABLESTYLE, "colspan=7 width=90%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Delivered"), _("Unit"), _("Price"), _("Discount %"), _("Total"), ""); @@ -252,9 +252,9 @@ function display_order_summary($title, &$order, $editable_items=false) function display_order_header(&$order, $editable, $date_text, $display_tax_group=false) { - global $table_style2, $Ajax, $SysPrefs; + global $Ajax, $SysPrefs; - start_outer_table("width=80% $table_style2"); + start_outer_table(TABLESTYLE2, "width=80%"); table_section(1); @@ -561,14 +561,14 @@ function sales_order_item_controls(&$order, &$rowcounter, $line_no=-1) function display_delivery_details(&$order) { - global $table_style2, $Ajax; + global $Ajax; div_start('delivery'); if ($order->cash) { // Direct payment sale $Ajax->activate('items_table'); display_heading(_('Cash payment')); - start_table("$table_style2 width=60%"); + start_table(TABLESTYLE2, "width=60%"); label_row(_("Deliver from Location:"), $order->location_name); hidden('Location', $order->Location); @@ -597,7 +597,7 @@ function display_delivery_details(&$order) $delname = _("Required Delivery Date").':'; } display_heading($title); - start_outer_table("$table_style2 width=90%"); + start_outer_table(TABLESTYLE2, "width=90%"); table_section(1); locations_list_row(_("Deliver from Location:"), 'Location', null, diff --git a/sales/inquiry/customer_allocation_inquiry.php b/sales/inquiry/customer_allocation_inquiry.php index 343e367e..f32bd6cb 100644 --- a/sales/inquiry/customer_allocation_inquiry.php +++ b/sales/inquiry/customer_allocation_inquiry.php @@ -36,7 +36,7 @@ if (!isset($_POST['customer_id'])) start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); customer_list_cells(_("Select a customer: "), 'customer_id', $_POST['customer_id'], true); diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index 8bd2d4c7..10aefa26 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -38,7 +38,7 @@ start_form(); if (!isset($_POST['customer_id'])) $_POST['customer_id'] = get_global_customer(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); customer_list_cells(_("Select a customer: "), 'customer_id', null, true); @@ -61,8 +61,6 @@ set_global_customer($_POST['customer_id']); 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) @@ -74,7 +72,7 @@ function display_customer_summary($customer_record) $pastdue1 = $past1 + 1 . "-" . $past2 . " " . _('Days'); $pastdue2 = _('Over') . " " . $past2 . " " . _('Days'); - start_table("width=80% $table_style"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Currency"), _("Terms"), _("Current"), $nowdue, $pastdue1, $pastdue2, _("Total Balance")); table_header($th); diff --git a/sales/inquiry/sales_deliveries_view.php b/sales/inquiry/sales_deliveries_view.php index da9002f3..73b3c4bb 100644 --- a/sales/inquiry/sales_deliveries_view.php +++ b/sales/inquiry/sales_deliveries_view.php @@ -98,7 +98,7 @@ if (get_post('_DeliveryNumber_changed')) start_form(false, false, $_SERVER['PHP_SELF'] ."?OutstandingOnly=".$_POST['OutstandingOnly']); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("#:"), 'DeliveryNumber', '',null, '', true); date_cells(_("from:"), 'DeliveryAfterDate', '', null, -30); diff --git a/sales/inquiry/sales_orders_view.php b/sales/inquiry/sales_orders_view.php index c60df3a4..e382fd24 100644 --- a/sales/inquiry/sales_orders_view.php +++ b/sales/inquiry/sales_orders_view.php @@ -220,7 +220,7 @@ if (get_post('_OrderNumber_changed')) // enable/disable selection controls start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("#:"), 'OrderNumber', '',null, '', true); if ($_POST['order_view_mode'] != 'DeliveryTemplates' && $_POST['order_view_mode'] != 'InvoiceTemplates') diff --git a/sales/manage/credit_status.php b/sales/manage/credit_status.php index 90fc179e..1706a9bc 100644 --- a/sales/manage/credit_status.php +++ b/sales/manage/credit_status.php @@ -93,7 +93,7 @@ if ($Mode == 'RESET') $result = get_all_credit_status(check_value('show_inactive')); start_form(); -start_table("$table_style width=40%"); +start_table(TABLESTYLE, "width=40%"); $th = array(_("Description"), _("Dissallow Invoices"),'',''); inactive_control_column($th); table_header($th); @@ -127,7 +127,7 @@ echo '
'; //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/sales/manage/customer_branches.php b/sales/manage/customer_branches.php index 135e54f0..d84f26b1 100644 --- a/sales/manage/customer_branches.php +++ b/sales/manage/customer_branches.php @@ -204,7 +204,7 @@ display_db_pager($table); else display_note(_("The selected customer does not have any branches. Please create at least one branch.")); -start_outer_table($table_style2, 5); +start_outer_table(TABLESTYLE2); table_section(1); diff --git a/sales/manage/customers.php b/sales/manage/customers.php index 32c6a880..fa757da2 100644 --- a/sales/manage/customers.php +++ b/sales/manage/customers.php @@ -165,7 +165,7 @@ start_form(); if (db_has_customers()) { - start_table("class = 'tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); customer_list_cells(_("Select a customer: "), 'customer_id', null, _('New customer'), true, check_value('show_inactive')); @@ -221,7 +221,7 @@ else $_POST['inactive'] = $myrow["inactive"]; } -start_outer_table($table_style2, 5); +start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Name and Address")); diff --git a/sales/manage/recurrent_invoices.php b/sales/manage/recurrent_invoices.php index dea4ef3f..a595815e 100644 --- a/sales/manage/recurrent_invoices.php +++ b/sales/manage/recurrent_invoices.php @@ -81,7 +81,7 @@ if ($Mode == 'RESET') $result = get_recurrent_invoices(); start_form(); -start_table("$table_style width=70%"); +start_table(TABLESTYLE, "width=70%"); $th = array(_("Description"), _("Template No"),_("Customer"),_("Branch")."/"._("Group"),_("Days"),_("Monthly"),_("Begin"),_("End"),_("Last Created"),"", ""); table_header($th); $k = 0; @@ -123,7 +123,7 @@ echo '
'; start_form(); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/sales/manage/sales_areas.php b/sales/manage/sales_areas.php index 1b528388..4793ce7e 100644 --- a/sales/manage/sales_areas.php +++ b/sales/manage/sales_areas.php @@ -83,7 +83,7 @@ if ($Mode == 'RESET') $result = get_sales_areas(check_value('show_inactive')); start_form(); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Area Name"), "", ""); inactive_control_column($th); @@ -111,7 +111,7 @@ echo '
'; //------------------------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/sales/manage/sales_groups.php b/sales/manage/sales_groups.php index 7521182a..0005aed5 100644 --- a/sales/manage/sales_groups.php +++ b/sales/manage/sales_groups.php @@ -81,7 +81,7 @@ if ($Mode == 'RESET') $result = get_sales_groups(check_value('show_inactive')); start_form(); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Group Name"), "", ""); inactive_control_column($th); @@ -105,7 +105,7 @@ end_table(1); //------------------------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/sales/manage/sales_people.php b/sales/manage/sales_people.php index 55a5f12f..7969b692 100644 --- a/sales/manage/sales_people.php +++ b/sales/manage/sales_people.php @@ -95,7 +95,7 @@ if ($Mode == 'RESET') $result = get_salesmen(check_value('show_inactive')); start_form(); -start_table("$table_style width=60%"); +start_table(TABLESTYLE, "width=60%"); $th = array(_("Name"), _("Phone"), _("Fax"), _("Email"), _("Provision"), _("Break Pt."), _("Provision")." 2", "", ""); inactive_control_column($th); table_header($th); @@ -150,7 +150,7 @@ if ($selected_id != -1) $_POST['provision2'] = percent_format(0); } -start_table($table_style2); +start_table(TABLESTYLE2); text_row_ex(_("Sales person name:"), 'salesman_name', 30); text_row_ex(_("Telephone number:"), 'salesman_phone', 20); diff --git a/sales/manage/sales_points.php b/sales/manage/sales_points.php index 3455c85c..aa1089d6 100644 --- a/sales/manage/sales_points.php +++ b/sales/manage/sales_points.php @@ -79,7 +79,7 @@ if ($Mode == 'RESET') $result = get_all_sales_points(check_value('show_inactive')); start_form(); -start_table("$table_style"); +start_table(TABLESTYLE); $th = array (_('POS Name'), _('Credit sale'), _('Cash sale'), _('Location'), _('Default account'), '',''); @@ -109,7 +109,7 @@ $cash = db_has_cash_accounts(); if (!$cash) display_note(_("To have cash POS first define at least one cash bank account.")); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/sales/manage/sales_types.php b/sales/manage/sales_types.php index bc54f635..1a5c1f61 100644 --- a/sales/manage/sales_types.php +++ b/sales/manage/sales_types.php @@ -98,7 +98,7 @@ if ($Mode == 'RESET') $result = get_all_sales_types(check_value('show_inactive')); start_form(); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array (_('Type Name'), _('Factor'), _('Tax Incl'), '',''); inactive_control_column($th); @@ -134,7 +134,7 @@ display_note(_("Marked sales type is the company base pricelist for prices calcu if (!isset($_POST['base'])) $_POST['base'] = 0; -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/sales/sales_order_entry.php b/sales/sales_order_entry.php index 9e5a04ad..5f6da084 100644 --- a/sales/sales_order_entry.php +++ b/sales/sales_order_entry.php @@ -653,7 +653,7 @@ $customer_error = display_order_header($_SESSION['Items'], ($_SESSION['Items']->any_already_delivered() == 0), $idate); if ($customer_error == "") { - start_table("$table_style width=80%", 10); + start_table(TABLESTYLE, "width=80%", 10); echo ""; display_order_summary($orderitems, $_SESSION['Items'], true); echo ""; diff --git a/sales/view/view_credit.php b/sales/view/view_credit.php index c3b36b55..4291d9dc 100644 --- a/sales/view/view_credit.php +++ b/sales/view/view_credit.php @@ -39,11 +39,11 @@ $branch = get_branch($myrow["branch_code"]); display_heading("" . sprintf(_("CREDIT NOTE #%d"), $trans_id). ""); echo "
"; -start_table("$table_style2 width=95%"); +start_table(TABLESTYLE2, "width=95%"); echo ""; // outer table /*Now the customer charged to details in a sub table*/ -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Customer")); table_header($th); @@ -54,7 +54,7 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Branch")); table_header($th); @@ -63,7 +63,7 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Ref"), $myrow["reference"], "class='tableheader2'"); label_cells(_("Date"), sql2date($myrow["tran_date"]), "class='tableheader2'"); @@ -83,7 +83,7 @@ $sub_total = 0; $result = get_customer_trans_details(ST_CUSTCREDIT, $trans_id); -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); if (db_num_rows($result) > 0) { diff --git a/sales/view/view_dispatch.php b/sales/view/view_dispatch.php index 8b9cfe15..14a7e7e2 100644 --- a/sales/view/view_dispatch.php +++ b/sales/view/view_dispatch.php @@ -43,11 +43,11 @@ $sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER); display_heading(sprintf(_("DISPATCH NOTE #%d"),$trans_id)); echo "
"; -start_table("$table_style2 width=95%"); +start_table(TABLESTYLE2, "width=95%"); echo ""; // outer table /*Now the customer charged to details in a sub table*/ -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Charge To")); table_header($th); @@ -61,7 +61,7 @@ echo ""; // outer table /*end of the main table showing the company name and charge to details */ -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Charge Branch")); table_header($th); @@ -70,7 +70,7 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Delivered To")); table_header($th); @@ -80,7 +80,7 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Reference"), $myrow["reference"], "class='tableheader2'"); label_cells(_("Currency"), $sales_order["curr_code"], "class='tableheader2'"); @@ -105,7 +105,7 @@ end_table(1); // outer table $result = get_customer_trans_details(ST_CUSTDELIVERY, $trans_id); -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); if (db_num_rows($result) > 0) { diff --git a/sales/view/view_invoice.php b/sales/view/view_invoice.php index 44715413..4fc4ce12 100644 --- a/sales/view/view_invoice.php +++ b/sales/view/view_invoice.php @@ -43,11 +43,11 @@ $sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER); display_heading(sprintf(_("SALES INVOICE #%d"),$trans_id)); echo "
"; -start_table("$table_style2 width=95%"); +start_table(TABLESTYLE2, "width=95%"); echo ""; // outer table /*Now the customer charged to details in a sub table*/ -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Charge To")); table_header($th); @@ -61,7 +61,7 @@ echo ""; // outer table /*end of the main table showing the company name and charge to details */ -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Charge Branch")); table_header($th); @@ -70,7 +70,7 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Delivered To")); table_header($th); @@ -80,7 +80,7 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Reference"), $myrow["reference"], "class='tableheader2'"); label_cells(_("Currency"), $sales_order["curr_code"], "class='tableheader2'"); @@ -107,7 +107,7 @@ end_table(1); // outer table $result = get_customer_trans_details(ST_SALESINVOICE, $trans_id); -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); if (db_num_rows($result) > 0) { diff --git a/sales/view/view_receipt.php b/sales/view/view_receipt.php index 0a10d40e..f829fda5 100644 --- a/sales/view/view_receipt.php +++ b/sales/view/view_receipt.php @@ -33,7 +33,7 @@ $receipt = get_customer_trans($trans_id, ST_CUSTPAYMENT); display_heading(sprintf(_("Customer Payment #%d"),$trans_id)); echo "
"; -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); start_row(); label_cells(_("From Customer"), $receipt['DebtorName'], "class='tableheader2'"); label_cells(_("Into Bank Account"), $receipt['bank_account_name'], "class='tableheader2'"); diff --git a/sales/view/view_sales_order.php b/sales/view/view_sales_order.php index 2fa6968b..5f5c6771 100644 --- a/sales/view/view_sales_order.php +++ b/sales/view/view_sales_order.php @@ -41,7 +41,7 @@ if (isset($_SESSION['View'])) $_SESSION['View'] = new Cart($_GET['trans_type'], $_GET['trans_no'], true); -start_table("$table_style2 width=95%", 5); +start_table(TABLESTYLE2, "width=95%", 5); echo ""; display_heading2(_("Order Information")); if ($_GET['trans_type'] != ST_SALESQUOTE) @@ -55,7 +55,7 @@ echo ""; echo ""; -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); label_row(_("Customer Name"), $_SESSION['View']->customer_name, "class='tableheader2'", "colspan=3"); start_row(); @@ -87,7 +87,7 @@ if ($_GET['trans_type'] != ST_SALESQUOTE) { echo ""; - start_table($table_style); + start_table(TABLESTYLE); display_heading2(_("Delivery Notes")); @@ -120,7 +120,7 @@ if ($_GET['trans_type'] != ST_SALESQUOTE) end_table(); echo ""; - start_table($table_style); + start_table(TABLESTYLE); display_heading2(_("Sales Invoices")); $th = array(_("#"), _("Ref"), _("Date"), _("Total")); @@ -153,7 +153,7 @@ if ($_GET['trans_type'] != ST_SALESQUOTE) display_heading2(_("Credit Notes")); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Ref"), _("Date"), _("Total")); table_header($th); @@ -193,7 +193,7 @@ if ($_SESSION['View']->so_type == 1) display_note(_("This Sales Order is used as a Template."), 0, 0, "class='currentfg'"); display_heading2(_("Line Details")); -start_table("colspan=9 width=95% $table_style"); +start_table(TABLESTYLE, "colspan=9 width=95%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), _("Discount"), _("Total"), _("Quantity Delivered")); table_header($th); diff --git a/taxes/item_tax_types.php b/taxes/item_tax_types.php index 549b7fc0..4f93fa59 100644 --- a/taxes/item_tax_types.php +++ b/taxes/item_tax_types.php @@ -108,7 +108,7 @@ if ($Mode == 'RESET') $result2 = $result = get_all_item_tax_types(check_value('show_inactive')); start_form(); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Name"), _("Tax exempt"),'',''); inactive_control_column($th); table_header($th); @@ -140,7 +140,7 @@ inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { @@ -176,7 +176,7 @@ if (!isset($_POST['exempt']) || $_POST['exempt'] == 0) display_note(_("Select which taxes this item tax type is exempt from."), 0, 1); - start_table($table_style2); + start_table(TABLESTYLE2); $th = array(_("Tax Name"), _("Rate"), _("Is exempt")); table_header($th); diff --git a/taxes/tax_groups.php b/taxes/tax_groups.php index 13990c38..a210ad96 100644 --- a/taxes/tax_groups.php +++ b/taxes/tax_groups.php @@ -141,7 +141,7 @@ if ($Mode == 'RESET') $result = get_all_tax_groups(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Description"), _("Tax Shipping"), "", ""); inactive_control_column($th); table_header($th); @@ -173,7 +173,7 @@ end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { @@ -206,7 +206,7 @@ end_table(); display_note(_("Select the taxes that are included in this group."), 1); -start_table($table_style2); +start_table(TABLESTYLE2); //$th = array(_("Tax"), _("Default Rate (%)"), _("Rate (%)")); //Editable rate has been removed 090920 Joe Hunt $th = array(_("Tax"), _("Rate (%)")); diff --git a/taxes/tax_types.php b/taxes/tax_types.php index 14af1c19..a467b648 100644 --- a/taxes/tax_types.php +++ b/taxes/tax_types.php @@ -110,7 +110,7 @@ $result = get_all_tax_types(check_value('show_inactive')); start_form(); display_note(_("To avoid problems with manual journal entry all tax types should have unique Sales/Purchasing GL accounts.")); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Description"), _("Default Rate (%)"), _("Sales GL Account"), _("Purchasing GL Account"), "", ""); @@ -139,7 +139,7 @@ inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/themes/aqua/renderer.php b/themes/aqua/renderer.php index 5c3f5310..300f90f3 100644 --- a/themes/aqua/renderer.php +++ b/themes/aqua/renderer.php @@ -24,10 +24,6 @@ function menu_header($title, $no_menu, $is_index) { global $path_to_root, $help_base_url, $db_connections; - // you can owerride the table styles from config.php here, if you want. - //global $table_style, $table_style2; - //$table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'"; - //$table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'"; echo "\n"; echo "\n"; echo "
\n"; diff --git a/themes/cool/renderer.php b/themes/cool/renderer.php index cd959edc..e5ec015b 100644 --- a/themes/cool/renderer.php +++ b/themes/cool/renderer.php @@ -24,10 +24,6 @@ function menu_header($title, $no_menu, $is_index) { global $path_to_root, $help_base_url, $db_connections; - // you can owerride the table styles from config.php here, if you want. - //global $table_style, $table_style2; - //$table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'"; - //$table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'"; echo "\n"; echo "\n"; echo "
\n"; diff --git a/themes/default/renderer.php b/themes/default/renderer.php index 5ba820da..aaee7125 100644 --- a/themes/default/renderer.php +++ b/themes/default/renderer.php @@ -25,10 +25,6 @@ function menu_header($title, $no_menu, $is_index) { global $path_to_root, $help_base_url, $db_connections; - // you can owerride the table styles from config.php here, if you want. - //global $table_style, $table_style2; - //$table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'"; - //$table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'"; echo "\n"; echo "\n"; echo "
\n"; -- 2.30.2