X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fmanage%2Fitem_units.php;h=de6154a6e5af904024a93b8c6c29c2b5af9e4b87;hb=c4eae7a18f0eb824e6eda7be2ba6fa820e9e58c9;hp=61e4e685d6de346f3a37e5b3e4ab819556f8a46f;hpb=8259c324f645a39cb847d5a4346b70e225e1b02c;p=fa-stable.git diff --git a/inventory/manage/item_units.php b/inventory/manage/item_units.php index 61e4e685..de6154a6 100644 --- a/inventory/manage/item_units.php +++ b/inventory/manage/item_units.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 11; $path_to_root="../.."; include($path_to_root . "/includes/session.inc"); @@ -33,7 +42,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') } if ($input_error !=1) { - write_item_unit($selected_id, $_POST['abbr'], $_POST['description'], $_POST['decimals'] ); + write_item_unit(htmlentities($selected_id), $_POST['abbr'], $_POST['description'], $_POST['decimals'] ); if($selected_id != '') display_notification(_('Selected unit has been updated')); else @@ -58,8 +67,8 @@ if ($Mode == 'Delete') { delete_item_unit($selected_id); display_notification(_('Selected unit has been deleted')); - $Mode = 'RESET'; } + $Mode = 'RESET'; } if ($Mode == 'RESET') @@ -72,7 +81,7 @@ if ($Mode == 'RESET') $result = get_all_item_units(); start_form(); -start_table("$table_style width=50%"); +start_table("$table_style width=40%"); $th = array(_('Unit'), _('Description'), _('Decimals'), "", ""); table_header($th); @@ -88,7 +97,7 @@ while ($myrow = db_fetch($result)) label_cell(($myrow["decimals"]==-1?_("User Quantity Decimals"):$myrow["decimals"])); edit_button_cell("Edit".$myrow[0], _("Edit")); - edit_button_cell("Delete".$myrow[0], _("Delete")); + delete_button_cell("Delete".$myrow[0], _("Delete")); end_row(); } @@ -100,7 +109,7 @@ echo '
'; start_form(); -start_table("class='tablestyle_noborder'"); +start_table($table_style2); if ($selected_id != '') { @@ -115,7 +124,6 @@ if ($selected_id != '') } hidden('selected_id', $selected_id); } - if ($selected_id != '' && item_unit_used($selected_id)) { label_row(_("Unit Abbreviation:"), $_POST['abbr']); hidden('abbr', $_POST['abbr']); @@ -127,7 +135,7 @@ number_list_row(_("Decimal Places:"), 'decimals', null, 0, 6, _("User Quantity D end_table(1); -submit_add_or_update_center($selected_id == '', '', true); +submit_add_or_update_center($selected_id == '', '', 'both'); end_form();