Fix barcode generation error for empty item numbers

This commit is contained in:
jekkos
2015-12-13 15:57:03 +01:00
parent 9f5782e0ba
commit c007513fc8

View File

@@ -345,7 +345,7 @@ class Items extends Secure_area implements iData_controller
if ($item['item_number'] == '' || $item['item_number'] == null)
{
// get the newly generated barcode
$item['item_number'] = $this->barcode_lib->get_barcode($item, $config);
$item['item_number'] = $this->barcode_lib->get_new_barcode($item, $config);
// remove from item any suppliers table info to avoid save failure because of unknown fields
// WARNING: if suppliers table is changed this list needs to be upgraded, which makes the matter a bit tricky to maintain