Skip to content
Snippets Groups Projects
Commit f7d2d0e8 authored by Francis Appels's avatar Francis Appels
Browse files

Revert "Fix: check warehouse on product batch"

This reverts commit a06c5b25.
parent a06c5b25
No related branches found
No related tags found
No related merge requests found
......@@ -90,19 +90,18 @@ $hookmanager->initHooks(array('expeditioncard','globalcard'));
*/
$warehousecanbeselectedlater=1;
if ($action == 'create' || $action == 'add')
if (! empty($conf->productbatch->enabled))
{
if (! empty($conf->productbatch->enabled))
if (! (GETPOST('entrepot_id','int') > 0))
{
if (! (GETPOST('entrepot_id','int') > 0))
{
$langs->load("errors");
setEventMessage($langs->trans("WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn"),'errors');
header("Location: ".DOL_URL_ROOT.'/expedition/shipment.php?id='.$id);
exit;
}
$langs->load("errors");
setEventMessage($langs->trans("WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn"),'errors');
header("Location: ".DOL_URL_ROOT.'/expedition/shipment.php?id='.$id);
exit;
}
}
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment