Merge pull request #12680 from glelarge/90/12665-mass_invoice_validation_with_stock_management

FIX #12665 Mass invoice validation with stock management (branch 9.0)
This commit is contained in:
Laurent Destailleur 2019-12-10 19:27:36 +01:00 committed by GitHub
commit 22a297ed47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1082,7 +1082,7 @@ if (! $error && $massaction == 'validate' && $permtocreate)
{
$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');