$ /includes/ui/ui_lists.inc
# Fixed broken syntax in delete_item_code()
$ /inventory/includes/db/items_codes_db.inc
+# Additional fixes to foreign/kit codes
+$ /inventory/manage/item_codes.php
+ /inventory/manage/sales_kits.php
! Merged changes from main trunk up to version 2.0.6 (see below)
$ /config.php
/update.html
{
delete_item_code($selected_id);
- display_notification(_("The purchasing data item has been sucessfully deleted."));
+ display_notification(_("Item code has been sucessfully deleted."));
$Mode = 'RESET';
}
//
$other_kits = get_where_used($_POST['item_code']);
$num_kits = db_num_rows($other_kits);
- if ($num_kits) {
+
+ $kit = get_item_kit($_POST['item_code']);
+ if ((db_num_rows($kit) == 1) && $num_kits) {
+
$msg = _("This item cannot be deleted because it is the last item in the kit used by following kits")
.':<br>';
$Ajax->activate('quantity');
$Ajax->activate('category');
}
- qty_row(_("Quantity:"), 'quantity', null, '', $units, $dec);
+
+ qty_row(_("Quantity:"), 'quantity', number_format2(1, $dec), '', $units, $dec);
end_table(1);
submit_add_or_update_center($selected_id == -1, '', true);