From e716c9abd6b38e167992de9fe944ec5d97e7817b Mon Sep 17 00:00:00 2001 From: atm-lena Date: Wed, 11 May 2022 12:38:24 +0200 Subject: [PATCH 1/3] Force to warehouse for consume produt in mo --- htdocs/mrp/mo_production.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index ad33a43b17f..cbe25d529d9 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -50,6 +50,7 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'moc $backtopage = GETPOST('backtopage', 'alpha'); $lineid = GETPOST('lineid', 'int'); $fk_movement = GETPOST('fk_movement', 'int'); +$fk_default_warehouse = GETPOST('fk_default_warehouse', 'int'); $collapse = GETPOST('collapse', 'aZ09comma'); @@ -734,6 +735,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { print $langs->trans("Warehouse"); + + // Select warehouse to force it everywhere + if(in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { + $listwarehouses = $tmpwarehouse->list_array(1); + if (count($listwarehouses) > 1) { + print '
' . $langs->trans("ForceTo") . ' ' . $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100 maxwidth300', 1); + } elseif (count($listwarehouses) == 1) { + print '
' . $langs->trans("ForceTo") . ' ' . $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100 maxwidth300', 1); + } + } } print ''; if ($conf->stock->enabled) { @@ -1057,6 +1068,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; + // traitement entrepot par défaut + print ''; + // Lines to produce From 1555a6540b8cfab2494580b0fc22760bdf7c9420 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Wed, 11 May 2022 12:40:51 +0200 Subject: [PATCH 2/3] Translation --- htdocs/mrp/mo_production.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index cbe25d529d9..d6dc4d250d0 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -1068,7 +1068,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; - // traitement entrepot par défaut + // default warehouse processing print '