From d7dde51cf888dfc7e049fefed38e786a369b9b38 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 20 Jun 2008 08:47:18 +0000 Subject: [PATCH] In reorder_level.php the heading gets updated as well Changes the -1 to 'User Quantiry Decimals' in the table for units. item_units.php --- CHANGELOG.txt | 6 ++++++ inventory/manage/item_units.php | 12 ++---------- inventory/reorder_level.php | 8 +++++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0646ea66..6f48fb02 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,12 @@ Legend: ! -> Note $ -> Affected files +20-Jun-2008 Joe Hunt +! In reorder_level.php the heading gets updated as well +$ /inventory/reorder_level.php +! Changes the -1 to 'User Quantiry Decimals' in the table for units. +$ /inventory/manage/item_units.php + 20-Jun-2008 Janusz Dobrowolski # Proper error handling even after exit() call. $ /includes/errors.inc diff --git a/inventory/manage/item_units.php b/inventory/manage/item_units.php index 3798bfe3..e5a72f95 100644 --- a/inventory/manage/item_units.php +++ b/inventory/manage/item_units.php @@ -39,13 +39,6 @@ if (isset($_POST['ADD_ITEM']) || isset($_POST['UPDATE_ITEM'])) display_error(_("The unit of measure description cannot be empty.")); set_focus('description'); } - if (!is_numeric($_POST['decimals'])) - { - $input_error = 1; - display_error(_("The number of decimal places must be integer.")); - set_focus('decimals'); - } - if ($input_error !=1) { write_item_unit(isset($selected_id) ? $selected_id : '', $_POST['abbr'], $_POST['description'], $_POST['decimals'] ); @@ -62,7 +55,7 @@ if (isset($_GET['delete'])) if (item_unit_used($selected_id)) { - display_error(_("Cannot delete this unit of measure because items have been created using this units.")); + display_error(_("Cannot delete this unit of measure because items have been created using this unit.")); } else @@ -88,7 +81,7 @@ while ($myrow = db_fetch($result)) label_cell($myrow["abbr"]); label_cell($myrow["name"]); - label_cell($myrow["decimals"]); + label_cell(($myrow["decimals"]==-1?_("User Quantity Decimals"):$myrow["decimals"])); edit_link_cell(SID."selected_id=$myrow[0]"); delete_link_cell(SID."selected_id=$myrow[0]&delete=yes"); @@ -125,7 +118,6 @@ if (isset($selected_id) && item_unit_used($selected_id)) { text_row(_("Unit Abbreviation:"), 'abbr', null, 20, 20); text_row(_("Descriptive Name:"), 'description', null, 40, 40); -//text_row(_("Decimal Places:"), 'decimals', null, 3, 3); number_list_row(_("Decimal Places:"), 'decimals', null, 0, 6, _("User Quantity Decimals")); end_table(1); diff --git a/inventory/reorder_level.php b/inventory/reorder_level.php index 5b1ac728..83283d5b 100644 --- a/inventory/reorder_level.php +++ b/inventory/reorder_level.php @@ -17,12 +17,13 @@ check_db_has_costable_items(_("There are no inventory items defined in the syste //------------------------------------------------------------------------------------ if (isset($_GET['stock_id'])) -{ $_POST['stock_id'] = $_GET['stock_id']; -} if (isset($_POST['_stock_id_update'])) +{ + $Ajax->activate('show_heading'); $Ajax->activate('reorders'); +} //------------------------------------------------------------------------------------ start_form(false, true); @@ -35,8 +36,9 @@ stock_costable_items_list('stock_id', $_POST['stock_id'], false, true); echo "
"; +div_start('show_heading'); stock_item_heading($_POST['stock_id']); - +div_end(); set_global_stock_item($_POST['stock_id']); div_start('reorders'); -- 2.30.2