From 9999ae05ccfd8499145c1ad7c40f97f86552e664 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 1 May 2019 11:10:11 +0200 Subject: [PATCH 1/9] add default warehouse --- htdocs/fourn/commande/dispatch.php | 36 ++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 7a8bb2bcd22..46c4d4c7f81 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -8,6 +8,7 @@ * Copyright (C) 2016 Florian Henry * Copyright (C) 2017 Ferran Marcet * Copyright (C) 2018 Frédéric France + * Copyright (C) 2019 Christophe Battarel * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,6 +52,8 @@ $id = GETPOST("id", 'int'); $ref = GETPOST('ref'); $lineid = GETPOST('lineid', 'int'); $action = GETPOST('action', 'aZ09'); +$fk_entrepot_default = GETPOST('fk_entrepot_default','int'); + if ($user->societe_id) $socid = $user->societe_id; $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); @@ -236,6 +239,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) $prod = "product_" . $reg[1] . '_' . $reg[2]; $qty = "qty_" . $reg[1] . '_' . $reg[2]; $ent = "entrepot_" . $reg[1] . '_' . $reg[2]; + if(empty($ent)) $ent = $fk_entrepot_default; $pu = "pu_" . $reg[1] . '_' . $reg[2]; // This is unit price including discount $fk_commandefourndet = "fk_commandefourndet_" . $reg[1] . '_' . $reg[2]; @@ -456,8 +460,10 @@ if ($id > 0 || ! empty($ref)) { if ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY || $object->statut == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) { - $entrepot = new Entrepot($db); - $listwarehouses = $entrepot->list_array(1); + + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + $formproduct->loadWarehouses(); if(empty($conf->reception->enabled))print '
'; else print ''; @@ -508,6 +514,23 @@ if ($id > 0 || ! empty($ref)) { $i = 0; if ($num) { + $entrepot = new Entrepot($db); + $listwarehouses=$entrepot->list_array(1); + + // entrepot par défaut + print $langs->trans("Warehouse").' : '; + if (count($listwarehouses)>1) + { + print $form->selectarray('fk_entrepot_default', $listwarehouses, $fk_entrepot_default, 1, 0, 0, '', 0, 0, $disabled); + } + elseif (count($listwarehouses)==1) + { + print $form->selectarray('fk_entrepot_default', $listwarehouses, $fk_entrepot_default, 0, 0, 0, '', 0, 0, $disabled); + } + else + { + print $langs->trans("NoWarehouseDefined"); + } print ''; print '' . $langs->trans("Description") . ''; @@ -758,6 +781,15 @@ if ($id > 0 || ! empty($ref)) { dol_fiche_end(); + // traitement entrepot par défaut + print ''; // List of lines already dispatched $sql = "SELECT p.ref, p.label,"; From ed12b1855c09472e10dcd9f4a0f46e0f5cd1baed Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 1 May 2019 13:55:27 +0200 Subject: [PATCH 2/9] change entrepot to warehouse --- htdocs/fourn/commande/dispatch.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 46c4d4c7f81..a13fc9a982b 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -52,7 +52,7 @@ $id = GETPOST("id", 'int'); $ref = GETPOST('ref'); $lineid = GETPOST('lineid', 'int'); $action = GETPOST('action', 'aZ09'); -$fk_entrepot_default = GETPOST('fk_entrepot_default','int'); +$fk_default_warehouse = GETPOST('fk_default_warehouse','int'); if ($user->societe_id) $socid = $user->societe_id; @@ -239,7 +239,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) $prod = "product_" . $reg[1] . '_' . $reg[2]; $qty = "qty_" . $reg[1] . '_' . $reg[2]; $ent = "entrepot_" . $reg[1] . '_' . $reg[2]; - if(empty($ent)) $ent = $fk_entrepot_default; + if(empty($ent)) $ent = $fk_default_warehouse; $pu = "pu_" . $reg[1] . '_' . $reg[2]; // This is unit price including discount $fk_commandefourndet = "fk_commandefourndet_" . $reg[1] . '_' . $reg[2]; @@ -521,11 +521,11 @@ if ($id > 0 || ! empty($ref)) { print $langs->trans("Warehouse").' : '; if (count($listwarehouses)>1) { - print $form->selectarray('fk_entrepot_default', $listwarehouses, $fk_entrepot_default, 1, 0, 0, '', 0, 0, $disabled); + print $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 1, 0, 0, '', 0, 0, $disabled); } elseif (count($listwarehouses)==1) { - print $form->selectarray('fk_entrepot_default', $listwarehouses, $fk_entrepot_default, 0, 0, 0, '', 0, 0, $disabled); + print $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 0, 0, 0, '', 0, 0, $disabled); } else { @@ -784,9 +784,9 @@ if ($id > 0 || ! empty($ref)) { // traitement entrepot par défaut print ''; From 98ba7e8184dd340fc6e3ea7fe4ff52125208c24f Mon Sep 17 00:00:00 2001 From: altairis Date: Wed, 21 Aug 2019 10:37:13 +0200 Subject: [PATCH 3/9] FIX PSR2 missing space --- htdocs/fourn/commande/dispatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index a13fc9a982b..a97ea89b31a 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -52,7 +52,7 @@ $id = GETPOST("id", 'int'); $ref = GETPOST('ref'); $lineid = GETPOST('lineid', 'int'); $action = GETPOST('action', 'aZ09'); -$fk_default_warehouse = GETPOST('fk_default_warehouse','int'); +$fk_default_warehouse = GETPOST('fk_default_warehouse', 'int'); if ($user->societe_id) $socid = $user->societe_id; From 7c3e643fca180d67a41a4c9b1928bc45276fac58 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 22 Aug 2019 16:07:18 +0200 Subject: [PATCH 4/9] fix PSR2 missing space --- htdocs/fourn/commande/dispatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index a13fc9a982b..a97ea89b31a 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -52,7 +52,7 @@ $id = GETPOST("id", 'int'); $ref = GETPOST('ref'); $lineid = GETPOST('lineid', 'int'); $action = GETPOST('action', 'aZ09'); -$fk_default_warehouse = GETPOST('fk_default_warehouse','int'); +$fk_default_warehouse = GETPOST('fk_default_warehouse', 'int'); if ($user->societe_id) $socid = $user->societe_id; From dff36c9d684720c74420fb02dc9a361cb1358392 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 5 Sep 2019 15:30:14 +0200 Subject: [PATCH 5/9] actualize from develop --- htdocs/fourn/commande/dispatch.php | 144 +++++++++++++++++++++++------ 1 file changed, 114 insertions(+), 30 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index a97ea89b31a..ea51bcdb4d7 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -246,7 +246,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) // We ask to move a qty if (GETPOST($qty) != 0) { if (! (GETPOST($ent, 'int') > 0)) { - dol_syslog('No dispatch for line ' . $key . ' as no warehouse choosed'); + dol_syslog('No dispatch for line ' . $key . ' as no warehouse was chosen.'); $text = $langs->transnoentities('Warehouse') . ', ' . $langs->transnoentities('Line') . ' ' . ($numline); setEventMessages($langs->trans('ErrorFieldRequired', $text), null, 'errors'); $error ++; @@ -283,7 +283,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) // We ask to move a qty if (GETPOST($qty) > 0) { if (! (GETPOST($ent, 'int') > 0)) { - dol_syslog('No dispatch for line ' . $key . ' as no warehouse choosed'); + dol_syslog('No dispatch for line ' . $key . ' as no warehouse was chosen.'); $text = $langs->transnoentities('Warehouse') . ', ' . $langs->transnoentities('Line') . ' ' . ($numline) . '-' . ($reg[1] + 1); setEventMessages($langs->trans('ErrorFieldRequired', $text), null, 'errors'); $error ++; @@ -418,13 +418,13 @@ if ($id > 0 || ! empty($ref)) { print '
'; print '
'; - print ''; + print '
'; // Date if ($object->methode_commande_id > 0) { print '"; @@ -454,12 +454,13 @@ if ($id > 0 || ! empty($ref)) { // Line of orders if ($object->statut <= CommandeFournisseur::STATUS_ACCEPTED || $object->statut >= CommandeFournisseur::STATUS_CANCELED) { - print ''.$langs->trans("OrderStatusNotReadyToDispatch").''; + print '
'.$langs->trans("OrderStatusNotReadyToDispatch").''; } if ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY - || $object->statut == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) { + || $object->statut == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) + { require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); @@ -500,11 +501,35 @@ if ($id > 0 || ! empty($ref)) { $sql = "SELECT l.rowid, l.fk_product, l.subprice, l.remise_percent, l.ref AS sref, SUM(l.qty) as qty,"; $sql .= " p.ref, p.label, p.tobatch, p.fk_default_warehouse"; + + // Enable hooks to alter the SQL query (SELECT) + $parameters = array(); + $reshook = $hookmanager->executeHooks( + 'printFieldListSelect', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + $sql .= $hookmanager->resPrint; + $sql .= " FROM " . MAIN_DB_PREFIX . "commande_fournisseurdet as l"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON l.fk_product=p.rowid"; $sql .= " WHERE l.fk_commande = " . $object->id; if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND l.product_type = 0"; + + // Enable hooks to alter the SQL query (WHERE) + $parameters = array(); + $reshook = $hookmanager->executeHooks( + 'printFieldListWhere', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + $sql .= $hookmanager->resPrint; + $sql .= " GROUP BY p.ref, p.label, p.tobatch, l.rowid, l.fk_product, l.subprice, l.remise_percent, p.fk_default_warehouse"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product $sql .= " ORDER BY p.ref, p.label"; @@ -514,23 +539,23 @@ if ($id > 0 || ! empty($ref)) { $i = 0; if ($num) { - $entrepot = new Entrepot($db); - $listwarehouses=$entrepot->list_array(1); + $entrepot = new Entrepot($db); + $listwarehouses=$entrepot->list_array(1); + // entrepot par défaut + print $langs->trans("Warehouse").' : '; + if (count($listwarehouses)>1) + { + print $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 1, 0, 0, '', 0, 0, $disabled); + } + elseif (count($listwarehouses)==1) + { + print $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 0, 0, 0, '', 0, 0, $disabled); + } + else + { + print $langs->trans("NoWarehouseDefined"); + } - // entrepot par défaut - print $langs->trans("Warehouse").' : '; - if (count($listwarehouses)>1) - { - print $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 1, 0, 0, '', 0, 0, $disabled); - } - elseif (count($listwarehouses)==1) - { - print $form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 0, 0, 0, '', 0, 0, $disabled); - } - else - { - print $langs->trans("NoWarehouseDefined"); - } print ''; print ''; @@ -546,12 +571,24 @@ if ($id > 0 || ! empty($ref)) { print ''; print ''; } - print ''; + //print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; + + // Enable hooks to append additional columns + $parameters = array(); + $reshook = $hookmanager->executeHooks( + 'printFieldListTitle', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; + print "\n"; } @@ -618,7 +655,7 @@ if ($id > 0 || ! empty($ref)) { $up_ht_disc = price2num($up_ht_disc * (100 - $objp->remise_percent) / 100, 'MU'); // Supplier ref - print ''; + //print ''; // Qty ordered print ''; @@ -634,6 +671,23 @@ if ($id > 0 || ! empty($ref)) { //print img_picto($langs->trans('AddDispatchBatchLine'), 'split.png', 'onClick="addDispatchLine(' . $i . ',\'' . $type . '\')"'); print ''; // Dispatch column print ''; // Warehouse column + + // Enable hooks to append additional columns + $parameters = array( + 'is_information_row' => true, // allows hook to distinguish between the + // rows with information and the rows with + // dispatch form input + 'objp' => $objp + ); + $reshook = $hookmanager->executeHooks( + 'printFieldListValue', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; + print ''; print ''; @@ -674,10 +728,27 @@ if ($id > 0 || ! empty($ref)) { //print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'onClick="addDispatchLine(' . $i . ',\'' . $type . '\')"'); print ''; // Dispatch column print ''; // Warehouse column + + // Enable hooks to append additional columns + $parameters = array( + 'is_information_row' => true, // allows hook to distinguish between the + // rows with information and the rows with + // dispatch form input + 'objp' => $objp + ); + $reshook = $hookmanager->executeHooks( + 'printFieldListValue', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; + print ''; print ''; - print '\n"; + // Enable hooks to append additional columns + $parameters = array( + 'is_information_row' => false // this is a dispatch form row + ); + $reshook = $hookmanager->executeHooks( + 'printFieldListValue', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; + print "\n"; } } @@ -737,13 +821,12 @@ if ($id > 0 || ! empty($ref)) { print "
' . $langs->trans("Date") . ''; if ($object->date_commande) { - print dol_print_date($object->date_commande, "dayhourtext") . "\n"; + print dol_print_date($object->date_commande, "dayhour") . "\n"; } print "
' . $langs->trans("Description") . '' . $langs->trans("SupplierRef") . '' . $langs->trans("SupplierRef") . '' . $langs->trans("QtyOrdered") . '' . $langs->trans("QtyDispatchedShort") . '' . $langs->trans("QtyToDispatchShort") . '' . $langs->trans("Warehouse") . '' . $langs->trans("Warehouse") . '
'.$objp->sref.''.$objp->sref.'' . $objp->qty . '
'; + print ''; print ''; print ''; @@ -725,6 +796,19 @@ if ($id > 0 || ! empty($ref)) { } print "
\n"; print '
'; - print "
\n"; if ($nbproduct) { $checkboxlabel = $langs->trans("CloseReceivedSupplierOrdersAutomatically", $langs->transnoentitiesnoconv('StatusOrderReceivedAll')); - print '
'; + print '
'; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook @@ -760,7 +843,7 @@ if ($id > 0 || ! empty($ref)) { } empty($conf->reception->enabled)?$dispatchBt=$langs->trans("DispatchVerb"):$dispatchBt=$langs->trans("Receive"); - print '
'; @@ -770,7 +853,8 @@ if ($id > 0 || ! empty($ref)) { // Message if nothing to dispatch if (! $nbproduct) { - if (empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) + print "
\n"; + if (empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) print '
'.$langs->trans("NoPredefinedProductToDispatch").'
'; // No predefined line at all else print '
'.$langs->trans("NoMorePredefinedProductToDispatch").'
'; // No predefined line that remain to be dispatched. From 0bf70dddc73972c566aa2456cf470d3c1db76799 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 5 Sep 2019 15:33:16 +0200 Subject: [PATCH 6/9] actualize from develop --- htdocs/fourn/commande/dispatch.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index ea51bcdb4d7..ac611155f31 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -571,7 +571,7 @@ if ($id > 0 || ! empty($ref)) { print ''; print ''; } - //print '' . $langs->trans("SupplierRef") . ''; + print '' . $langs->trans("SupplierRef") . ''; print '' . $langs->trans("QtyOrdered") . ''; print '' . $langs->trans("QtyDispatchedShort") . ''; print '' . $langs->trans("QtyToDispatchShort") . ''; @@ -655,7 +655,7 @@ if ($id > 0 || ! empty($ref)) { $up_ht_disc = price2num($up_ht_disc * (100 - $objp->remise_percent) / 100, 'MU'); // Supplier ref - //print ''.$objp->sref.''; + print ''.$objp->sref.''; // Qty ordered print '' . $objp->qty . ''; @@ -748,7 +748,7 @@ if ($id > 0 || ! empty($ref)) { print ''; print ''; - print ''; + print ''; print ''; print ''; From 8b8a5e315a5cef22537912491f7eaddba5c84508 Mon Sep 17 00:00:00 2001 From: altairis Date: Fri, 4 Oct 2019 10:55:09 +0200 Subject: [PATCH 7/9] fix test error --- htdocs/fourn/commande/dispatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index e9eb310438a..5e247809e52 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -239,7 +239,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) $prod = "product_" . $reg[1] . '_' . $reg[2]; $qty = "qty_" . $reg[1] . '_' . $reg[2]; $ent = "entrepot_" . $reg[1] . '_' . $reg[2]; - if(empty($ent)) $ent = $fk_default_warehouse; + if (empty(GETPOST($ent))) $ent = $fk_default_warehouse; $pu = "pu_" . $reg[1] . '_' . $reg[2]; // This is unit price including discount $fk_commandefourndet = "fk_commandefourndet_" . $reg[1] . '_' . $reg[2]; From 0f30e6f73bc37f8c3fcb992a509c9704ab9972bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 19 Dec 2019 11:35:50 +0100 Subject: [PATCH 8/9] Update dispatch.php --- htdocs/fourn/commande/dispatch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 7a98344d8fb..7d25bd7bdc0 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -55,7 +55,7 @@ $action = GETPOST('action', 'aZ09'); $fk_default_warehouse = GETPOST('fk_default_warehouse', 'int'); if ($user->socid) - $socid = $user->societe_id; + $socid = $user->socid; $result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande'); if (empty($conf->stock->enabled)) { From 2f41a53bb48f7452ae2794f35e0c17394d19ef18 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 19 Dec 2019 10:38:19 +0000 Subject: [PATCH 9/9] Fixing style errors. --- htdocs/fourn/commande/dispatch.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 7d25bd7bdc0..46b2f6a50ad 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -240,7 +240,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) $qty = "qty_".$reg[1].'_'.$reg[2]; $ent = "entrepot_".$reg[1].'_'.$reg[2]; if (empty(GETPOST($ent))) $ent = $fk_default_warehouse; - $pu = "pu_".$reg[1].'_'.$reg[2]; // This is unit price including discount + $pu = "pu_".$reg[1].'_'.$reg[2]; // This is unit price including discount $fk_commandefourndet = "fk_commandefourndet_".$reg[1].'_'.$reg[2]; if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { @@ -490,7 +490,6 @@ if ($id > 0 || !empty($ref)) { || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY || $object->statut == CommandeFournisseur::STATUS_RECEIVED_COMPLETELY) { - require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $formproduct->loadWarehouses();