do not let closed inventories reset stock with URL
This commit is contained in:
parent
a9c8c24e9b
commit
272f131b07
@ -118,7 +118,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
// Close inventory by recording the stock movements
|
||||
if ($action == 'update' && !empty($user->rights->stock->mouvement->creer)) {
|
||||
if ($action == 'update' && !empty($user->rights->stock->mouvement->creer) && $object->status == $object::STATUS_VALIDATED) {
|
||||
$stockmovment = new MouvementStock($db);
|
||||
$stockmovment->setOrigin($object->element, $object->id);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user