diff --git a/htdocs/admin/order.php b/htdocs/admin/order.php index d39ac08fdb1..c9e05c78f08 100644 --- a/htdocs/admin/order.php +++ b/htdocs/admin/order.php @@ -238,19 +238,6 @@ if ($action == 'updateMask') { $error++; } - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'errors'); - } -} elseif ($action == 'set_WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') { - // Activate ask for warehouse - $res = dolibarr_set_const($db, "WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER", $value, 'chaine', 0, '', $conf->entity); - - if (!($res > 0)) { - $error++; - } - if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 263eba86d2d..6b7248864a1 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2436,7 +2436,7 @@ if ($action == 'create' && $usercancreate) { require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); print '' . $langs->trans('Warehouse') . ''; - print img_picto('', 'stock', 'class="pictofixedwidth"') . $formproduct->selectWarehouses((GETPOSTISSET('warehouse_id') ? GETPOST('warehouse_id') : $warehouse_id), 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx'); + print img_picto('', 'stock', 'class="pictofixedwidth"') . $formproduct->selectWarehouses(((GETPOSTISSET('warehouse_id') && !GETPOSTINT('changecompany')) ? GETPOST('warehouse_id') : $warehouse_id), 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx'); print ''; }