Changed API for input/lists functions, added empty hints when needed
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Fri, 6 Jun 2008 22:31:20 +0000 (22:31 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Fri, 6 Jun 2008 22:31:20 +0000 (22:31 +0000)
47 files changed:
admin/company_preferences.php
admin/db/users_db.inc
admin/display_prefs.php
admin/fiscalyears.php
admin/forms_setup.php
admin/gl_setup.php
dimensions/dimension_entry.php
dimensions/inquiry/search_dimensions.php
gl/bank_transfer.php
gl/includes/ui/gl_deposit_ui.inc
gl/includes/ui/gl_journal_ui.inc
gl/includes/ui/gl_payment_ui.inc
gl/inquiry/bank_inquiry.php
gl/inquiry/gl_account_inquiry.php
gl/inquiry/gl_trial_balance.php
gl/manage/gl_account_types.php
gl/manage/gl_accounts.php
includes/current_user.inc
includes/prefs/userprefs.inc
includes/ui/ui_controls.inc
includes/ui/ui_input.inc
inventory/includes/item_adjustments_ui.inc
inventory/includes/stock_transfers_ui.inc
inventory/inquiry/stock_movements.php
manufacturing/includes/work_order_issue_ui.inc
manufacturing/manage/bom_edit.php
manufacturing/search_work_orders.php
manufacturing/work_order_add_finished.php
manufacturing/work_order_entry.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/supplier_payment.php
sales/customer_credit_invoice.php
sales/customer_delivery.php
sales/customer_invoice.php
sales/includes/ui/sales_credit_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
taxes/tax_groups.php
themes/default/renderer.php

index 37e4222db2fbe347442fd67e9765b39e36eb7ae7..dccfb0d7b1a04b9af87faaadce1763b0cbbe5f63 100644 (file)
@@ -76,8 +76,8 @@ text_row_ex(_("Name (to appear on reports):"), 'coy_name', 42, 50);
 text_row_ex(_("Official Company Number:"), 'coy_no', 25);
 text_row_ex(_("Tax Authority Reference:"), 'gst_no', 25);
 
-text_row_ex(_("Tax Periods:"), 'tax_prd', 10, 10, null, null, _('Months.'));
-text_row_ex(_("Tax Last Period:"), 'tax_last', 10, 10, null, null, _('Months back.'));
+text_row_ex(_("Tax Periods:"), 'tax_prd', 10, 10, '', null, null, _('Months.'));
+text_row_ex(_("Tax Last Period:"), 'tax_last', 10, 10, '', null, null, _('Months back.'));
 
 currencies_list_row(_("Home Currency:"), 'curr_default', $_POST['curr_default']);
 fiscalyears_list_row(_("Fiscal Year:"), 'f_year', $_POST['f_year']);
index 13e36ec7255823458d2094074aca6c39dde5f137..6e1be6fe18e55b595632ff079b9ecf37ecf91e73 100644 (file)
@@ -37,7 +37,7 @@ function update_user($user_id, $real_name, $phone, $email, $full_access, $langua
 //-----------------------------------------------------------------------------------------------
 
 function update_user_display_prefs($user_id, $price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl,
-       $showcodes, $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize)
+       $showcodes, $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints)
 {
        $sql = "UPDATE ".TB_PREF."users SET
                prices_dec=".db_escape($price_dec).",
@@ -51,7 +51,8 @@ function update_user_display_prefs($user_id, $price_dec, $qty_dec, $exrate_dec,
                tho_sep=".db_escape($tho_sep).",
                dec_sep=".db_escape($dec_sep).",
                theme=".db_escape($theme).",
-               page_size=".db_escape($pagesize)."
+               page_size=".db_escape($pagesize).",
+               show_hints=$show_hints
                WHERE user_id = ".db_escape($user_id);
 
        db_query($sql, "could not update user display prefs for $user_id");
index cafb4527dbced802e896b8553edb2e7e7a4c2ee0..2b4faf5213000d368936f79929efa3cb2adf25d4 100644 (file)
@@ -22,7 +22,7 @@ if (isset($_POST['setprefs']))
                check_value('show_codes'),
                $_POST['date_format'], $_POST['date_sep'],
                $_POST['tho_sep'], $_POST['dec_sep'],
-               $_POST['theme'], $_POST['page_size']);
+               $_POST['theme'], $_POST['page_size'], check_value('show_hints'));
 
        language::set_language($_POST['language']);
 
@@ -39,10 +39,10 @@ start_table($table_style2);
 
 table_section_title(_("Decimal Places"));
 
-text_row_ex(_("Prices/Amounts:"), 'prices', 5, 5, user_price_dec());
-text_row_ex(_("Quantities:"), 'Quantities', 5, 5, user_qty_dec());
-text_row_ex(_("Exchange Rates:"), 'Rates', 5, 5, user_exrate_dec());
-text_row_ex(_("Percentages:"), 'Percent',  5, 5, user_percent_dec());
+text_row_ex(_("Prices/Amounts:"), 'prices', 5, 5, '', user_price_dec());
+text_row_ex(_("Quantities:"), 'Quantities', 5, 5, '', user_qty_dec());
+text_row_ex(_("Exchange Rates:"), 'Rates', 5, 5, '', user_exrate_dec());
+text_row_ex(_("Percentages:"), 'Percent',  5, 5, '', user_percent_dec());
 
 table_section_title(_("Dateformat and Separators"));
 
@@ -65,6 +65,8 @@ possible separators can be added by modifying the array definition by editing th
 
 table_section_title(_("Miscellaneous"));
 
+check_row(_("Show hints for new users:"), 'show_hints', user_hints());
+
 check_row(_("Show GL Information:"), 'show_gl', user_show_gl_info());
 
 check_row(_("Show Item Codes:"), 'show_codes', user_show_codes());
index 414f655c36cf57c265c2de8eb5127b99aa54110a..62f8f6a28f30c63f65efbb47937419efdf69cadd 100644 (file)
@@ -183,8 +183,8 @@ function display_fiscalyear_edit($selected_id)
        } 
        else 
        {
-               date_row(_("Fiscal Year Begin:"), 'from_date', null, 0, 0, 1001);
-               date_row(_("Fiscal Year End:"), 'to_date', null, 0, 0, 1001);
+               date_row(_("Fiscal Year Begin:"), 'from_date', '', null, 0, 0, 1001);
+               date_row(_("Fiscal Year End:"), 'to_date', '', null, 0, 0, 1001);
        }
 
        yesno_list_row(_("Is Closed:"), 'closed', null, "", "", false);
index 66e54a38a98a8e137fc427ce4d681171397facb2..bdd1b219ca0103e7f7aeb311855cba664825fb95 100644 (file)
@@ -37,7 +37,7 @@ table_header($th);
 
 while ($type = db_fetch($systypes)) 
 {
-       ref_row(systypes::name($type["type_id"]), 'id' . $type["type_id"], $type["next_reference"]);
+       ref_row(systypes::name($type["type_id"]), 'id' . $type["type_id"], '', $type["next_reference"]);
 }
 
 end_table(1);
index cf107a4191d598c193bb8ccc7c37742688ddaf57..e61bb8d61a43be25b8fa33f1b345e68455e343e7 100644 (file)
@@ -115,7 +115,7 @@ table_section_title(_("General GL"));
 
 gl_all_accounts_list_row(_("Retained Earning Clearing Account:"), 'retained_earnings_act', $_POST['retained_earnings_act']);
 gl_all_accounts_list_row(_("Payroll Account:"), 'payroll_act', $_POST['payroll_act']);
-text_row(_("Past Due Days Interval:"), 'past_due_days', $_POST['past_due_days'], 6, 6, "", _("days"));
+text_row(_("Past Due Days Interval:"), 'past_due_days', $_POST['past_due_days'], 6, 6, '', "", _("days"));
 
 //---------------
 
@@ -177,13 +177,13 @@ gl_all_accounts_list_row(_("Item Assembly Costs Account:"), 'default_assembly_ac
 
 table_section_title(_("Manufacturing Defaults"));
 
-text_row(_("Default Work Order Required By After:"), 'default_workorder_required', $_POST['default_workorder_required'], 6, 6, "", _("days"));
+text_row(_("Default Work Order Required By After:"), 'default_workorder_required', $_POST['default_workorder_required'], 6, 6, '', "", _("days"));
 
 //----------------
 
 table_section_title(_("Dimension Defaults"));
 
-text_row(_("Default Dimension Required By After:"), 'default_dim_required', $_POST['default_dim_required'], 6, 6, "", _("days"));
+text_row(_("Default Dimension Required By After:"), 'default_dim_required', $_POST['default_dim_required'], 6, 6, '', "", _("days"));
 
 //----------------
 
index e0b89b3fbce6be7d499370799985667903322e0e..8912c11cd2fc1a4b4af8d7e84928008e6925f3d3 100644 (file)
@@ -232,7 +232,7 @@ if ($selected_id != -1)
 } 
 else 
 {
-       ref_row(_("Dimension Reference:"), 'ref', references::get_next(systypes::dimension()));
+       ref_row(_("Dimension Reference:"), 'ref', '', references::get_next(systypes::dimension()));
 }
 
 text_row_ex(_("Name") . ":", 'name', 50, 75);
@@ -243,7 +243,7 @@ number_list_row(_("Type"), 'type_', null, 1, $dim);
 
 date_row(_("Start Date") . ":", 'date_');
 
-date_row(_("Date Required By") . ":", 'due_date', null, sys_prefs::default_dimension_required_by());
+date_row(_("Date Required By") . ":", 'due_date', '', null, sys_prefs::default_dimension_required_by());
 
 textarea_row(_("Memo:"), 'memo_', null, 40, 5);
 
index 8b9d1b35c959d7bb1110cc404486d3ef2e975ff8..3b147dc182a1836c118557f7d0d339a941cfef82 100644 (file)
@@ -36,10 +36,10 @@ start_form(false, true, $_SERVER['PHP_SELF'] ."?outstanding_only=" . $outstandin
 start_table("class='tablestyle_noborder'");
 start_row();
 
-ref_cells(_("Reference:"), 'OrderNumber', null);
+ref_cells(_("Reference:"), 'OrderNumber');
 
 number_list_cells(_("Type"), 'type_', null, 0, 2);
-date_cells(_("From:"), 'FromDate', null, 0, 0, -5);
+date_cells(_("From:"), 'FromDate', '', null, 0, 0, -5);
 date_cells(_("To:"), 'ToDate');
 
 check_cells( _("Only Overdue:"), 'OverdueOnly', null);
index 6c7133de534f9e7c00340b7fc97f9456c386a4db..149db9c9f9e27cb2ebb5983ae7ddef10ca4b9f06 100644 (file)
@@ -75,7 +75,7 @@ function gl_payment_controls()
 
        bank_trans_types_list_row(_("Transfer Type:"), 'TransferType', null);
 
-    ref_row(_("Reference:"), 'ref', references::get_next(systypes::bank_transfer()));
+    ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::bank_transfer()));
 
     textarea_row(_("Memo:"), 'memo_', null, 40,4);
 
index c84b5ad3eaeba0fdf94ddd984f9205011c839a25..7c38ebc968932a7063c919e801e87135d255357a 100644 (file)
@@ -84,7 +84,7 @@ function display_order_header(&$order)
 
        bank_trans_types_list_row(_("Type:"), 'type', null);
 
-    ref_row(_("Reference:"), 'ref', references::get_next(systypes::bank_deposit()));
+    ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::bank_deposit()));
 
        echo "</table>";
 
@@ -203,9 +203,10 @@ function gl_edit_item_controls(&$order, $dim, $Index=null)
                        $_POST['code_id'] = get_company_pref('default_assembly_act');
                else    
                        $_POST['code_id'] = get_company_pref('default_inv_sales_act');
-               text_cells(null, "CodeID2", $_POST['code_id'], 12, 10, "", "", "class='combo' rel='code_id'");  
-               gl_all_accounts_list_cells(null, 'code_id', $_POST['code_id'], true, false, "class='combo' rel='CodeID2'");
-       if ($dim >= 1)
+//             text_cells(null, "CodeID2", $_POST['code_id'], 12, 10, "", "", "class='combo' rel='code_id'");  
+//             gl_all_accounts_list_cells(null, 'code_id', $_POST['code_id'], true, false, "class='combo' rel='CodeID2'");
+               gl_all_accounts_list('code_id', $_POST['code_id'], true, false, true);
+       if ($dim >= 1)
                        dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
        if ($dim > 1)
                        dimensions_list_cells(null, 'dimension2_id', null, true, " ", false, 2);
index 9e3fec28674200885e55517866af42cb000f7291..1b281e9d027ce7bf3d2029827c813e5606db3d44 100644 (file)
@@ -15,7 +15,7 @@ function display_order_header(&$Order)
        echo "<table>";
        start_row();
     date_cells(_("Date:"), 'date_');
-       ref_cells(_("Reference:"), 'ref', references::get_next(0));
+       ref_cells(_("Reference:"), 'ref', '', references::get_next(0));
        end_row();
 
        echo "</table>";
@@ -150,12 +150,11 @@ function gl_edit_item_controls(&$order, $dim, $Index=null)
                $_POST['dimension_id'] = 0;
                $_POST['dimension2_id'] = 0;
                $_POST['LineMemo'] = "";
-               $_POST['CodeID2'] = "";
+               $_POST['_code_id_edit'] = "";
                $_POST['code_id'] = "";
                
-               text_cells(null, "CodeID2", "", 12, 10, "", "", "class='combo' rel='code_id'");
                $skip_bank = ($_SESSION["wa_current_user"]->access != 2);
-               gl_all_accounts_list_cells(null, 'code_id', null, $skip_bank, false, "class='combo' rel='CodeID2'");
+               gl_all_accounts_list('code_id', null, $skip_bank, false, true);
                if ($dim >= 1)
                        dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
                if ($dim > 1)
index 486862bd30e51285d7998cbed9347130d06b8d97..0f3b0aa457d1fa466459fc9ff6bbf87829b42d68 100644 (file)
@@ -84,7 +84,7 @@ function display_order_header(&$order)
 
        bank_trans_types_list_row(_("Payment Type:"), 'type', null);
 
-    ref_row(_("Reference:"), 'ref', references::get_next(systypes::bank_payment()));
+    ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::bank_payment()));
 
        echo "</table>"; // inner table
 
@@ -205,8 +205,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null)
                        $_POST['code_id'] = get_company_pref('default_assembly_act');
                else
                        $_POST['code_id'] = get_company_pref('default_cogs_act');
-               text_cells(null, "CodeID2", $_POST['code_id'], 12, 10, "", "", "class='combo' rel='code_id'");
-               gl_all_accounts_list_cells(null, 'code_id', $_POST['code_id'], true, false, "class='combo' rel='CodeID2'");
+               gl_all_accounts_list('code_id', null, true, false, true);
                if ($dim >= 1)
                        dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1);
                if ($dim > 1)
index eab22259592a7483107f89e08aa7d1c5a02cb5f9..9407a07e2ec17fe3815f8f14f60c435f8cd0aa65 100644 (file)
@@ -28,7 +28,7 @@ start_table("class='tablestyle_noborder'");
 start_row();
 bank_accounts_list_cells(_("Account:"), 'bank_account', null);
 
-date_cells(_("From:"), 'TransAfterDate', null, -30);
+date_cells(_("From:"), 'TransAfterDate', '', null, -30);
 date_cells(_("To:"), 'TransToDate');
 
 submit_cells('Show',_("Show"));
index e91a59b2d985f1f5905e57b1bf2986b8929c0ae8..0b0c2709a93ee5aa5e69163e376eeeb16d83fdc7 100644 (file)
@@ -48,7 +48,7 @@ function gl_inquiry_controls()
 
     gl_all_accounts_list_cells(_("Account:"), 'account', null);
 
-       date_cells(_("from:"), 'TransFromDate', null, -30);
+       date_cells(_("from:"), 'TransFromDate', '', null, -30);
        date_cells(_("to:"), 'TransToDate');
     submit_cells('Show',_("Show"));
 
index 8a6ba2f9c1c65ec251fb70a53a52d6549fb91f6f..d5b7bc765759bde2317bf97e11b41308fe1dd07d 100644 (file)
@@ -26,7 +26,7 @@ function gl_inquiry_controls()
 
     start_table("class='tablestyle_noborder'");
 
-    date_cells(_("From:"), 'TransFromDate', null, -30);
+    date_cells(_("From:"), 'TransFromDate', '', null, -30);
        date_cells(_("To:"), 'TransToDate');
        check_cells(_("No zero values"), 'NoZero', null);
 
index 8485eb7633dd8f77cb4afa2774e4811049a8b484..6426408f45c0d6da787a0c19628094d7076dcd5f 100644 (file)
@@ -165,7 +165,7 @@ if ($selected_id != "")
 
 text_row_ex(_("Name:"), 'name', 50);
 
-gl_account_types_list_row(_("Subgroup Of:"), 'parent', null, true, _("None"), true);
+gl_account_types_list_row(_("Subgroup Of:"), 'parent', null, _("None"), true);
 
 class_list_row(_("Class Type:"), 'class_id', null);
 
index 6c46842f7d7b9102cc95edf3d6fa108a79934697..df1f3df88849555ecfe8f6affdbff136ced009a4 100644 (file)
@@ -232,7 +232,7 @@ text_row_ex(_("Account Name:"), 'account_name', 60);
 
 gl_account_types_list_row(_("Account Group:"), 'account_type', null);
 
-tax_types_list_row(_("Tax Type:"), 'tax_code', null, true, _('No Tax'));
+tax_types_list_row(_("Tax Type:"), 'tax_code', null, _('No Tax'));
 
 end_table(1);
 
index 12d559dd178d752d4f4d48fa75c43352785256de..9e5938eba5e2f1bc1092420b0860aa79683119f8 100644 (file)
@@ -94,9 +94,9 @@ class current_user
        }
 
        function update_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
-               $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize) {
+               $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints) {
                update_user_display_prefs($this->username, $price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl,
-                       $showcodes, $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize);
+                       $showcodes, $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints);
 
                // re-read the prefs
                $user = get_user($this->username);
@@ -228,12 +228,17 @@ function user_pagesize()
        return $_SESSION["wa_current_user"]->prefs->get_pagesize();
 }
 
+function user_hints() 
+{
+       return $_SESSION["wa_current_user"]->prefs->show_hints();
+}
+
 function set_user_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
-       $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize) 
+       $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints
 {
 
        $_SESSION["wa_current_user"]->update_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes,
-               $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize);
+               $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints);
 }
 
 function add_user_js_data() {
index 63a0828d4b4c4316a862e406f2c58235c5d3ea4f..1bd5b022f8239bb15478885b4afb90b60c46d921 100644 (file)
@@ -19,6 +19,7 @@ class user_prefs
        var $dec_sep;
        var $theme;
        var $pagesize; // for printing
+       var $show_hints;
 
        function user_prefs(&$user) 
        {
@@ -39,6 +40,7 @@ class user_prefs
                $this->dec_sep = $user["dec_sep"];
                $this->theme = $user["theme"];
                $this->pagesize = $user["page_size"];
+               $this->show_hints = $user["show_hints"];
        }
 
        function language() 
@@ -118,6 +120,11 @@ class user_prefs
                return $this->pagesize;
        }
 
+       function show_hints() 
+       {
+               return $this->show_hints;
+       }
+
        function set_dec($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes) 
        {
                $this->price_dec = $price_dec;
index 20d191f464a52c018bdb22605d97232fcf5c4241..d9d1f05759994e08cb910ad7fbb22cea81e9755f 100644 (file)
@@ -151,19 +151,22 @@ function table_header($labels)
        end_row();
 }
 
-function edit_link_cell($param)
+function edit_link_cell($param, $title=false)
 {
-       label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'>" . _("Edit") . "</a>", "nowrap");
+    label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'"
+        .($title ? " title='$title'":'').">" . _("Edit") . "</a>", "nowrap");
 }
 
-function delete_link_cell($param)
+function delete_link_cell($param, $title=false)
 {
-       label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'>" . _("Delete") . "</a>", "nowrap");
+    label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'"
+       .($title ? " title='$title'":'') .">" . _("Delete") . "</a>", "nowrap");
 }
 
-function edit_button_cell($name, $value)
+function edit_button_cell($name, $value, $title=false)
 {
-    label_cell("<input type=\"submit\" class=\"editbutton\" name=\"$name\" value=\"$value\" />\n");
+    label_cell("<input type=\"submit\" class=\"editbutton\" name=\"$name\" value=\"$value\""
+       .($title ? " title='$title'":'')." />\n");
 }
 
 //-----------------------------------------------------------------------------------
index 829ff753c98391b3f94b79f23f4aca357f267a2d..6811076c427c44bd5b66d637360c9e516dea05d0 100644 (file)
@@ -60,51 +60,53 @@ function hidden($name, $value, $echo=true)
 
 //---------------------------------------------------------------------------------
 
-function submit($name, $value, $echo=true, $async=false)
+function submit($name, $value, $echo=true, $title=false, $async=false)
 {
        default_focus($name);
        $submit_str = "<input type=\"submit\" class=\""
            .($async ? 'ajaxsubmit' : 'inputsubmit')
-           ."\" name=\"$name\"  id=\"$name\" value=\"$value\" >\n";
+           ."\" name=\"$name\"  id=\"$name\" value=\"$value\""
+           .($title ? " title='$title'" : '')
+           .">\n";
        if ($echo)
                echo $submit_str;
        else
                return $submit_str;
 }
 
-function submit_center($name, $value, $echo=true, $async=false)
+function submit_center($name, $value, $echo=true, $title=false, $async=false)
 {
        echo "<center>";
-       submit($name, $value, $echo, $async);
+       submit($name, $value, $echo, $title, $async);
        echo "</center>";
 }
 
-function submit_center_first($name, $value, $async=false)
+function submit_center_first($name, $value, $title=false, $async=false)
 {
        echo "<center>";
-       submit($name, $value, true, $async);
+       submit($name, $value, true, $title, $async);
        echo "&nbsp;";
 }
 
-function submit_center_last($name, $value, $async=false)
+function submit_center_last($name, $value, $title=false, $async=false)
 {
        echo "&nbsp;";
-       submit($name, $value, true, $async);
+       submit($name, $value, true, $title, $async);
        echo "</center>";
 }
 
-function submit_add_or_update($add=true, $async=false)
+function submit_add_or_update($add=true, $title=false, $async=false)
 {
        if ($add)
-               submit('ADD_ITEM', _("Save"), true, $async);
+               submit('ADD_ITEM', _("Save"), true, $title, $async);
        else
-               submit('UPDATE_ITEM', _("Update"), true, $async);
+               submit('UPDATE_ITEM', _("Update"), true, $title, $async);
 }
 
-function submit_add_or_update_center($add=true, $async=false)
+function submit_add_or_update_center($add=true, $title=false, $async=false)
 {
        echo "<center>";
-       submit_add_or_update($add, $async);
+       submit_add_or_update($add, $title, $async);
        echo "</center>";
 }
 
@@ -116,43 +118,45 @@ function submit_add_or_update_row($add=true)
        echo "</td></tr>\n";
 }
 */
-function submit_add_or_update_row($add=true, $right=true, $extra="", $async=false)
+function submit_add_or_update_row($add=true, $right=true, $extra="", $title=false, $async=false)
 {
        echo "<tr>";
        if ($right)
                echo "<td>&nbsp;</td>\n";
        echo "<td $extra>";
-       submit_add_or_update($add, $async);
+       submit_add_or_update($add, $title, $async);
        echo "</td></tr>\n";
 }
 
-function submit_cells($name, $value, $extra="", $async=false)
+function submit_cells($name, $value, $extra="", $title=false, $async=false)
 {
        echo "<td $extra>";
-       submit($name, $value, true, $async);
+       submit($name, $value, true, $title, $async);
        echo "</td>\n";
 }
 
-function submit_row($name, $value, $right=true, $extra="", $async=false)
+function submit_row($name, $value, $right=true, $extra="", $title=false, $async=false)
 {
        echo "<tr>";
        if ($right)
                echo "<td>&nbsp;</td>\n";
-       submit_cells($name, $value, $extra);
+       submit_cells($name, $value, $extra, $title);
        echo "</tr>\n";
 }
 //---------------------------------------------------------------------------------
 
-function button($name, $value, $onclick)
+function button($name, $value, $onclick, $title=false)
 {
        default_focus($name);
-       echo "<input type=\"button\" class=\"inputsubmit\" name=\"$name\" value=\"$value\" onclick=\"$onclick\" />\n";
+       echo "<input type=\"button\" class=\"inputsubmit\" name=\"$name\" value=\"$value\" onclick=\"$onclick\""
+           .($title ? " title='$title'" : '')
+           ." />\n";
 }
 
-function button_cell($name, $value, $onclick)
+function button_cell($name, $value, $onclick, $title=false)
 {
        echo "<td>";
-       button($name, $value, $onclick);
+       button($name, $value, $onclick, $title);
        echo "</td>\n";
 }
 
@@ -165,7 +169,7 @@ function check_value($name)
        return 1;
 }
 
-function check($label, $name, $value, $submit_on_change=false)
+function check($label, $name, $value, $submit_on_change=false, $title=false)
 {
        global $Ajax;
 
@@ -175,29 +179,29 @@ function check($label, $name, $value, $submit_on_change=false)
 
        if ($value == null)
                $value = (!isset($_POST[$name]) ? 0 : $_POST[$name]);
-       if ($value == 1)
-               echo "<input checked type='checkbox' name='$name' value='1' ";
-       else
-               echo "<input type='checkbox' name='$name' value='1'";
-       if ($submit_on_change)
-               echo " onclick='this.form.submit();' ";
-       echo " >\n";
+       
+               echo "<input"
+                   .($value == 1 ? ' checked':'')
+                   ." type='checkbox' name='$name' value='1'"
+                   .($submit_on_change ? " onclick='this.form.submit();'" : '')
+                   .($title ? " title='$title'" : '')
+                   ." >\n";
        $Ajax->addUpdate($name, $name, $value);
 }
 
-function check_cells($label, $name, $value, $submit_on_change=false)
+function check_cells($label, $name, $value, $submit_on_change=false, $title=false)
 {
        if ($label != null)
                echo "<td>$label</td>\n";
        echo "<td>";
-       check(null, $name, $value, $submit_on_change);
+       check(null, $name, $value, $submit_on_change, $title);
        echo "</td>";
 }
 
-function check_row($label, $name, $value, $submit_on_change=false)
+function check_row($label, $name, $value, $submit_on_change=false, $title=false)
 {
        echo "<tr>";
-       check_cells($label, $name, $value, $submit_on_change);
+       check_cells($label, $name, $value, $submit_on_change, $title);
        echo "</tr>\n";
 }
 
@@ -264,7 +268,7 @@ function label_row($label, $value, $params="", $params2="", $leftfill=0)
 
 //-----------------------------------------------------------------------------------
 
-function text_cells($label, $name, $value, $size="", $max="", $params="", $post_label="", $disabled="")
+function text_cells($label, $name, $value, $size="", $max="", $title=false, $params="", $post_label="", $disabled="")
 {
        global $Ajax;
 
@@ -275,7 +279,9 @@ function text_cells($label, $name, $value, $size="", $max="", $params="", $post_
 
        if ($value == null)
                $value = (!isset($_POST[$name]) ? "" : $_POST[$name]);
-       echo "<input $disabled type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" value=\"$value\">";
+       echo "<input $disabled type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" value=\"$value\""
+           .($title ? " title='$title'" : '')
+           .">";
 
        if ($post_label != "")
                echo " " . $post_label;
@@ -284,7 +290,7 @@ function text_cells($label, $name, $value, $size="", $max="", $params="", $post_
        $Ajax->addUpdate($name, $name, $value);
 }
 
-function text_cells_ex($label, $name, $size, $max=null, $init=null, $params=null, $post_label=null)
+function text_cells_ex($label, $name, $size, $max=null, $init=null, $title=null, $params=null, $post_label=null)
 {
        global $Ajax;
 
@@ -304,7 +310,8 @@ function text_cells_ex($label, $name, $size, $max=null, $init=null, $params=null
 
        echo "<td>";
 
-       echo "<input type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" value=\"" . $_POST[$name]. "\">";
+       echo "<input type=\"text\" name=\"$name\" size=\"$size\" maxlength=\"$max\" value=\"" . $_POST[$name]. "\""
+        .($title ? " title='$title'": '')." >";
 
        if ($post_label)
                echo " " . $post_label;
@@ -313,29 +320,29 @@ function text_cells_ex($label, $name, $size, $max=null, $init=null, $params=null
        $Ajax->addUpdate($name, $name, $_POST[$name]);
 }
 
-function text_row($label, $name, $value, $size, $max, $params="", $post_label="")
+function text_row($label, $name, $value, $size, $max, $title=null, $params="", $post_label="")
 {
        echo "<tr>";
 
-       text_cells($label, $name, $value, $size, $max, $params, $post_label);
+       text_cells($label, $name, $value, $size, $max, $title, $params, $post_label);
 
        echo "</tr>\n";
 }
 
 //-----------------------------------------------------------------------------------
 
-function text_row_ex($label, $name, $size, $max=null, $value=null, $params=null, $post_label=null)
+function text_row_ex($label, $name, $size, $max=null, $title=null, $value=null, $params=null, $post_label=null)
 {
        echo "<tr>";
 
-       text_cells_ex($label, $name, $size, $max, $value, $params, $post_label);
+       text_cells_ex($label, $name, $size, $max, $value, $title, $params, $post_label);
 
        echo "</tr>\n";
 }
 
 //-----------------------------------------------------------------------------------
 
-function date_cells($label, $name, $init=null, $inc_days=0, $inc_months=0, $inc_years=0, $params=null)
+function date_cells($label, $name, $title = null, $init=null, $inc_days=0, $inc_months=0, $inc_years=0, $params=null)
 {
        global $use_date_picker, $path_to_root;
        if (!isset($_POST[$name]) || $_POST[$name] == "")
@@ -364,29 +371,29 @@ function date_cells($label, $name, $init=null, $inc_days=0, $inc_months=0, $inc_
                . "     <img src='$path_to_root/themes/default/images/cal.gif' width='16' height='16' border='0' alt='"._('Click Here to Pick up the date')."'></a>\n";
        else
                $post_label = "";
-       text_cells_ex($label, $name, 9, 12, $_POST[$name], $params, $post_label);
+       text_cells_ex($label, $name, 9, 12, $_POST[$name], $title, $params, $post_label);
 }
 
-function date_row($label, $name, $init=null, $inc_days=0, $inc_months=0, $inc_years=0, $params=null)
+function date_row($label, $name, $title=null, $init=null, $inc_days=0, $inc_months=0, $inc_years=0, $params=null)
 {
        echo "<tr>";
-       date_cells($label, $name, $init, $inc_days, $inc_months, $inc_years, $params);
+       date_cells($label, $name, $title, $init, $inc_days, $inc_months, $inc_years, $params);
        echo "</tr>\n";
 }
 
 //-----------------------------------------------------------------------------------
 
-function ref_cells($label, $name, $init=null, $params=null)
+function ref_cells($label, $name, $title=null, $init=null, $params=null)
 {
-       text_cells_ex($label, $name, 16, 18, $init, $params);
+       text_cells_ex($label, $name, 16, 18, $init, $title, $params);
 }
 
 //-----------------------------------------------------------------------------------
 
-function ref_row($label, $name, $init=null)
+function ref_row($label, $name, $title=null, $init=null)
 {
        echo "<tr>";
-       ref_cells($label, $name, $init);
+       ref_cells($label, $name, $title, $init);
        echo "</tr>\n";
 }
 
@@ -503,7 +510,7 @@ function small_qty_cells($label, $name, $init=null, $params=null, $post_label=nu
 
 //-----------------------------------------------------------------------------------
 
-function textarea_cells($label, $name, $value, $cols, $rows, $params="")
+function textarea_cells($label, $name, $value, $cols, $rows, $title = null, $params="")
 {
        global $Ajax;
 
@@ -512,19 +519,21 @@ function textarea_cells($label, $name, $value, $cols, $rows, $params="")
                echo "<td $params>$label</td>\n";
        if ($value == null)
                $value = (!isset($_POST[$name]) ? "" : $_POST[$name]);
-       echo "<td><textarea name='$name' cols='$cols' rows='$rows'>$value</textarea></td>\n";
+       echo "<td><textarea name='$name' cols='$cols' rows='$rows'"
+       .($title ? " title='$title'" : '')
+       .">$value</textarea></td>\n";
        $Ajax->addUpdate($name, $name, $value);
 }
 
-function textarea_row($label, $name, $value, $cols, $rows, $params="")
+function textarea_row($label, $name, $value, $cols, $rows, $title=null, $params="")
 {
        echo "<tr>";
-       textarea_cells($label, $name, $value, $cols, $rows, $params);
+       textarea_cells($label, $name, $value, $cols, $rows, $title, $params);
        echo "</tr>\n";
 }
 
 //-----------------------------------------------------------------------------------
-
+/*
 function text_row_with_submit($label, $name, $value, $size, $max, $input_name, $input_value)
 {
        global $Ajax;
@@ -542,7 +551,7 @@ function text_row_with_submit($label, $name, $value, $size, $max, $input_name, $
        echo "</td></tr>\n";
        $Ajax->addUpdate($name, $name, $value);
 }
-
+*/
 //-----------------------------------------------------------------------------------
 
 
index 8a530b7db97bf254689aa047b24cd3fc1ea77a09..28f38f0a0723abd90d8c8130922e51e0762b27a1 100644 (file)
@@ -35,7 +35,7 @@ function display_order_header(&$order)
        echo "<table>"; // inner table
 
        locations_list_row(_("Location:"), 'StockLocation', null);
-       ref_row(_("Reference:"), 'ref', references::get_next(systypes::inventory_adjustment()));
+       ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::inventory_adjustment()));
 
        echo "</table>"; // inner table
 
index 9d3bbfa65180c8882c2c56b5ddc1ecc6457da54e..2cbfc7cc1999d29c203c647ec0e471781e923936 100644 (file)
@@ -43,7 +43,7 @@ function display_order_header(&$order)
 
        echo "<table>";
 
-       ref_row(_("Reference:"), 'ref', references::get_next(systypes::location_transfer()));
+       ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::location_transfer()));
 
     date_row(_("Date:"), 'AdjDate');
 
@@ -124,7 +124,7 @@ function transfer_edit_item_controls(&$order, $stock_id=null)
        else
        {
        echo "<TD colspan=2>";
-       stock_costable_items_list('stock_id', $_POST['stock_id'], false, true);
+       stock_costable_items_list('stock_id', null, false, true);
        echo "</TD>";
 
        $item_info = get_item_edit_info($_POST['stock_id']);
index 35e0f20575c0782d76dcd5685586da62fc970e2e..3f4332c578434e9d32a14d66bf2d71f9d2ee75e5 100644 (file)
@@ -34,7 +34,7 @@ stock_items_list_cells(_("Item:"), 'stock_id', $_POST['stock_id']);
 
 locations_list_cells(_("From Location:"), 'StockLocation', null);
 
-date_cells(_("From:"), 'AfterDate', null, -30);
+date_cells(_("From:"), 'AfterDate', '', null, -30);
 date_cells(_("To:"), 'BeforeDate');
 
 submit_cells('ShowMoves',_("Show Movements"));
index 531e9983a5186a61d4314399b3f98f388fc91fd0..8d061381f34279c1dcaaa984d370fe9cfbef8040 100644 (file)
@@ -141,7 +141,7 @@ function adjustment_options_controls()
        echo "<br>";
        start_table();
 
-    ref_row(_("Reference:"), 'ref', references::get_next(28));
+    ref_row(_("Reference:"), 'ref', '', references::get_next(28));
 
        if (!isset($_POST['IssueType']))
                $_POST['IssueType'] = 0;
index 03af80598801080679046e81d859e988ee495f77..a10606b147d308d07986cc58a84d3da948e7199b 100644 (file)
@@ -258,7 +258,7 @@ if (isset($_POST['stock_id']))
                label_cell(_("Component:"));
 
                echo "<td>";
-               stock_component_items_list('component', $selected_parent, $_POST['component'], false, true);
+               stock_component_items_list('component', $selected_parent, null, false, true);
                echo "</td>";
                end_row();
        }
index 3091a75c4f1afe4b807ff7fc738931c7b190f55e..386ff583c13ef1e58167b101d27e8a3cd3ff08b0 100644 (file)
@@ -32,7 +32,7 @@ start_form(false, false, $_SERVER['PHP_SELF'] ."?outstanding_only=" . $outstandi
 
 start_table("class='tablestyle_noborder'");
 start_row();
-ref_cells(_("Reference:"), 'OrderNumber', null);
+ref_cells(_("Reference:"), 'OrderNumber');
 
 locations_list_cells(_("at Location:"), 'StockLocation', null, true);
 
index 545b694b97794256cfcfb877ceed0b70e82948c9..0bd89bd7d5648dfa5a8b5f2b7da24be8a85f3035 100644 (file)
@@ -146,7 +146,7 @@ if (!isset($_POST['quantity']) || $_POST['quantity'] == '')
 
 start_table();
 
-ref_row(_("Reference:"), 'ref', references::get_next(29));
+ref_row(_("Reference:"), 'ref', '', references::get_next(29));
 
 if (!isset($_POST['ProductionType']))
        $_POST['ProductionType'] = 1;
index 1a192ef03fa33d50e9477e53dc4351951febdcee..1e78f7fee0e8ad0409fd3c2f4907a0fa52b82704 100644 (file)
@@ -337,9 +337,9 @@ if (isset($selected_id))
 else
 {
        $_POST['units_issued'] = $_POST['released'] = 0;
-       ref_row(_("Reference:"), 'wo_ref', references::get_next(systypes::work_order()));
+       ref_row(_("Reference:"), 'wo_ref', '', references::get_next(systypes::work_order()));
 
-       wo_types_list_row(_("Type:"), 'type', $_POST['type']);
+       wo_types_list_row(_("Type:"), 'type', null);
 }
 
 if ($_POST['released'] == true)
@@ -361,13 +361,13 @@ else
 if (!isset($_POST['quantity']))
        $_POST['quantity'] = qty_format(1);
 
-if ($_POST['type'] == wo_types::advanced())
+if (get_post('type') == wo_types::advanced())
 {
     qty_row(_("Quantity Required:"), 'quantity', 12);
     if ($_POST['released'])
        label_row(_("Quantity Manufactured:"), qty_format($_POST['units_issued']));
     date_row(_("Date") . ":", 'date_');
-       date_row(_("Date Required By") . ":", 'RequDate', null, sys_prefs::default_wo_required_by());
+       date_row(_("Date Required By") . ":", 'RequDate', '', null, sys_prefs::default_wo_required_by());
 }
 else
 {
index 4a5835ee79140fad706b5b59d22c93c1eafecded..f1b271c078ca23cd0b50a0949099c1c9c0743362 100644 (file)
@@ -25,7 +25,7 @@ function display_grn_summary(&$po, $editable=false)
     {
        if (!isset($_POST['ref']))
            $_POST['ref'] = references::get_next(25);
-       ref_cells(_("Reference"), 'ref', null, "class='tableheader2'");
+       ref_cells(_("Reference"), 'ref', '', null, "class='tableheader2'");
                
         if (!isset($_POST['Location']))
                $_POST['Location'] = $po->Location;
@@ -35,7 +35,7 @@ function display_grn_summary(&$po, $editable=false)
        if (!isset($_POST['DefaultReceivedDate']))
                $_POST['DefaultReceivedDate'] = Today();
        
-       date_cells(_("Date Items Received"), 'DefaultReceivedDate', null, 0, 0, 0, "class='tableheader2'");    
+       date_cells(_("Date Items Received"), 'DefaultReceivedDate', '', null, 0, 0, 0, "class='tableheader2'");    
         
     } 
     else 
index 7af53f0cf36fcb51d41267481f41e91c9f9e7df1..da5c2ecd90d520db4dd11668a8bf27870d3f37e4 100644 (file)
@@ -70,9 +70,9 @@ function invoice_header(&$supp_trans)
        }
 
        if ($supp_trans->is_invoice)
-       ref_row(_("Reference:"), 'reference', references::get_next(20));
+       ref_row(_("Reference:"), 'reference', '', references::get_next(20));
     else
-       ref_row(_("Reference:"), 'reference', references::get_next(21));
+       ref_row(_("Reference:"), 'reference', '', references::get_next(21));
 
        text_row(_("Supplier's Ref.:"), 'supp_reference', $_POST['supp_reference'], 20, 20);
 
@@ -82,9 +82,9 @@ function invoice_header(&$supp_trans)
 
        echo "<table width=100%>";
 
-       date_row(_("Date") . ":", 'tran_date', null, 0, 0, 0, "", true);
+       date_row(_("Date") . ":", 'tran_date', '', null, 0, 0, 0, "", true);
 
-    date_row(_("Due Date") . ":", 'due_date', null);
+    date_row(_("Due Date") . ":", 'due_date');
 
     label_row(_("Terms:"), $supp_trans->terms_description);
 
index e6e1965d417cc230e9f45c60ab45390640f2a0d1..d76073bde355eed3985174f3852b6261ddacedaa 100644 (file)
@@ -84,7 +84,7 @@ function display_po_header(&$order)
 
     if ($editable)
     {
-       ref_row(_("Reference:"), 'ref', references::get_next(systypes::po()));
+       ref_row(_("Reference:"), 'ref', '', references::get_next(systypes::po()));
     }
     else
     {
@@ -106,7 +106,7 @@ function display_po_header(&$order)
        //      if (!is_date_in_fiscalyear($_POST['OrderDate']))
        //              $_POST['OrderDate'] = end_fiscalyear();
        //}
-       date_row(_("Order Date:"), 'OrderDate', $_POST['OrderDate'], 0, 0, 0);
+       date_row(_("Order Date:"), 'OrderDate', '', $_POST['OrderDate'], 0, 0, 0);
 
        text_row(_("Supplier's Reference:"), 'Requisition', null, 16, 15);
 
@@ -294,18 +294,7 @@ function po_item_controls(&$order, $stock_id=null)
        {
                hidden('line_no', ($_SESSION['PO']->lines_on_order + 1));
 
-               $no_item_list = get_company_pref('no_item_list');
-               if ($no_item_list)
-               {
-                       echo "<td colspan=2 nowrap>\n";
-                       stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true);
-                       echo "</td>\n";
-               }
-               else
-               {
-                       text_cells(null, "StockID2", "", 12, 10, "", "", "class='combo' rel='stock_id' onblur='submit()'");
-                       stock_purchasable_items_list_cells(null, 'stock_id', $_POST['stock_id'], false, true, "class='combo' rel='StockID2'");
-               }
+               stock_purchasable_items_list_cells(null, 'stock_id', null, false, true);
        $item_info = get_item_edit_info($_POST['stock_id']);
                $_POST['units'] = $item_info["units"];
 
@@ -317,7 +306,7 @@ function po_item_controls(&$order, $stock_id=null)
        qty_cells(null, 'qty', null);
 
        label_cell($_POST['units']);
-       date_cells(null, 'req_del_date', null, 0, 0, 0);
+       date_cells(null, 'req_del_date', '', null, 0, 0, 0);
        amount_cells(null, 'price', null);
 
        //$line_total = $_POST['qty'] * $_POST['price'] * (1 - $_POST['Disc'] / 100);
index 4c65b5b0b856cb103d12280429ddd98892f24904..93dcffe91de1c3e779daecb73867023308c8c86f 100644 (file)
@@ -27,7 +27,7 @@ start_table("class='tablestyle_noborder'");
 start_row();
 ref_cells(_("#:"), 'order_number');
 
-date_cells(_("from:"), 'OrdersAfterDate', null, -30);
+date_cells(_("from:"), 'OrdersAfterDate', '', null, -30);
 date_cells(_("to:"), 'OrdersToDate');
 
 locations_list_cells(_("Location:"), 'StockLocation', null, true);
index 8c18824a8949a18d281f8c59d55d8f1b3bf8529d..160763db78d09d01b3da590b099e5ac10f90155c 100644 (file)
@@ -26,7 +26,7 @@ start_table("class='tablestyle_noborder'");
 start_row();
 ref_cells(_("#:"), 'order_number');
 
-date_cells(_("from:"), 'OrdersAfterDate', null, -30);
+date_cells(_("from:"), 'OrdersAfterDate', '', null, -30);
 date_cells(_("to:"), 'OrdersToDate');
 
 locations_list_cells(_("into location:"), 'StockLocation', null, true);
index 3e233b1477bcbbb5dc9e12b512c5d88eb7af95f2..8d306f1c2e36613488c225e3aebc88c2579a7a62 100644 (file)
@@ -37,8 +37,8 @@ start_row();
 
 supplier_list_cells(_("Select a supplier: "), 'supplier_id', $_POST['supplier_id'], true);
 
-date_cells(_("From:"), 'TransAfterDate', null, -30);
-date_cells(_("To:"), 'TransToDate', null, 1);
+date_cells(_("From:"), 'TransAfterDate', '', null, -30);
+date_cells(_("To:"), 'TransToDate', '', null, 1);
 
 supp_allocations_list_cells("filterType", null);
 
index 3ad2fd261e0e17662d47b04d7c858bca472a31fa..09e599266ec962923ad21bc78511f0202db0c0ac 100644 (file)
@@ -35,7 +35,7 @@ start_row();
 
 supplier_list_cells(_("Select a supplier:"), 'supplier_id', null, true);
 
-date_cells(_("From:"), 'TransAfterDate', null, -30);
+date_cells(_("From:"), 'TransAfterDate', '', null, -30);
 date_cells(_("To:"), 'TransToDate');
 
 supp_allocations_list_cells("filterType", null);
index 4c99f95d00aef928f0f146b8950baecbf1540c7a..5994a2d31391457392fab30bf0c533510bd66952 100644 (file)
@@ -92,7 +92,7 @@ function display_controls()
 
        bank_trans_types_list_row(_("Payment Type:"), 'PaymentType', null);
 
-    ref_row(_("Reference:"), 'ref', references::get_next(22));
+    ref_row(_("Reference:"), 'ref', '', references::get_next(22));
 
     text_row(_("Memo:"), 'memo_', null, 52,50);
 
index ed9d2390e9085875d63fe514d6442a60815f23d4..e9fb3a007b499f44bc6fe5055ee126484f3eafae 100644 (file)
@@ -228,7 +228,7 @@ function display_credit_items()
 //             $_POST['ref'] = references::get_next(11);
 
     if ($_SESSION['Items']->trans_no==0) {
-               ref_cells(_("Reference"), 'ref', $_SESSION['Items']->reference, "class='tableheader2'");
+               ref_cells(_("Reference"), 'ref', '', $_SESSION['Items']->reference, "class='tableheader2'");
        } else {
                label_cells(_("Reference"), $_SESSION['Items']->reference, "class='tableheader2'");
        }
@@ -254,7 +254,7 @@ function display_credit_items()
 
     label_row(_("Invoice Date"), $_SESSION['Items']->src_date, "class='tableheader2'");
 
-    date_row(_("Credit Note Date"), 'CreditDate', null, 0, 0, 0, "class='tableheader2'");
+    date_row(_("Credit Note Date"), 'CreditDate', '', null, 0, 0, 0, "class='tableheader2'");
 
     end_table();
 
index db8a51b848de253c3e8e345adcffea5ff3a262cd..5d0aaa1cbda6bab31974b0cf2b2b767173139fce 100644 (file)
@@ -299,7 +299,7 @@ start_row();
 //     $_POST['ref'] = references::get_next(13);
 
 if ($_SESSION['Items']->trans_no==0) {
-       ref_cells(_("Reference"), 'ref', $_SESSION['Items']->reference, "class='tableheader2'");
+       ref_cells(_("Reference"), 'ref', '', $_SESSION['Items']->reference, "class='tableheader2'");
 } else {
        label_cells(_("Reference"), $_SESSION['Items']->reference, "class='tableheader2'");
 }
@@ -329,7 +329,7 @@ if (!isset($_POST['DispatchDate']) || !is_date($_POST['DispatchDate'])) {
                $_POST['DispatchDate'] = end_fiscalyear();
        }
 }
-date_cells(_("Date"), 'DispatchDate', $_POST['DispatchDate'], 0, 0, 0, "class='tableheader2'");
+date_cells(_("Date"), 'DispatchDate', '', $_POST['DispatchDate'], 0, 0, 0, "class='tableheader2'");
 end_row();
 
 end_table();
@@ -341,7 +341,7 @@ start_table("$table_style width=90%");
 if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) {
        $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->customer_id, $_POST['DispatchDate']);
 }
-date_row(_("Invoice Dead-line"), 'due_date', $_POST['due_date'], 0, 0, 0, "class='tableheader2'");
+date_row(_("Invoice Dead-line"), 'due_date', '', $_POST['due_date'], 0, 0, 0, "class='tableheader2'");
 end_table();
 
 echo "</td></tr>";
index 4b40b81de6b59bfeb5743d78548a320de8341f63..9a6da912b01273dbea7b8c5b3f34ba391970f410 100644 (file)
@@ -282,7 +282,7 @@ end_row();
 start_row();
 
 if ($_SESSION['Items']->trans_no == 0) {
-       ref_cells(_("Reference"), 'ref', $_SESSION['Items']->reference, "class='tableheader2'");
+       ref_cells(_("Reference"), 'ref', '', $_SESSION['Items']->reference, "class='tableheader2'");
 } else {
        label_cells(_("Reference"), $_SESSION['Items']->reference, "class='tableheader2'");
 }
@@ -308,13 +308,13 @@ if (!isset($_POST['InvoiceDate']) || !is_date($_POST['InvoiceDate'])) {
        }
 }
 
-date_cells(_("Date"), 'InvoiceDate', $_POST['InvoiceDate'], 0, 0, 0, "class='tableheader2'");
+date_cells(_("Date"), 'InvoiceDate', '', $_POST['InvoiceDate'], 0, 0, 0, "class='tableheader2'");
 
 if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) {
        $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->customer_id, $_POST['InvoiceDate']);
 }
 
-date_cells(_("Due Date"), 'due_date', $_POST['due_date'], 0, 0, 0, "class='tableheader2'");
+date_cells(_("Due Date"), 'due_date', '', $_POST['due_date'], 0, 0, 0, "class='tableheader2'");
 
 end_row();
 end_table();
index 5acd6ac3d1bd8139ee0f53fe88ac12cda942bad5..156145ad9bbc6dce2aa04103bf4288f6a608d574 100644 (file)
@@ -192,18 +192,8 @@ function credit_edit_item_controls(&$order, $rowcounter, $line_no=-1)
        }
        else
        {
-               if (get_company_pref('no_item_list'))
-               {
-                       echo "<td colspan=2 nowrap>\n";
-                       stock_items_list('stock_id', null, false, true);
-                       echo "</td>\n";
-               }
-               else
-               {
-               text_cells(null, "StockID2", '', 12, 10, "", "", "class='combo' rel='stock_id'"/* " onblur='submit();'"*/);
-               stock_items_list_cells(null, 'stock_id', null, false, false, "class='combo' rel='StockID2'");
-               }
-               $item_info = get_item_edit_info($_POST['stock_id']);
+               stock_items_list_cells(null,'stock_id', null, false, true);
+               $item_info = get_item_edit_info($_POST['stock_id']);
 
                $_POST['units'] = $item_info["units"];
 
index c20262d5acbb17d3a39e14cf62dfe44d953c7123..700bb18557f4dc46bdc972b41aeee90ac31ceb6a 100644 (file)
@@ -31,8 +31,8 @@ start_row();
 
 customer_list_cells(_("Select a customer: "), 'customer_id', $_POST['customer_id'], true);
 
-date_cells(_("from:"), 'TransAfterDate', null, -30);
-date_cells(_("to:"), 'TransToDate', null, 1);
+date_cells(_("from:"), 'TransAfterDate', '', null, -30);
+date_cells(_("to:"), 'TransToDate', '', null, 1);
 
 cust_allocations_list_cells(_("Type:"), 'filterType', null);
 
index ab2cdd6172ebefcc3bc074a2b6d54bbc1fb9c93e..1bffa40be39e8708c78e22e24109bbc8982ca99e 100644 (file)
@@ -33,8 +33,8 @@ start_row();
 
 customer_list_cells(_("Select a customer: "), 'customer_id', null, true);
 
-date_cells(_("From:"), 'TransAfterDate', null, -30);
-date_cells(_("To:"), 'TransToDate', null, 1);
+date_cells(_("From:"), 'TransAfterDate', '', null, -30);
+date_cells(_("To:"), 'TransToDate', '', null, 1);
 
 if (!isset($_POST['filterType']))
        $_POST['filterType'] = 0;
index ab2add937a0a71a3ed8f112a1e68281be01b2ee1..7ae41594f0df146f585d83a2f691841f6fc83d35 100644 (file)
@@ -83,8 +83,8 @@ start_form(false, false, $_SERVER['PHP_SELF'] ."?OutstandingOnly=" . $_POST['Out
 start_table("class='tablestyle_noborder'");
 start_row();
 ref_cells(_("#:"), 'DeliveryNumber');
-date_cells(_("from:"), 'DeliveryAfterDate', null, -30);
-date_cells(_("to:"), 'DeliveryToDate', null, 1);
+date_cells(_("from:"), 'DeliveryAfterDate', '', null, -30);
+date_cells(_("to:"), 'DeliveryToDate', '', null, 1);
 
 locations_list_cells(_("Location:"), 'StockLocation', null, true);
 
index 7ff12fbabde89cf20e333f86ac0f5a7467ce6b68..82c103958d9c8b8e8ddb9d05174d4e7083a3afac 100644 (file)
@@ -71,8 +71,8 @@ start_row();
 ref_cells(_("#:"), 'OrderNumber');
 if ($_POST['order_view_mode'] != 'DeliveryTemplates' && $_POST['order_view_mode'] != 'InvoiceTemplates')
 {
-       date_cells(_("from:"), 'OrdersAfterDate', null, -30);
-       date_cells(_("to:"), 'OrdersToDate', null, 1);
+       date_cells(_("from:"), 'OrdersAfterDate', '', null, -30);
+       date_cells(_("to:"), 'OrdersToDate', '', null, 1);
 }
 locations_list_cells(_("Location:"), 'StockLocation', null, true);
 
index 398d6255f485aff7b1e32db5cd13c8435585e4d4..e7f99f21e86b3b213ec66d7a9535caca1d6a6375 100644 (file)
@@ -210,7 +210,7 @@ for ($i = 0; $i < 5; $i++)
        start_row();
        if (!isset($_POST['tax_type_id' . $i]))
                $_POST['tax_type_id' . $i] = 0;
-       tax_types_list_cells(null, 'tax_type_id' . $i, $_POST['tax_type_id' . $i], true, _("None"), true);
+       tax_types_list_cells(null, 'tax_type_id' . $i, $_POST['tax_type_id' . $i], _("None"), true);
 
        if ($_POST['tax_type_id' . $i] != 0 && $_POST['tax_type_id' . $i] != reserved_words::get_all_numeric()) 
        {
index 924c82e2208aeeb154ab9b5a58455adf9e8b6b3f..c60aec746f4cc2294a5d982fa820713a0d595d5f 100644 (file)
@@ -42,7 +42,6 @@
                                                SID ."'>" .$name . "</a>";
                                }
                                echo "</div>";
-
                                echo "</td></tr></table>";
 
                                echo "<table class=logoutBar>";
 
                        if ($title && !$no_menu && !$is_index)
                        {
-                               echo "<center><table width='100%'><tr><td width='100%' class='titletext'>$title</td></tr></table></center>";
+                               echo "<center><table width='100%'><tr><td width='100%' class='titletext'>$title</td>"
+                               ."<td align=right>"
+                               .(user_hints() ? "<span id='hints'></span>" : '')
+                               ."</td>"
+                               ."</tr></table></center>";
                        }
 
                        if (!$is_index)
                        {
                                echo "<table align='center' id='footer'>\n";
                                echo "<tr>\n";
-                               echo "<td align='center' class='footer'><a target='_blank' href='$power_url'><font color='#ffffff'>$app_title $version - " . _("Theme:") . " " . user_theme() . "</font></a></td>\n";
+                               echo "<td align='center' class='footer'><a target='_blank' href='$power_url' tabindex='-1'><font color='#ffffff'>$app_title $version - " . _("Theme:") . " " . user_theme() . "</font></a></td>\n";
                                echo "</tr>\n";
                                echo "<tr>\n";
-                               echo "<td align='center' class='footer'><a target='_blank' href='$power_url'><font color='#ffff00'>$power_by</font></a></td>\n";
+                               echo "<td align='center' class='footer'><a target='_blank' href='$power_url' tabindex='-1'><font color='#ffff00'>$power_by</font></a></td>\n";
                                echo "</tr>\n";
                                if ($allow_demo_mode==true)
                                {