When generating an invoice by combining two or more Sales Orders (SO) into one invoice using the parameter “Summary update by = Invoice account”, and then running the “Calculate sales totals” batch job, the totals for all such orders were merged into the first order, while the others reflected a total of 0.
Example:
- SO 001010: total amount 1900
- SO 001035: total amount 1900
- After invoicing together and running the batch job:
- SO 001010: total amount 3800
- SO 001035: total amount 0
Root Cause:
This behavior occurs because the system treats multiple sales orders as a single entity when invoiced together under the specified summary update setting. The invoice journal references only one SO, resulting in the combined total being attributed to the first SO.
Resolution:
This behavior is currently by design.
When the Summary update by parameter is set to Invoice account, the system processes the selected sales orders as a single consolidated order.
As a result, it generates one invoice that references the first or the selected SO - and the totals are calculated collectively.
Therefore, when the Calculate sales totals batch runs for each SO, it finds:
One invoice (under the first or selected SO) containing the merged totals, and
No individual invoices for the remaining SOs.
Is it possible if we can fix this behavior in future?
