! -> 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
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'] );
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
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");
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);
//------------------------------------------------------------------------------------
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);
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');