Start debug inventory

This commit is contained in:
Laurent Destailleur 2017-04-30 02:34:00 +02:00
parent 4993a43025
commit b57bf6460b
3 changed files with 10 additions and 13 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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);