Skip to content

Commit

Permalink
FIX #12665 Mass invoice validation with stock management
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
glelarge committed Dec 9, 2019
1 parent 3bb3643 commit 903c377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/actions_massactions.inc.php
Expand Up @@ -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');
Expand Down

0 comments on commit 903c377

Please sign in to comment.