Skip to content
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

Closed
dj12djdjs opened this issue Jan 31, 2023 · 9 comments · Fixed by #45781
Closed

Gross Profit Reports Incorrect Total Amounts #33911

dj12djdjs opened this issue Jan 31, 2023 · 9 comments · Fixed by #45781

Comments

@dj12djdjs
Copy link
Collaborator

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

This is caused by ERPNext summing the total twice.
The first time is the "header" for example:
image

The second time is the "details" for example:
image

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

@nihantra
Copy link
Contributor

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!
NCP

@dj12djdjs
Copy link
Collaborator Author

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.

@moizsami
Copy link

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.

@ZahidMoideen
Copy link

is this issue solved ?

@quandm87
Copy link

quandm87 commented Oct 15, 2024

@ruthra-kumar : hi, this issue doesn't seem to have been fixed; is there any way to resolve it?

@vudq
Copy link

vudq commented Oct 16, 2024

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.
image

@dvdl16
Copy link
Contributor

dvdl16 commented Oct 24, 2024

Can confirm, also an issue for us

Frappe CRM: v1.19.0
South Africa Customisations: v0.1.6
ERPNext: v15.34.2
Frappe Framework: v15.40.3
Helpdesk: v0.10.0
Frappe HR: v15.28.3

@ljain112
Copy link
Collaborator

ljain112 commented Feb 7, 2025

Fixed Ungrouped Totals: #45781

@ljain112
Copy link
Collaborator

ljain112 commented Feb 7, 2025

Fixed Grouped Invoice Total: #45548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants