From 903c3771ba877a717f3efb3503ac68c55290149d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9rald=20Lelarge?= Date: Mon, 9 Dec 2019 14:56:20 +0100 Subject: [PATCH] FIX #12665 Mass invoice validation with stock management Normally the mass invoice validation is not authorized due to the need to choose the warehouse where to increase or decrease the stock. A message ErrorMassValidationNotAllowedWhenStockIncreaseOnAction is displayed to inform the user to do this validation manually one by one. The invoices should not be validated. --- htdocs/core/actions_massactions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 6cd98f00e483e..440c16954a16a 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1084,7 +1084,7 @@ { $objecttmp=new $objectclass($db); - if ($objecttmp->element == 'invoice' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL)) + if (($objecttmp->element == 'facture' || $objecttmp->element == 'invoice') && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL)) { $langs->load("errors"); setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors');