Skip to content

Commit

Permalink
FIX Dolibarr#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 10, 2019
1 parent 87e81f1 commit 97ec8b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/actions_massactions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,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 97ec8b8

Please sign in to comment.