Merge pull request #12679 from glelarge/80/12665-mass_invoice_validation_with_stock_management

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

View File

@ -1048,7 +1048,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');