-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Gross Profit Reports Incorrect Total Amounts #33911
Comments
Hi @dj12djdjs, Same issue in current version #34507 Please, Can you share with us the code line of the gross_profit.py file for the correct total shown in the report? Thank You! |
Hi @nihantra, I haven't been able to find a permanent solution for this issue. What my organization is doing in the mean time is exporting the Gross Profit report into excel. Removing the duplicate rows, then summing all the columns manually. |
Hi, any updates or workaround on this ? even my customers are complaining about the same. Since Im using frappe cloud, cannot provide any solution from my side also. |
is this issue solved ? |
@ruthra-kumar : hi, this issue doesn't seem to have been fixed; is there any way to resolve it? |
We found a bug in https://github.com/frappe/frappe/blob/develop/frappe/desk/query_report.py#L484 of the Frappe Framework. The total is calculated from the child rows, but when dividing to calculate the percentage, it is applied to the entire grid's rows. |
Can confirm, also an issue for us
|
Fixed Ungrouped Totals: #45781 |
Fixed Grouped Invoice Total: #45548 |
Information about bug
In the image below, the green row represents the correct Gross Profit totals, the red row represents the ERPNext reported totals, and the last row represents the difference.
![image](https://user-images.githubusercontent.com/29856401/215899631-47674fee-c6e8-49a7-9aa0-80835f3bcc90.png)
This is caused by ERPNext summing the total twice.
![image](https://user-images.githubusercontent.com/29856401/215900196-06357a34-7b39-4ef5-a073-a1d83e758365.png)
The first time is the "header" for example:
The second time is the "details" for example:
![image](https://user-images.githubusercontent.com/29856401/215900283-c9fee2e3-ccbe-47ad-98ce-026e93a062b2.png)
Notice Somehow the duplication only happens on columns 4-6 which is also illustrated in the first image.
Secondly, the Total gross profit percentage is showing the average of all the gross profit percentages. Not the actual total
Module
accounts
Version
frappe develop
erpnext develop
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
No response
The text was updated successfully, but these errors were encountered: