From 0d26bdcdc55fc4c0ad9bd3e9eccd72488592d423 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Apr 2018 11:12:27 +0200 Subject: [PATCH] FIX Button receive products not visible --- htdocs/fourn/commande/card.php | 7 ++++--- htdocs/langs/en_US/stocks.lang | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index ec9426f7a3c..0198bcc24ac 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2176,6 +2176,7 @@ elseif (! empty($object->id)) // modified by hook if (empty($reshook)) { + $object->fetchObjectLinked(); // Links are used to show or not button, so we load them now. // Validate if ($object->statut == 0 && $num > 0) @@ -2304,11 +2305,11 @@ elseif (! empty($object->id)) // Ship if (! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { - if (in_array($object->statut, array(3,4))) { + if (in_array($object->statut, array(3,4,5))) { if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->receptionner) { - print '
' . $langs->trans('OrderDispatch') . '
'; + print '
' . $langs->trans('ReceiveProducts') . '
'; } else { - print '
' . $langs->trans('OrderDispatch') . '
'; + print '
' . $langs->trans('ReceiveProducts') . '
'; } } } diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 62d2e23e66c..9405157a473 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -199,4 +199,5 @@ inventoryDeleteLine=Delete line RegulateStock=Regulate Stock ListInventory=List StockSupportServices=Stock management support services -StockSupportServicesDesc=By default, you can stock only product with type "product". If on, and if module service is on, you can also stock a product with type "service" \ No newline at end of file +StockSupportServicesDesc=By default, you can stock only product with type "product". If on, and if module service is on, you can also stock a product with type "service" +ReceiveProducts=Receive products \ No newline at end of file