erpnext
erpnext copied to clipboard
Sales Invoice trends Report Total Mismatch
Information about bug
The Sales invoice trends report when set with the following filters : period - 'yearly', based on - 'customer groups', group by - 'item' and fiscal year - '21-22', shows a mis-match in the grand total.
The system is adding up the sub total of each customer group in the grand total. In the attached screenshot the very first row of API customer group shows its individual total as 34,875 (qty) and Rs.133,21,000 (amt).
This sub total is being added in the grand total at the bottom. Therefore the grand total is doubled by actual figures.
Module
accounts
Version
Frappe version-13.37.0 Erpnext Version-13.42.3
Installation method
None
Relevant log output / Stack trace / Full Error Message.
No response
Note to code owner(s) I've encountered this on gross profit report before as well. Most likely there is a bug in the way frappe report sums totals. or could be something wrong with the logic ?https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/report/financial_statements.py