Replaced the global variables for table styles to defined CSS classes.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 14 Apr 2010 21:01:47 +0000 (21:01 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 14 Apr 2010 21:01:47 +0000 (21:01 +0000)
141 files changed:
CHANGELOG.txt
access/login.php
admin/attachments.php
admin/backups.php
admin/change_current_user_password.php
admin/company_preferences.php
admin/create_coy.php
admin/display_prefs.php
admin/fiscalyears.php
admin/forms_setup.php
admin/gl_setup.php
admin/inst_lang.php
admin/inst_module.php
admin/inst_upgrade.php
admin/payment_terms.php
admin/print_profiles.php
admin/printers.php
admin/security_roles.php
admin/shipping_companies.php
admin/system_diagnostics.php
admin/tags.php
admin/users.php
admin/view_print_transaction.php
admin/void_transaction.php
dimensions/dimension_entry.php
dimensions/includes/dimensions_ui.inc
dimensions/inquiry/search_dimensions.php
dimensions/view/view_dimension.php
gl/bank_account_reconcile.php
gl/bank_transfer.php
gl/gl_bank.php
gl/gl_budget.php
gl/gl_journal.php
gl/includes/ui/gl_bank_ui.inc
gl/includes/ui/gl_journal_ui.inc
gl/inquiry/balance_sheet.php
gl/inquiry/bank_inquiry.php
gl/inquiry/gl_account_inquiry.php
gl/inquiry/gl_trial_balance.php
gl/inquiry/journal_inquiry.php
gl/inquiry/profit_loss.php
gl/inquiry/tax_inquiry.php
gl/manage/bank_accounts.php
gl/manage/currencies.php
gl/manage/exchange_rates.php
gl/manage/gl_account_classes.php
gl/manage/gl_account_types.php
gl/manage/gl_accounts.php
gl/manage/gl_quick_entries.php
gl/view/bank_transfer_view.php
gl/view/gl_deposit_view.php
gl/view/gl_payment_view.php
gl/view/gl_trans_view.php
includes/db_pager.inc
includes/types.inc
includes/ui/allocation_cart.inc
includes/ui/db_pager_view.inc
includes/ui/ui_controls.inc
includes/ui/ui_view.inc
inventory/adjustments.php
inventory/cost_update.php
inventory/includes/item_adjustments_ui.inc
inventory/includes/stock_transfers_ui.inc
inventory/inquiry/stock_movements.php
inventory/inquiry/stock_status.php
inventory/manage/item_categories.php
inventory/manage/item_codes.php
inventory/manage/item_units.php
inventory/manage/items.php
inventory/manage/locations.php
inventory/manage/movement_types.php
inventory/manage/sales_kits.php
inventory/prices.php
inventory/purchasing_data.php
inventory/reorder_level.php
inventory/transfers.php
inventory/view/view_adjustment.php
inventory/view/view_transfer.php
manufacturing/includes/manufacturing_ui.inc
manufacturing/includes/work_order_issue_ui.inc
manufacturing/inquiry/bom_cost_inquiry.php
manufacturing/manage/bom_edit.php
manufacturing/manage/work_centres.php
manufacturing/search_work_orders.php
manufacturing/view/wo_issue_view.php
manufacturing/view/wo_production_view.php
manufacturing/work_order_add_finished.php
manufacturing/work_order_costs.php
manufacturing/work_order_entry.php
manufacturing/work_order_issue.php
manufacturing/work_order_release.php
purchasing/includes/ui/grn_ui.inc
purchasing/includes/ui/invoice_ui.inc
purchasing/includes/ui/po_ui.inc
purchasing/inquiry/po_search.php
purchasing/inquiry/po_search_completed.php
purchasing/inquiry/supplier_allocation_inquiry.php
purchasing/inquiry/supplier_inquiry.php
purchasing/manage/suppliers.php
purchasing/po_entry_items.php
purchasing/po_receive_items.php
purchasing/supplier_payment.php
purchasing/view/view_grn.php
purchasing/view/view_po.php
purchasing/view/view_supp_credit.php
purchasing/view/view_supp_invoice.php
purchasing/view/view_supp_payment.php
reporting/includes/reports_classes.inc
sales/create_recurrent_invoices.php
sales/credit_note_entry.php
sales/customer_credit_invoice.php
sales/customer_delivery.php
sales/customer_invoice.php
sales/customer_payments.php
sales/includes/ui/sales_credit_ui.inc
sales/includes/ui/sales_order_ui.inc
sales/inquiry/customer_allocation_inquiry.php
sales/inquiry/customer_inquiry.php
sales/inquiry/sales_deliveries_view.php
sales/inquiry/sales_orders_view.php
sales/manage/credit_status.php
sales/manage/customer_branches.php
sales/manage/customers.php
sales/manage/recurrent_invoices.php
sales/manage/sales_areas.php
sales/manage/sales_groups.php
sales/manage/sales_people.php
sales/manage/sales_points.php
sales/manage/sales_types.php
sales/sales_order_entry.php
sales/view/view_credit.php
sales/view/view_dispatch.php
sales/view/view_invoice.php
sales/view/view_receipt.php
sales/view/view_sales_order.php
taxes/item_tax_types.php
taxes/tax_groups.php
taxes/tax_types.php
themes/aqua/renderer.php
themes/cool/renderer.php
themes/default/renderer.php

index 1618390395175836e64ae084ff245acfeb500e56..23f7c4593b8e801d9f004268f09c5c6f3a22e712 100644 (file)
@@ -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
index 0c77bc807991d6b21bb8da700de122a690e44b37..c60819a90ea3fe5074281e9850fb089963329185 100644 (file)
@@ -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 "<td align='center' colspan=2>";
        if (!$login_timeout) { // FA logo
index ce4498f6c459b2ebb125eac29c7ba94eb83c45d7..34ae4c46429ec2fdb1c391c70a15dab370298324 100644 (file)
@@ -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)
 {
index 9f6efa55a9a41c7f51ec9d96e8743b0973184de7..4011a2a5423eafddedb376cd8eab233d14ecd99e 100644 (file)
@@ -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);
index 29112d0376f266ddcb38e38e0398777a0a159ec2..247517a24b86dbf0ff327f10d91238a3fa7d846d 100644 (file)
@@ -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);
 
index bc550789d66b4e5404cf25f35ef07732d1ebd1aa..74a9faec64b955a3c2efec6e0b6aed0cc83064d3 100644 (file)
@@ -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);
 
index aa765395b0db5054569ac8ba37e90aeed3a1c988..1ee6d4003cd34341573d1a357bad1b0dd3ed4e15 100644 (file)
@@ -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)
                }
                </script>";
-       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)
                }
                </script>";
 
-       start_table($table_style2);
+       start_table(TABLESTYLE2);
 
        if ($selected_id != -1)
        {
index 78809c0c6c7c56defa38e41feb75c753bcface6b..0e2084915a13d1703e78777ddc8b85bfb11e89d3 100644 (file)
@@ -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"));
index bae4e4bbc4226e7b095ccb313a39ad43e710e47a..6f3071648c879be0f5cf58ca1f7771a3ab57148a 100644 (file)
@@ -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)
        {
index f282b92d9bde3e3db45d675c3e36d6af3463e5c1..f006557612fe8db0d73b7d852ec508c2bdacd836 100644 (file)
@@ -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);
index 7d3f23f106450d0f901a9b1e794337294a871be3..997a2bda23fa0ef690efcee3523550427fdf9e17 100644 (file)
@@ -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);
 
index ee44fdf425bb5178b39a8de78dce2ed6d2f37592..858e13a6afcaea83872d7eda9965adf1fabb722e 100644 (file)
@@ -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)
                }
                </script>";
-       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)
                }
                </script>";
 
-       start_table($table_style2);
+       start_table(TABLESTYLE2);
 
        if ($selected_id != -1)
        {
index d8b00450a1ed478391dd2c7a826afe010349d57a..844244b737099e1abc3b46c925a1860f9c9b4be4 100644 (file)
@@ -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')
        {
index 670ecb1515d260bbdf3ccad7a05f7cd016d52282..49c97bbd2a98047b5fd50d47fba6e93de4264fb8 100644 (file)
@@ -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);
index a6aa77e77011570f350c40aa6a67594f3bb954a6..4e07c6e4a95706d9fe7e76e13d537361dc8d891d 100644 (file)
@@ -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) 
index f9972980fc7b0800650181c84b4ddf06f6950e01..fb959dfb61667893fc12ffaae9666d0915dd4b36 100644 (file)
@@ -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);
 
index 3334d6b76c6d187c62e4e8e34d3263008e7574b7..8d11b7261efdc182fd91ae70525b980ce72281a4 100644 (file)
@@ -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 '<br>';
 
 start_form();
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 if ($selected_id != -1) 
 {
index bce6661f2e2cc88a414f68f4238f33c38ee44b10..2727af4c3eabe5f97196b88baad0ce7196b502c3 100644 (file)
@@ -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:"). "&nbsp;", '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;
index fa7b264108d940c8544ea0b0991a6dfdeb1db031..cb994d3f9aff2800b0464cb4482090c5f919777e 100644 (file)
@@ -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) 
 {
index 44cd37ce5506dcef34a2fe73832018386f11bb8e..4e554290ac67fcdd89e0f63ac18c300f2d30a2f1 100644 (file)
@@ -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);
 
index f87d98d6c69c8c0de417ff1fd005fdc90178c505..d6f46da97d06520ee7fc3c90832a1a8f762a253f 100644 (file)
@@ -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 
 {
index 5737c0e6b1d88fae635ef6bc921740c2860c41f6..9fde1d93b3f8d457a616aa2fd877a9e76d75ada7 100644 (file)
@@ -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) 
index 65bc42d4a69aaa57f150efcd297847d9c1b2cb26..5a6d5738b8a29578da2f5e8db4d1b4478e1c9e51 100644 (file)
@@ -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;
index 9fd0184b3e913d7438ffc4629c8a3241b0796ad7..0dcd918d5eb0355c6a8cd4dd682e65ae77a90268 100644 (file)
@@ -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);
 
index 0777c2a3adc25f106dbb2fcacf0234e37522cbdb..8ee8fb8a90e45ec0171fffd93854f89aba5b158c 100644 (file)
@@ -223,7 +223,7 @@ if (isset($_POST['reopen']))
 
 start_form();
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 if ($selected_id != -1)
 {
index edff4b6de108c722c660201b1c624cef66fa49c0..925d0313137c67c3ef8c8d063fc0792652e34066 100644 (file)
@@ -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);
 
index 49c2dc0b30c17e6de29a8e85459370279fc9ef54..ccf72adaa055717e005ec5e30ff49c31f42eb085 100644 (file)
@@ -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);
index 98668027c1f617629069a2e747e8dd766290e005..28b16de19cd9850abd059397173e7759b65aecb4 100644 (file)
@@ -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']))
index f59ee696adfc0b9a4e3099f22951837e720addce..4fa56550696664b5d957fc36fdd3c86497908a50 100644 (file)
@@ -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 "<hr>";
 
 div_start('summary');
 
-start_table($table_style);
+start_table(TABLESTYLE);
 $th = array(_("Reconcile Date"), _("Beginning<br>Balance"), 
        _("Ending<br>Balance"), _("Account<br>Total"),_("Reconciled<br>Amount"), _("Difference"));
 table_header($th);
index 7ec52cc899a4bb103104c3dd5d6e68ef1added5e..5ed84c08e4528c12537c456bc4a9fa94d9ab17ec 100644 (file)
@@ -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);
 
index b3b3345cb51b75d3ef6b179953fe23eabed48b66..1c85bcca818264041635e87ed34559176428d7ea 100644 (file)
@@ -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 "<td>";
 display_gl_items($_SESSION['pay_items']->trans_type==ST_BANKPAYMENT ?
index 26c648621874831e2cd2c08514687682d41b56f6..585be9b4b469a82b0d6eae051d1731b291e16691 100644 (file)
@@ -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)
index 035de8ac0c22fe4990911eb3496ccd09aac087a0..bc3e15e963286245665aec8bcee31404c28b80cf 100644 (file)
@@ -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 "<td>";
 display_gl_items(_("Rows"), $_SESSION['journal_items']);
index 46408216862749dd478d5064e7ad4f01f2976b99..1c36613c64b024ecffcb8e22189a5460187bd18f 100644 (file)
 ***********************************************************************/
 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",
index 7d13dd45442fe128af3354479e9311a3c69b3783..f48e5178135e1c41ca461db454feaded350ad36f 100644 (file)
@@ -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"), "");
index 8fb0b676923f050201d9e2f08c8815aefc0d560f..22dee85c78209b4e195e1774693b22b71d62d450 100644 (file)
@@ -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
        {               
index c37e41840c9a44eb4f1f04c2a999eb110acbce24..dddc9b47d808e36c570d73bad34e22e5f8acfd23 100644 (file)
@@ -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"), "");
index 5612e36333a2a3579555f1c14fe9e4232b0a925d..8d414a5411d40d1195b648472d50b5921e00bd0b 100644 (file)
@@ -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"));
        
index 50ff2e3dead16a02e12f2ab774ec2a92db3bf707..fbd23e94d95dcd7cf781b0d6cf2dacbccc324f22 100644 (file)
@@ -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 =  "<tr>
         <td rowspan=2 class='tableheader'>" . _("Account") . "</td>
         <td rowspan=2 class='tableheader'>" . _("Account Name") . "</td>
index 66b9aaf14df026ba3c45c52131daac28e109d57a..54dfa1c0549d2473022c0111d8c7fcddebc09170 100644 (file)
@@ -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'));
index d83dbf825bd88d66b209201a547b33b380f0e5b8..3af0e4a7ca65f142fda8b25ec79ab08bcb479b23 100644 (file)
@@ -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 =  "<tr>
         <td class='tableheader'>" . _("Group/Account Name") . "</td>
index 394963abe42e037e0d2f8a63a726f322209af3bb..6022fcd7211f67d8579c643566e1c0887f97e453 100644 (file)
@@ -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);
index 5ec75616d7df1d181e5c751def602f260454b5af..fa441ef09435628b56a9e24924f7540971b92e33 100644 (file)
@@ -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) 
 {
index 856bc2b2f57b377c55ad64861506a0446db51342..c040e173fe68b1a92d8b0a5e98c2bbb3967c158b 100644 (file)
@@ -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 != '') 
        {
index 05cbc04ef1315f02eafcc42c5fbedc346296dba5..eaa0796f0cf518ab6d65b97b6f0f336ba9c7adf0 100644 (file)
@@ -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 != "")
        {
index a2d8bda46aeb7f258b115582c1bdc6cf71545c00..2e9bf09a08b9cccdbcef72b3b7d72dc18a4b4ead 100644 (file)
@@ -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 != "") 
 {
index 7cc32aa44f835b5b5113864f288895f35a05ad8a..b399725c0fe716111d4f805377c51d43e873d45c 100644 (file)
@@ -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 != "")
 {
index 96ba6529d046f326cbb7f832b1fdd4be885a43d2..900bf3668382403b11acfff1591896e5e191ba41 100644 (file)
@@ -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 != "") 
 {
index 555c0888a61459f100e5215445fde23e5dc244d2..d5d0ef345147ae79b638630c838595031862d344 100644 (file)
@@ -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) 
        {
index a2e0da4b614018df5d90e8bf6eb1abdfaa828e66..5d0d0a02d501d64c3dfe189e2e8b057955af230f 100644 (file)
@@ -61,7 +61,7 @@ if ($from_trans['bank_curr_code'] != $to_trans['bank_curr_code'])
 display_heading($systypes_array[ST_BANKTRANSFER] . " #$trans_no");
 
 echo "<br>";
-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'");
index 26da4d4fd9c496847cfb4c1be350028c80dd3bfe..949282b5699b717060da0ac729ffa613418de734 100644 (file)
@@ -48,7 +48,7 @@ echo "<center>";
 display_heading(_("GL Deposit") . " #$trans_no");
 
 echo "<br>";
-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",
index 6b05b6d6aa915b840d9a4a050e605177db114271..f9c3520d81fd3d0b33ce0389235018713afaee87 100644 (file)
@@ -46,7 +46,7 @@ if ($from_trans['bank_curr_code'] != $company_currency)
 display_heading(_("GL Payment") . " #$trans_no");
 
 echo "<br>";
-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 "<br>";
-    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",
index 14d1bd138bec14b67eb694e2ec7103a507d63b52..11b4082b2b8458cae3c0237d013f45b941161be7 100644 (file)
@@ -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;
        }       
index cf67659a004203b8407815eac60760c47acb2b79..9e414affa9de45f4547dfa65a55fdbefa72a6498 100644 (file)
@@ -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;
index 352ddcc5e60ea4af6cd2b76ddaaed03b0e4d8d0f..570f0c68470dd36f593a19df7d5c4c79a5b3912b 100644 (file)
@@ -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);
index bd84f5cc7533b738238d3d1d8694b7beddfb770d..be0ebc5817550c8e8dfcd1287c91a94e11aa37d6 100644 (file)
@@ -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);
index d941cf9056af0bec273a33d2ae79a5472a5b43c4..e8718c636deaecff11ab7472df32d85ec57b75fc 100644 (file)
@@ -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
index 34c0431af503bf803d9af14f2ded1732e956d9b4..6a43115f98fecf9b94df2d287425e6db42326a5d 100644 (file)
@@ -59,9 +59,15 @@ function end_form($breaks=0)
        echo "</form>\n";
 }
 
-function start_table($extra="", $padding='2', $spacing='0')
+function start_table($class=false, $extra="", $padding='2', $spacing='0')
 {
        echo "<center><table";
+       if ($class == TABLESTYLE_NOBORDER)
+               echo " class='tablestyle_noborder'";
+       elseif ($class == TABLESTYLE2)
+               echo " class='tablestyle2'";
+       elseif ($class == TABLESTYLE)
+               echo " class='tablestyle'";
        if ($extra != "")
                echo " $extra";
        echo " cellpadding=$padding cellspacing=$spacing>\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 "<tr valign=top><td>\n"; // outer table
 }
 
@@ -147,7 +153,7 @@ function hyperlink_back($center=true, $no_menu=true, $type_no=0, $trans_no=0)
 {
        if ($center)
                echo "<center>";
-       start_table("width=30%");
+       start_table(false, "width=30%");
        start_row();
        if ($no_menu)
        {
index fe54a261bc2637c68c444ad678d816636701c343..19e94b3e188dff830cdc5f0d7c18d54748580d8c 100644 (file)
@@ -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 "<tr><td align=center><font color=red>$label</font><br>";
        echo "<font color=red>" . _("Date Voided:") . " " . sql2date($void_entry["date_"]) . "</font><br>";
        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"));
index 51b097be937509ba5e71cc3b106a9b5265475737..205a3cb247c66bfae80b5a505e1e165b70e6446f 100644 (file)
@@ -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();
index 088cad5853bf0ee75fbe32fb7653103375a685b0..03db733e309f9a1840015dfc4196fbb85e18b18f 100644 (file)
@@ -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);
index cfe697fa1c30efd813e678766ed6efd38d39c7fe..f7af3dadcae60659f001def954399693757bd789 100644 (file)
@@ -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[] = '';
index 33df8fde7b33981b799ea296124574f1aaebf9c5..474fc9df31c692df9d9ee1fbf493365a47797190 100644 (file)
@@ -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);
index e8f6a25778af0558c6660fc9003374e7f62e0b0f..020ab3f4fedec8ee9373337fc921f5a26b7d1f98 100644 (file)
@@ -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"));
 
index d3d8781a05836e5e7cd7b87239585b9aba93dd5b..1ccbca0db1d0273e3a1e5fc7a13ff48486b4803e 100644 (file)
@@ -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)
 {
index d8dbb69ec32b9c7cc8db82f4db11216d2a1aed72..b52d67c812b27497a42eb5f4a54258bd37086148 100644 (file)
@@ -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 '<br>';
 //----------------------------------------------------------------------------------
 
 div_start('details');
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 if ($selected_id != -1) 
 {
index d26f6f413522ea7178d016badb5fed0bb9643547..d423b9211ae7d5b3d689915ce3772537ad25eac0 100644 (file)
@@ -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 "<br>";
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 hidden('code_id', $selected_id);
 
index 9a23f6450c19e433654fbeb6d6e0e0c133f61a97..fa63bbe532a2176603cf3881a5258fc331f8ba0c 100644 (file)
@@ -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 != '') 
 {
index 900641ecf2bec717e7efee964b989bf042ee6067..0793bb38a82c9d630965215d01d2ead3c770e356 100644 (file)
@@ -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);
 
index 1deb1f2064df5f9db3d34fe516273bfd5fc9a8a8..0bae7585fc6469b1bc1813f5fee64fa9c95338a5 100644 (file)
@@ -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 '<br>';
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 $_POST['email'] = "";
 if ($selected_id != -1) 
index edec494bbe60c36574bf58e10fb375fef190f2c2..e7086f947432915989c1a32f1f68631f13750c3a 100644 (file)
@@ -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) 
 {
index 16a78f87bc2fde77d9a04353b7a6c7cfbc284a57..2aef8e8b62845c5b4a957fdcad2715355c3a171e 100644 (file)
@@ -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 '<br>';
-       start_table($table_style2);
+       start_table(TABLESTYLE2);
 }
 
        if ($Mode == 'Edit') {
index 8666a05f08f20fd2c2cf72e59b5e5119d64f7bcf..dfac2aa5a4c6b01c27da23ba0ab1cdca1f7948b7 100644 (file)
@@ -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);
 
index 7bb09a54e2056e62da090ee3504bce9a3fb154e4..f7b44c4d879e948ca33a5abc08a5ef74121e686a 100644 (file)
@@ -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')
 {
index 787348a5987e08e3442b60446aa02afc0b003ee8..4e8f02c4fa7ee07e5694c0834b441ce65fa43d77 100644 (file)
@@ -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);
index 9e6cbd8534afac56308cb2e4efc164b8dc829ba9..26859e59a19c2b0939ddb698efeec2e98709ee5a 100644 (file)
@@ -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 "<td>";
 display_transfer_items(_("Items"), $_SESSION['transfer_items']);
index 1d87892bc703756cc59c8e055d6936643e0d63b0..e5722c54ff5e6fd4e08d5aa1503a89dbdbbd4679 100644 (file)
@@ -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 "<br>";
-               start_table("$table_style width=90%");
+               start_table(TABLESTYLE, "width=90%");
 
        $th = array(_("Item"), _("Description"), _("Quantity"),
                _("Units"), _("Unit Cost"));
index bf3e540bdf479b251b425b2f27c23e2b62689f09..86ad8bfa23c813074184df7e9da707b4983857b3 100644 (file)
@@ -33,7 +33,7 @@ $to_trans = $transfer_items[1];
 display_heading($systypes_array[ST_LOCTRANSFER] . " #$trans_no");
 
 echo "<br>";
-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 "<br>";
-start_table("$table_style width=90%");
+start_table(TABLESTYLE, "width=90%");
 
 $th = array(_("Item"), _("Description"), _("Quantity"), _("Units"));
 table_header($th);
index 426356d9c61a4efa053edd055dba260cb2717772..f2cde17f2ee9e09d8e622e0c8221e015d7a6cda0 100644 (file)
@@ -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"));
index 5924f2ccdd20a65424dc18d24bdb4f6e1f080aa2..dac556de78bafd671500ae7b57a77ee38a8013e8 100644 (file)
@@ -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[] = '';
index 9b311a7df29aa8b609331d1b4e714aef708797eb..40612fe2f54ac6f0f45467452363568c5fb02767 100644 (file)
@@ -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();
index e963d5634f53192d22aaf161ad1e68b6e8f3ab88..1593ee28db29f7219653a867625298c2e572526d 100644 (file)
@@ -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 '<br>';
 
-       start_table($table_style2);
+       start_table(TABLESTYLE2);
 
        if ($selected_id != -1)
        {
index b9199690c9b0e78f31a7a8d178781cc97555a868..10fcf365abc6854cac2b76ee49cd5588aa4d5be5 100644 (file)
@@ -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) 
 {
index f212a1a842d5cb8e04dcc8cef864d81a73f1af56..6d52e5f5ff57ba08bd000754a35cb30aa867099c 100644 (file)
@@ -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);
 
index 4c2365165078711bcf80d3b8d4a81109dacfa758..63b815b6ad7eb99d623361ea6019e0a6e5ba6cd3 100644 (file)
@@ -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);
index c79983fbb41bbd36a2a8d4c9f288bcf5535ced7b..e3aa2ef6dc07c216c985e4e8b54e07f3cf093462 100644 (file)
@@ -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);
index c23dc93f42ca7fe8977743f84c7fa11e27bf7311..953e863f7d0fecb5e3631bfdf1e6f703b2cd4808 100644 (file)
@@ -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));
index 2e72cf10a50255d02c25b98badfa3176b82fa0e1..0603dc1559c5f7aa65ea680fa97981912fc5211d 100644 (file)
@@ -133,7 +133,7 @@ start_form();
 hidden('selected_id', $_POST['selected_id']);
 //hidden('WOReqQuantity', $_POST['WOReqQuantity']);
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 br();
 
index d6bea933d76647788e1161a95238f55a52c8d4f3..aaba58d4bca6b0979a59e1e9e3cc7641745e689d 100644 (file)
@@ -326,7 +326,7 @@ if (get_post('_type_update'))
 
 start_form();
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 $existing_comments = "";
 
index 1b129f35055ac5fdb48c290f70d669a375feb050..e126bf96b4d0cbe7eb26235dba0aab78b6c826b8 100644 (file)
@@ -211,7 +211,7 @@ echo "<br>";
 
 start_form();
 
-start_table("$table_style width=90%", 10);
+start_table(TABLESTYLE, "width=90%", 10);
 echo "<tr><td>";
 display_issue_items(_("Items to Issue"), $_SESSION['issue_items']);
 issue_options_controls();
index 0d58b749a550b8e9969f56f316e5a584537abe49..edacd995bed8565b87362381f265450be3f15aba 100644 (file)
@@ -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"]);
index 986d5a9f3191b1e4fff32b15dc20323083a92533..cfb2f26c21fa7dc120c76a4eeab39247a0017150 100644 (file)
@@ -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'");
index bc03ee82100b9a932e2775fd6fa2a01b7eedac25..051e949eb8219a253d8855571bc1b53510f90a75 100644 (file)
@@ -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"),
index c862cca236fbd0819bc0d14d38229886025cd939..1e6f4f79bfdaf5ea560d60b45ce14ea7a6a79500 100644 (file)
@@ -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'");
index e0108a4045fddceb22f1540d57288897bcacddbb..54cb22ef17a5b3b07cab16b4a8264a7349f886e9 100644 (file)
@@ -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);
 
index fad27dc53d11dbb3970a8dc211747a5ea5d23e69..c612639f86ad7830f4025bd625891ff8b16582a5 100644 (file)
@@ -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);
 
index 14cb32900fd1a9eff3d6043087cc81e5c9f2fa1c..eb7cedc169c5da130b6f71a83dc3a06cc3207640 100644 (file)
@@ -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);
index ea5c8384cfb8624a7e5fe1d58ad3d93538a0f203..645cbab884b1f7d4898875ff97472bf6056c1439 100644 (file)
@@ -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"));
 
index 398b2aca4a1a35fc381a9f1dc7ac7e1ea9ccdf0b..b2fa63935478e450915f4e92922aae1a56ad1b6a 100644 (file)
@@ -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);
 
index 73cad845fc7bc62c4a2ed27a4332159969a4aa4f..3820d7ef5383b6f3adaf2f5706b81e69a891072a 100644 (file)
@@ -478,7 +478,7 @@ echo "<br>";
 
 display_po_items($_SESSION['PO']);
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 textarea_row(_("Memo:"), 'Comments', null, 70, 4);
 
 end_table(1);
index 5d3f28d14917cde55d3224d67cb232f2f366828d..90a9ffe53536c92bee7bbc79a8d4c612bd71db5a 100644 (file)
@@ -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);
index 938c2a8d506d4b984195e86abf6fa5dcc79074eb..2ceac5f387d05bd036fd817f33dc531e0993d462 100644 (file)
@@ -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);
index 8336ff2c264b82d5e922123e30391a21669b1ae2..19d0719833c373cd1ed6aa054fc37c0f558960cd 100644 (file)
@@ -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"));
 
index 04f50477b5a7e2040fa6de727533378add3ebb16..0c00949304e15cfda9440fe84cb0e911b6b3ef72 100644 (file)
@@ -35,12 +35,12 @@ read_po($_GET['trans_no'], $purchase_order);
 echo "<br>";
 display_po_summary($purchase_order, true);
 
-start_table("$table_style width=90%", 6);
+start_table(TABLESTYLE, "width=90%", 6);
 echo "<tr><td valign=top>"; // 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 "</td><td valign=top>"; // 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 "</td><td valign=top>"; // 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))
index 9313484799bd487f07c0e6789df99678049ff8c9..5c8ec92fc9cf057ea5c5810536b0ce8dd8d4bfb2 100644 (file)
@@ -38,7 +38,7 @@ read_supp_invoice($trans_no, ST_SUPPCREDIT, $supp_trans);
 
 display_heading(_("SUPPLIER CREDIT NOTE") . " # " . $trans_no);
 echo "<br>";
-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);
index 87b54f5d2c9bd7c264c25851f73436ea6537b6c6..0aa672fe9e88bd05c5215c6baf33fc3a66b7fbe0 100644 (file)
@@ -41,7 +41,7 @@ $supplier_curr_code = get_supplier_currency($supp_trans->supplier_id);
 display_heading(_("SUPPLIER INVOICE") . " # " . $trans_no);
 echo "<br>";
 
-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);
index 4c6c45ad009d3e328a491034d3fec5cadab974b8..f37d0a776aed1ec699040dd5b95d5475ef804716 100644 (file)
@@ -47,7 +47,7 @@ echo "<center>";
 display_heading(_("Payment to Supplier") . " #$trans_no");
 
 echo "<br>";
-start_table("$table_style2 width=80%");
+start_table(TABLESTYLE2, "width=80%");
 
 start_row();
 label_cells(_("To Supplier"), $receipt['supplier_name'], "class='tableheader2'");
index c824ddc311dd3e036fd7fee7dadd9837b5d5e92f..9de492e2df6294b619aa44688c11bef542d146fc 100644 (file)
@@ -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);
index f1bbe4b5dad0674e5a840fcf7c062f547143cf60..3ccbbff711be99af60538e131ce45d6fb4e4d6f4 100644 (file)
@@ -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;
index 7723936c82078fa72987bf1557283161aafae3ec..ff5a171e9a7993f958ac06d7aca5ccb50e70a589 100644 (file)
@@ -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 "<tr><td>";
        display_credit_items(_("Credit Note Items"), $_SESSION['Items']);
        credit_options_controls($_SESSION['Items']);
index 5d6a3dbd820f47015ab3c0b2dbd2bb50105a9ecc..c86f82b3dde26c2889dd8e7454fa41d8b9aab6cf 100644 (file)
@@ -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 "<tr><td>"; // 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 "</td><td>";// 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 "<br>";
+       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);
 
index c263ea06c510e5cf5b55c3864b1b1bc08225afaa..408b57057a6fb989dc0d47a622a14b2c6eb00095 100644 (file)
@@ -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 "<tr><td>"; // 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 "</td><td>";// 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);
 
index 97859b3eab7b06ad1ddb303e25f3de26aacc7787..49976bbcde96a86664fdbc620684a48ed9c079ad 100644 (file)
@@ -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);
index 565d9f95538b285a45bdd58b4453c798b83e6258..e8b51f9943243ebe631d25d911cc5f3cc82f6d12 100644 (file)
@@ -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');
index 6f281c6ff50711fc24434c8d9f0d7ac4fc69b1e6..7804072564152232b224ec0760ac31090a3b1b34 100644 (file)
@@ -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 "<br>";
+       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);
 
index 9c6925f46246d6c7f9897651dc1a2e30a808e59d..d2f20082d4a127b80d18851ddb2a594e01e5d30f 100644 (file)
@@ -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, 
index 343e367e2cd2f7758344d9b05acd8fbc15aef7a4..f32bd6cbb2c4212b1ef41d81aa7db91bd05fb84f 100644 (file)
@@ -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);
index 8bd2d4c72babe5de35ba9bc3128b3de69be8fa9c..10aefa26edff1168a6fa876b51097a9ada2ee7a3 100644 (file)
@@ -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);
index da9002f3fb6bb79a728f7bac9866efcad14d2443..73b3c4bb124c1f5b9159729d9149098120f026ab 100644 (file)
@@ -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);
index c60df3a432893f85f176634cbd71e503fac707a3..e382fd2414b51f1847a20c218769aac649b4d550 100644 (file)
@@ -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')
index 90fc179e4a2dc05519540ff4e3a6f0060c5b95c2..1706a9bcc85cc1938bbfd41ad03f97684bdb1850 100644 (file)
@@ -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 '<br>';
 
 //-----------------------------------------------------------------------------------
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 if ($selected_id != -1) 
 {
index 135e54f0c5eb69c542788e1fd43e5d462f385252..d84f26b1b8c4e78773539b219c78fc1190ed5574 100644 (file)
@@ -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);
 
index 32c6a880dc8bda649ea71b7c5c81759510fbba9f..fa757da2e9c6fc592111dca34827c7412b64bf83 100644 (file)
@@ -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"));
 
index dea4ef3fdb9bb6755dd7d25275d0f7611d56122c..a595815e0a10558350c8550e7bc135a1720d0af6 100644 (file)
@@ -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 '<br>';
 
 start_form();
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 if ($selected_id != -1) 
 {
index 1b528388322da0eb5b0181251c523e521aa53927..4793ce7eca977f2c8bca5ba18f3bc7207314ca9a 100644 (file)
@@ -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 '<br>';
 
 //-------------------------------------------------------------------------------------------------
 
-start_table($table_style2);
+start_table(TABLESTYLE2);
 
 if ($selected_id != -1) 
 {
index 7521182af1569eb15bfe6250205a280dab6bdba6..0005aed55f47e3c925bf2837b3c2a3295763f870 100644 (file)
@@ -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) 
 {
index 55a5f12fd2f5d914c1082256d818f069267da5bf..7969b692954db88487890d9b728cbf9acf1dde59 100644 (file)
@@ -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);
index 3455c85ca8f5bdbebb7cb67c2c241326ecd508c7..aa1089d69e9a6b1634f1dc30ddc26ebfe9fc9989 100644 (file)
@@ -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)
 {
index bc54f635595860db19096be4d749846847a302ba..1a5c1f610ea9d2275b809a005d1df448af52ec6f 100644 (file)
@@ -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)
 {
index 9e5a04adadd6e100a5f5084fb9a6ffc2fc3008ec..5f6da084bc25864f55c9c75bd71f95cf9fb70530 100644 (file)
@@ -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 "<tr><td>";
        display_order_summary($orderitems, $_SESSION['Items'], true);
        echo "</td></tr>";
index c3b36b55ad4964fed2ea40a55bf7b20b5b9281fa..4291d9dc11ee89805c42ab2c9e0d428aa97249d7 100644 (file)
@@ -39,11 +39,11 @@ $branch = get_branch($myrow["branch_code"]);
 display_heading("<font color=red>" . sprintf(_("CREDIT NOTE #%d"), $trans_id). "</font>");
 echo "<br>";
 
-start_table("$table_style2 width=95%");
+start_table(TABLESTYLE2, "width=95%");
 echo "<tr valign=top><td>"; // 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 "</td><td>"; // 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 "</td><td>"; // 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)
 {
index 8b9cfe15fab5d4312f82f2b1a52945cd7878ebef..14a7e7e249ed4cf5cfa045d121fc1caf475351a1 100644 (file)
@@ -43,11 +43,11 @@ $sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER);
 display_heading(sprintf(_("DISPATCH NOTE #%d"),$trans_id));
 
 echo "<br>";
-start_table("$table_style2 width=95%");
+start_table(TABLESTYLE2, "width=95%");
 echo "<tr valign=top><td>"; // 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 "</td><td>"; // 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 "</td><td>"; // 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 "</td><td>"; // 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)
 {
index 44715413dae0653021e3ed4b081c79a6d538de60..4fc4ce123160c55bc38f8d6455e0cecd1a06b36f 100644 (file)
@@ -43,11 +43,11 @@ $sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER);
 display_heading(sprintf(_("SALES INVOICE #%d"),$trans_id));
 
 echo "<br>";
-start_table("$table_style2 width=95%");
+start_table(TABLESTYLE2, "width=95%");
 echo "<tr valign=top><td>"; // 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 "</td><td>"; // 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 "</td><td>"; // 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 "</td><td>"; // 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)
 {
index 0a10d40eae364694d07675b49b9db59267f24a5a..f829fda5f0855d1fdf3573c22d7c12b602383bb7 100644 (file)
@@ -33,7 +33,7 @@ $receipt = get_customer_trans($trans_id, ST_CUSTPAYMENT);
 display_heading(sprintf(_("Customer Payment #%d"),$trans_id));
 
 echo "<br>";
-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'");
index 2fa6968ba4ea28110df9402d2158a11ad8577a0a..5f5c67712e0ae618945efabcddaf1adafef37fa2 100644 (file)
@@ -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 "<tr valign=top><td>";
 display_heading2(_("Order Information"));
 if ($_GET['trans_type'] != ST_SALESQUOTE)
@@ -55,7 +55,7 @@ echo "</td></tr>";
 
 echo "<tr valign=top><td>";
 
-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 "</td><td valign='top'>";
 
-       start_table($table_style);
+       start_table(TABLESTYLE);
        display_heading2(_("Delivery Notes"));
 
 
@@ -120,7 +120,7 @@ if ($_GET['trans_type'] != ST_SALESQUOTE)
        end_table();
        echo "</td><td valign='top'>";
 
-       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);
index 549b7fc0ce97afc0e9b9baba6c7bfab26b56f215..4f93fa59076df1e7e99f4f79d470f8a76a0438c3 100644 (file)
@@ -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);
        
index 13990c38bb4bdafce31e6257a1c508fb71d886cb..a210ad965747eea460b16da09d2cbc22dc481a69 100644 (file)
@@ -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 (%)"));
index 14af1c196946bb44ec1d02cd198b8404b2e0cecc..a467b6487b22ae1316108540ac5abadc2a7ddbf3 100644 (file)
@@ -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) 
 {
index 5c3f531063732719d33f1cc5c7fea51ba78aec0d..300f90f330b82151915052ec253ae3335b0f27d0 100644 (file)
                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 "<table class='callout_main' border='0' cellpadding='0' cellspacing='0'>\n";
                        echo "<tr>\n";
                        echo "<td colspan='2' rowspan='2'>\n";
index cd959edc06815167bd1fe0f08aa285ba078225c7..e5ec015b11ab6c9686da21232e6bbc02a5f86593 100644 (file)
                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 "<table class='callout_main' border='0' cellpadding='0' cellspacing='0'>\n";
                        echo "<tr>\n";
                        echo "<td colspan='2' rowspan='2'>\n";
index 5ba820da3ea10bf85c6bc2b50bc6d3e67a5bc1bc..aaee7125ccff889b85c497fae961ef5b99e534f3 100644 (file)
                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 "<table class='callout_main' border='0' cellpadding='0' cellspacing='0'>\n";
                        echo "<tr>\n";
                        echo "<td colspan='2' rowspan='2'>\n";