diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index d4855e8933f..737a544eda8 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -112,6 +112,10 @@ $permissionnote = $usercancreate; // Used by the include of actions_setnotes.i $permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php $permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +if (!empty($conf->expedition->enabled)){ + if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $object->warehouse_id = $conf->global->MAIN_DEFAULT_WAREHOUSE; + if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $object->warehouse_id = $user->fk_warehouse; +} /* * Actions