New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mass invoice validation with stock management : the user is not informed anymore to validate invoices manually #12665
Labels
Bug
This is a bug (something does not work as expected)
Comments
eldy
added a commit
that referenced
this issue
Dec 9, 2019
…_with_stock_management FIX #12665 Mass invoice validation with stock management
glelarge
added a commit
to glelarge/dolibarr
that referenced
this issue
Dec 10, 2019
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.
glelarge
added a commit
to glelarge/dolibarr
that referenced
this issue
Dec 10, 2019
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.
glelarge
added a commit
to glelarge/dolibarr
that referenced
this issue
Dec 10, 2019
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.
This was referenced Dec 10, 2019
eldy
added a commit
that referenced
this issue
Dec 10, 2019
…ion_with_stock_management FIX #12665 Mass invoice validation with stock management (branch 8.0)
eldy
added a commit
that referenced
this issue
Dec 10, 2019
…ion_with_stock_management FIX #12665 Mass invoice validation with stock management (branch 9.0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug
Normally the mass invoice validation is not authorized due to the need to choose the warehouse where to increase/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.
Currently:
Environment
Expected and actual behavior
The message
ErrorMassValidationNotAllowedWhenStockIncreaseOnAction
to inform the user should be displayed.The invoices must not be validated.
Steps to reproduce the behavior
Activate the modules Invoices, Products and Stock.
In the Stock module options, set the
STOCK_CALCULATE_ON_BILL
option ("Decrease real stocks on validation of customer invoice/credit note
") to true.Create a product PR01.
Create a warehouse WH01 and set the quantity of PR01 in WH01.
Create a customer invoice with one line of 25 PR01. No need to create multiple invoices to reproduce the case.
Display the list of invoices and select the draft invoice(s) to be validated.
On the mass action drop list (top of the page), select the 'Validate' action.
Click on the 'Confirm' button.
No message is displayed.
The invoice is validated but the stock is not impacted.
Reason of the issue
Code references are based on the branch 10.0.
In the file
core/actions_massactions.inc.php l.1087
:the test is always wrong as
$objecttmp->element
contains 'facture' and not 'invoice'.The
compta/facture/class/facture.class.php l.59
provides the correct value:Proposed fix (based on branch 10.0)
Option 1
The basic fix would replace the tested value by 'invoice'.
Tested locally, it is working.
Option 2
Both 'invoice' and 'facture' values can be tested, like in
core/class/discount.class.php l.557, 603, 648
:if ($invoice->element == 'facture' || $invoice->element == 'invoice')
Option 3
Last option, probably stranger, would to do something like
comm/action/class/actioncomm.class.php l.298
:I will submit a PR following the option 2.
The text was updated successfully, but these errors were encountered: