frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.73k stars 7.3k forks source link

Gross Profit Reports Incorrect Total Amounts #33911

Open dj12djdjs opened 1 year ago

dj12djdjs commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 3 months ago

is this issue solved ?

quandm87 commented 3 weeks ago

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

vudq commented 3 weeks ago

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 commented 1 week ago

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