In reorder_level.php the heading gets updated as well
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 20 Jun 2008 08:47:18 +0000 (08:47 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Fri, 20 Jun 2008 08:47:18 +0000 (08:47 +0000)
Changes the -1 to 'User Quantiry Decimals' in the table for units. item_units.php

CHANGELOG.txt
inventory/manage/item_units.php
inventory/reorder_level.php

index 0646ea662fce1341a51ac6c5375083f9274b5f7b..6f48fb0233a37f59232d8716b335aa46b07575c3 100644 (file)
@@ -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
index 3798bfe30f24f94e62720645c2f196766787eb70..e5a72f95bd982f7480d5f3050949cef90df7557f 100644 (file)
@@ -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);
index 5b1ac7282c92dbad8bbfbc2f3919d7f68b5ba9de..83283d5b536d012e36863ba8c5213b8586f2e02b 100644 (file)
@@ -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 "<hr></center>";
 
+div_start('show_heading');
 stock_item_heading($_POST['stock_id']);
-
+div_end();
 set_global_stock_item($_POST['stock_id']);
 
 div_start('reorders');