diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index 4a383fcb505..b20da8b9b89 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -204,7 +204,7 @@ tms timestamp, fk_inventory integer DEFAULT 0, fk_warehouse integer DEFAULT 0, fk_product integer DEFAULT 0, -entity integer DEFAULT 0, +batch varchar(30) DEFAULT NULL, qty_view double DEFAULT 0, qty_stock double DEFAULT 0, qty_regulated double DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_inventorydet.sql b/htdocs/install/mysql/tables/llx_inventorydet.sql index 20e48b877b5..2b203e0c58b 100644 --- a/htdocs/install/mysql/tables/llx_inventorydet.sql +++ b/htdocs/install/mysql/tables/llx_inventorydet.sql @@ -25,7 +25,7 @@ tms timestamp, fk_inventory integer DEFAULT 0, fk_warehouse integer DEFAULT 0, fk_product integer DEFAULT 0, -entity integer DEFAULT 0, +batch varchar(30) DEFAULT NULL, -- Lot or serial number qty_view double DEFAULT 0, qty_stock double DEFAULT 0, qty_regulated double DEFAULT 0, diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index e89a59bb505..f7e4cbecb0a 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -146,12 +146,13 @@ if (empty($reshook)) if ($object->errors) { setEventMessage($object->errors, 'errors'); - card( $object, 'edit'); + $action = 'edit'; } else { $object->udpate($user); header('Location: '.dol_buildpath('/product/inventory/card.php?id='.$object->getId().'&action=view', 1)); + exit; } break; @@ -167,12 +168,10 @@ if (empty($reshook)) $object->status = 1; $object->update($user); - card( $object, 'view'); - - + $action='view'; } else { - card( $object, 'view'); + $action='view'; } break; @@ -186,7 +185,7 @@ if (empty($reshook)) $object->changePMP($user); - card( $object, 'view'); + $action='view'; break; @@ -238,7 +237,7 @@ if (empty($reshook)) $object->sortDet(); } - card( $object, 'edit'); + $action='edit'; break; @@ -257,7 +256,7 @@ if (empty($reshook)) $object = new Inventory($db); $object->fetch( $id); - card($object, 'edit'); + $action='edit'; break; case 'confirm_flush': @@ -273,14 +272,12 @@ if (empty($reshook)) setEventMessage($langs->trans('InventoryFlushed')); - card( $object, 'edit'); - + $action='edit'; break; case 'confirm_delete': if (!$user->rights->stock->supprimer) accessforbidden(); - $id = GETPOST('id'); $object = new Inventory($db);