From d67d5295b9342c011697ce4df325197e29898588 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Fri, 6 Jun 2008 22:31:20 +0000 Subject: [PATCH] Changed API for input/lists functions, added empty hints when needed --- admin/company_preferences.php | 4 +- admin/db/users_db.inc | 5 +- admin/display_prefs.php | 12 +- admin/fiscalyears.php | 4 +- admin/forms_setup.php | 2 +- admin/gl_setup.php | 6 +- dimensions/dimension_entry.php | 4 +- dimensions/inquiry/search_dimensions.php | 4 +- gl/bank_transfer.php | 2 +- gl/includes/ui/gl_deposit_ui.inc | 9 +- gl/includes/ui/gl_journal_ui.inc | 7 +- gl/includes/ui/gl_payment_ui.inc | 5 +- gl/inquiry/bank_inquiry.php | 2 +- gl/inquiry/gl_account_inquiry.php | 2 +- gl/inquiry/gl_trial_balance.php | 2 +- gl/manage/gl_account_types.php | 2 +- gl/manage/gl_accounts.php | 2 +- includes/current_user.inc | 13 +- includes/prefs/userprefs.inc | 7 + includes/ui/ui_controls.inc | 15 ++- includes/ui/ui_input.inc | 123 ++++++++++-------- inventory/includes/item_adjustments_ui.inc | 2 +- inventory/includes/stock_transfers_ui.inc | 4 +- inventory/inquiry/stock_movements.php | 2 +- .../includes/work_order_issue_ui.inc | 2 +- manufacturing/manage/bom_edit.php | 2 +- manufacturing/search_work_orders.php | 2 +- manufacturing/work_order_add_finished.php | 2 +- manufacturing/work_order_entry.php | 8 +- purchasing/includes/ui/grn_ui.inc | 4 +- purchasing/includes/ui/invoice_ui.inc | 8 +- purchasing/includes/ui/po_ui.inc | 19 +-- purchasing/inquiry/po_search.php | 2 +- purchasing/inquiry/po_search_completed.php | 2 +- .../inquiry/supplier_allocation_inquiry.php | 4 +- purchasing/inquiry/supplier_inquiry.php | 2 +- purchasing/supplier_payment.php | 2 +- sales/customer_credit_invoice.php | 4 +- sales/customer_delivery.php | 6 +- sales/customer_invoice.php | 6 +- sales/includes/ui/sales_credit_ui.inc | 14 +- sales/inquiry/customer_allocation_inquiry.php | 4 +- sales/inquiry/customer_inquiry.php | 4 +- sales/inquiry/sales_deliveries_view.php | 4 +- sales/inquiry/sales_orders_view.php | 4 +- taxes/tax_groups.php | 2 +- themes/default/renderer.php | 11 +- 47 files changed, 183 insertions(+), 175 deletions(-) diff --git a/admin/company_preferences.php b/admin/company_preferences.php index 37e4222d..dccfb0d7 100644 --- a/admin/company_preferences.php +++ b/admin/company_preferences.php @@ -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']); diff --git a/admin/db/users_db.inc b/admin/db/users_db.inc index 13e36ec7..6e1be6fe 100644 --- a/admin/db/users_db.inc +++ b/admin/db/users_db.inc @@ -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"); diff --git a/admin/display_prefs.php b/admin/display_prefs.php index cafb4527..2b4faf52 100644 --- a/admin/display_prefs.php +++ b/admin/display_prefs.php @@ -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()); diff --git a/admin/fiscalyears.php b/admin/fiscalyears.php index 414f655c..62f8f6a2 100644 --- a/admin/fiscalyears.php +++ b/admin/fiscalyears.php @@ -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); diff --git a/admin/forms_setup.php b/admin/forms_setup.php index 66e54a38..bdd1b219 100644 --- a/admin/forms_setup.php +++ b/admin/forms_setup.php @@ -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); diff --git a/admin/gl_setup.php b/admin/gl_setup.php index cf107a41..e61bb8d6 100644 --- a/admin/gl_setup.php +++ b/admin/gl_setup.php @@ -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")); //---------------- diff --git a/dimensions/dimension_entry.php b/dimensions/dimension_entry.php index e0b89b3f..8912c11c 100644 --- a/dimensions/dimension_entry.php +++ b/dimensions/dimension_entry.php @@ -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); diff --git a/dimensions/inquiry/search_dimensions.php b/dimensions/inquiry/search_dimensions.php index 8b9d1b35..3b147dc1 100644 --- a/dimensions/inquiry/search_dimensions.php +++ b/dimensions/inquiry/search_dimensions.php @@ -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); diff --git a/gl/bank_transfer.php b/gl/bank_transfer.php index 6c7133de..149db9c9 100644 --- a/gl/bank_transfer.php +++ b/gl/bank_transfer.php @@ -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); diff --git a/gl/includes/ui/gl_deposit_ui.inc b/gl/includes/ui/gl_deposit_ui.inc index c84b5ad3..7c38ebc9 100644 --- a/gl/includes/ui/gl_deposit_ui.inc +++ b/gl/includes/ui/gl_deposit_ui.inc @@ -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 ""; @@ -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); diff --git a/gl/includes/ui/gl_journal_ui.inc b/gl/includes/ui/gl_journal_ui.inc index 9e3fec28..1b281e9d 100644 --- a/gl/includes/ui/gl_journal_ui.inc +++ b/gl/includes/ui/gl_journal_ui.inc @@ -15,7 +15,7 @@ function display_order_header(&$Order) echo ""; 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 "
"; @@ -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) diff --git a/gl/includes/ui/gl_payment_ui.inc b/gl/includes/ui/gl_payment_ui.inc index 486862bd..0f3b0aa4 100644 --- a/gl/includes/ui/gl_payment_ui.inc +++ b/gl/includes/ui/gl_payment_ui.inc @@ -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 ""; // 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) diff --git a/gl/inquiry/bank_inquiry.php b/gl/inquiry/bank_inquiry.php index eab22259..9407a07e 100644 --- a/gl/inquiry/bank_inquiry.php +++ b/gl/inquiry/bank_inquiry.php @@ -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")); diff --git a/gl/inquiry/gl_account_inquiry.php b/gl/inquiry/gl_account_inquiry.php index e91a59b2..0b0c2709 100644 --- a/gl/inquiry/gl_account_inquiry.php +++ b/gl/inquiry/gl_account_inquiry.php @@ -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")); diff --git a/gl/inquiry/gl_trial_balance.php b/gl/inquiry/gl_trial_balance.php index 8a6ba2f9..d5b7bc76 100644 --- a/gl/inquiry/gl_trial_balance.php +++ b/gl/inquiry/gl_trial_balance.php @@ -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); diff --git a/gl/manage/gl_account_types.php b/gl/manage/gl_account_types.php index 8485eb76..6426408f 100644 --- a/gl/manage/gl_account_types.php +++ b/gl/manage/gl_account_types.php @@ -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); diff --git a/gl/manage/gl_accounts.php b/gl/manage/gl_accounts.php index 6c46842f..df1f3df8 100644 --- a/gl/manage/gl_accounts.php +++ b/gl/manage/gl_accounts.php @@ -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); diff --git a/includes/current_user.inc b/includes/current_user.inc index 12d559dd..9e5938eb 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -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() { diff --git a/includes/prefs/userprefs.inc b/includes/prefs/userprefs.inc index 63a0828d..1bd5b022 100644 --- a/includes/prefs/userprefs.inc +++ b/includes/prefs/userprefs.inc @@ -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; diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index 20d191f4..d9d1f057 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -151,19 +151,22 @@ function table_header($labels) end_row(); } -function edit_link_cell($param) +function edit_link_cell($param, $title=false) { - label_cell("" . _("Edit") . "", "nowrap"); + label_cell("" . _("Edit") . "", "nowrap"); } -function delete_link_cell($param) +function delete_link_cell($param, $title=false) { - label_cell("" . _("Delete") . "", "nowrap"); + label_cell("" . _("Delete") . "", "nowrap"); } -function edit_button_cell($name, $value) +function edit_button_cell($name, $value, $title=false) { - label_cell("\n"); + label_cell("\n"); } //----------------------------------------------------------------------------------- diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 829ff753..6811076c 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -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 = "\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 "
"; - submit($name, $value, $echo, $async); + submit($name, $value, $echo, $title, $async); echo "
"; } -function submit_center_first($name, $value, $async=false) +function submit_center_first($name, $value, $title=false, $async=false) { echo "
"; - submit($name, $value, true, $async); + submit($name, $value, true, $title, $async); echo " "; } -function submit_center_last($name, $value, $async=false) +function submit_center_last($name, $value, $title=false, $async=false) { echo " "; - submit($name, $value, true, $async); + submit($name, $value, true, $title, $async); echo "
"; } -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 "
"; - submit_add_or_update($add, $async); + submit_add_or_update($add, $title, $async); echo "
"; } @@ -116,43 +118,45 @@ function submit_add_or_update_row($add=true) echo "\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 ""; if ($right) echo " \n"; echo ""; - submit_add_or_update($add, $async); + submit_add_or_update($add, $title, $async); echo "\n"; } -function submit_cells($name, $value, $extra="", $async=false) +function submit_cells($name, $value, $extra="", $title=false, $async=false) { echo ""; - submit($name, $value, true, $async); + submit($name, $value, true, $title, $async); echo "\n"; } -function submit_row($name, $value, $right=true, $extra="", $async=false) +function submit_row($name, $value, $right=true, $extra="", $title=false, $async=false) { echo ""; if ($right) echo " \n"; - submit_cells($name, $value, $extra); + submit_cells($name, $value, $extra, $title); echo "\n"; } //--------------------------------------------------------------------------------- -function button($name, $value, $onclick) +function button($name, $value, $onclick, $title=false) { default_focus($name); - echo "\n"; + echo "\n"; } -function button_cell($name, $value, $onclick) +function button_cell($name, $value, $onclick, $title=false) { echo ""; - button($name, $value, $onclick); + button($name, $value, $onclick, $title); echo "\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 "\n"; + + echo "\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 "$label\n"; echo ""; - check(null, $name, $value, $submit_on_change); + check(null, $name, $value, $submit_on_change, $title); echo ""; } -function check_row($label, $name, $value, $submit_on_change=false) +function check_row($label, $name, $value, $submit_on_change=false, $title=false) { echo ""; - check_cells($label, $name, $value, $submit_on_change); + check_cells($label, $name, $value, $submit_on_change, $title); echo "\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 ""; + echo ""; 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 ""; - echo ""; + echo ""; 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 ""; - text_cells($label, $name, $value, $size, $max, $params, $post_label); + text_cells($label, $name, $value, $size, $max, $title, $params, $post_label); echo "\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 ""; - text_cells_ex($label, $name, $size, $max, $value, $params, $post_label); + text_cells_ex($label, $name, $size, $max, $value, $title, $params, $post_label); echo "\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_ . " "._(\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 ""; - 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 "\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 ""; - ref_cells($label, $name, $init); + ref_cells($label, $name, $title, $init); echo "\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 "$label\n"; if ($value == null) $value = (!isset($_POST[$name]) ? "" : $_POST[$name]); - echo "\n"; + echo "\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 ""; - textarea_cells($label, $name, $value, $cols, $rows, $params); + textarea_cells($label, $name, $value, $cols, $rows, $title, $params); echo "\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 "\n"; $Ajax->addUpdate($name, $name, $value); } - +*/ //----------------------------------------------------------------------------------- diff --git a/inventory/includes/item_adjustments_ui.inc b/inventory/includes/item_adjustments_ui.inc index 8a530b7d..28f38f0a 100644 --- a/inventory/includes/item_adjustments_ui.inc +++ b/inventory/includes/item_adjustments_ui.inc @@ -35,7 +35,7 @@ function display_order_header(&$order) echo ""; // 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 "
"; // inner table diff --git a/inventory/includes/stock_transfers_ui.inc b/inventory/includes/stock_transfers_ui.inc index 9d3bbfa6..2cbfc7cc 100644 --- a/inventory/includes/stock_transfers_ui.inc +++ b/inventory/includes/stock_transfers_ui.inc @@ -43,7 +43,7 @@ function display_order_header(&$order) echo ""; - 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 ""; $item_info = get_item_edit_info($_POST['stock_id']); diff --git a/inventory/inquiry/stock_movements.php b/inventory/inquiry/stock_movements.php index 35e0f205..3f4332c5 100644 --- a/inventory/inquiry/stock_movements.php +++ b/inventory/inquiry/stock_movements.php @@ -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")); diff --git a/manufacturing/includes/work_order_issue_ui.inc b/manufacturing/includes/work_order_issue_ui.inc index 531e9983..8d061381 100644 --- a/manufacturing/includes/work_order_issue_ui.inc +++ b/manufacturing/includes/work_order_issue_ui.inc @@ -141,7 +141,7 @@ function adjustment_options_controls() echo "
"; 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; diff --git a/manufacturing/manage/bom_edit.php b/manufacturing/manage/bom_edit.php index 03af8059..a10606b1 100644 --- a/manufacturing/manage/bom_edit.php +++ b/manufacturing/manage/bom_edit.php @@ -258,7 +258,7 @@ if (isset($_POST['stock_id'])) label_cell(_("Component:")); echo ""; end_row(); } diff --git a/manufacturing/search_work_orders.php b/manufacturing/search_work_orders.php index 3091a75c..386ff583 100644 --- a/manufacturing/search_work_orders.php +++ b/manufacturing/search_work_orders.php @@ -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); diff --git a/manufacturing/work_order_add_finished.php b/manufacturing/work_order_add_finished.php index 545b694b..0bd89bd7 100644 --- a/manufacturing/work_order_add_finished.php +++ b/manufacturing/work_order_add_finished.php @@ -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; diff --git a/manufacturing/work_order_entry.php b/manufacturing/work_order_entry.php index 1a192ef0..1e78f7fe 100644 --- a/manufacturing/work_order_entry.php +++ b/manufacturing/work_order_entry.php @@ -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 { diff --git a/purchasing/includes/ui/grn_ui.inc b/purchasing/includes/ui/grn_ui.inc index 4a5835ee..f1b271c0 100644 --- a/purchasing/includes/ui/grn_ui.inc +++ b/purchasing/includes/ui/grn_ui.inc @@ -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 diff --git a/purchasing/includes/ui/invoice_ui.inc b/purchasing/includes/ui/invoice_ui.inc index 7af53f0c..da5c2ecd 100644 --- a/purchasing/includes/ui/invoice_ui.inc +++ b/purchasing/includes/ui/invoice_ui.inc @@ -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 "
"; - stock_costable_items_list('stock_id', $_POST['stock_id'], false, true); + stock_costable_items_list('stock_id', null, false, true); echo ""; - stock_component_items_list('component', $selected_parent, $_POST['component'], false, true); + stock_component_items_list('component', $selected_parent, null, false, true); echo "
"; - 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); diff --git a/purchasing/includes/ui/po_ui.inc b/purchasing/includes/ui/po_ui.inc index e6e1965d..d76073bd 100644 --- a/purchasing/includes/ui/po_ui.inc +++ b/purchasing/includes/ui/po_ui.inc @@ -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 "\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); diff --git a/purchasing/inquiry/po_search.php b/purchasing/inquiry/po_search.php index 4c65b5b0..93dcffe9 100644 --- a/purchasing/inquiry/po_search.php +++ b/purchasing/inquiry/po_search.php @@ -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); diff --git a/purchasing/inquiry/po_search_completed.php b/purchasing/inquiry/po_search_completed.php index 8c18824a..160763db 100644 --- a/purchasing/inquiry/po_search_completed.php +++ b/purchasing/inquiry/po_search_completed.php @@ -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); diff --git a/purchasing/inquiry/supplier_allocation_inquiry.php b/purchasing/inquiry/supplier_allocation_inquiry.php index 3e233b14..8d306f1c 100644 --- a/purchasing/inquiry/supplier_allocation_inquiry.php +++ b/purchasing/inquiry/supplier_allocation_inquiry.php @@ -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); diff --git a/purchasing/inquiry/supplier_inquiry.php b/purchasing/inquiry/supplier_inquiry.php index 3ad2fd26..09e59926 100644 --- a/purchasing/inquiry/supplier_inquiry.php +++ b/purchasing/inquiry/supplier_inquiry.php @@ -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); diff --git a/purchasing/supplier_payment.php b/purchasing/supplier_payment.php index 4c99f95d..5994a2d3 100644 --- a/purchasing/supplier_payment.php +++ b/purchasing/supplier_payment.php @@ -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); diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index ed9d2390..e9fb3a00 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -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(); diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index db8a51b8..5d0aaa1c 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -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 ""; diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index 4b40b81d..9a6da912 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -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(); diff --git a/sales/includes/ui/sales_credit_ui.inc b/sales/includes/ui/sales_credit_ui.inc index 5acd6ac3..156145ad 100644 --- a/sales/includes/ui/sales_credit_ui.inc +++ b/sales/includes/ui/sales_credit_ui.inc @@ -192,18 +192,8 @@ function credit_edit_item_controls(&$order, $rowcounter, $line_no=-1) } else { - if (get_company_pref('no_item_list')) - { - echo "\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"]; diff --git a/sales/inquiry/customer_allocation_inquiry.php b/sales/inquiry/customer_allocation_inquiry.php index c20262d5..700bb185 100644 --- a/sales/inquiry/customer_allocation_inquiry.php +++ b/sales/inquiry/customer_allocation_inquiry.php @@ -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); diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index ab2cdd61..1bffa40b 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -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; diff --git a/sales/inquiry/sales_deliveries_view.php b/sales/inquiry/sales_deliveries_view.php index ab2add93..7ae41594 100644 --- a/sales/inquiry/sales_deliveries_view.php +++ b/sales/inquiry/sales_deliveries_view.php @@ -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); diff --git a/sales/inquiry/sales_orders_view.php b/sales/inquiry/sales_orders_view.php index 7ff12fba..82c10395 100644 --- a/sales/inquiry/sales_orders_view.php +++ b/sales/inquiry/sales_orders_view.php @@ -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); diff --git a/taxes/tax_groups.php b/taxes/tax_groups.php index 398d6255..e7f99f21 100644 --- a/taxes/tax_groups.php +++ b/taxes/tax_groups.php @@ -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()) { diff --git a/themes/default/renderer.php b/themes/default/renderer.php index 924c82e2..c60aec74 100644 --- a/themes/default/renderer.php +++ b/themes/default/renderer.php @@ -42,7 +42,6 @@ SID ."'>" .$name . ""; } echo ""; - echo "
\n"; - stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true); - echo "
\n"; - stock_items_list('stock_id', null, false, true); - echo "
"; echo ""; @@ -58,7 +57,11 @@ if ($title && !$no_menu && !$is_index) { - echo "
$title
"; + echo "
" + ."" + ."
$title" + .(user_hints() ? "" : '') + ."
"; } if (!$is_index) @@ -88,10 +91,10 @@ { echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; if ($allow_demo_mode==true) { -- 2.30.2