Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

Gross profit report: Invoice wise profitability does not match customer profitability

Hello awesome people,

I have found that invoice-wise profitability does not match customer wise profitability. This has been a major problem for me and I need to rectify it.

Let me further clarify the problem.

Here is what i see when i view the gross profit report under invoice grouping I have filtered a specific customer to make it more obvious.
See the sales value and the gross profit value.

And then I change the grouping to “Customer” by selecting it from the dropdown and here is what i see for the same customer.

You can see that the sales value is the same but the gross profit figures are different. In fact, it is a huge number under the customer grouping.

I’m not sure if this is a bug or if I had done something wrong causing the issue. Any help would be appreciated!

PS: Update

I have viewed the gross profit report totals by invoice and customer. I find that even the sales values are different. Here are my screen shots.

Total of invoice grouping (Gross profit report)

Total of customer grouping (Gross profit report)

It works perfectly in my instance.Check your set up.The only error i see in mine is the average gross profit % of the whole transactions.Instead of dividing the gross profit amount by the total sales amount multiply by 100 to get the gross profit %,the coder erroneously adds all the the individual transaction gross profit % and divides by the number of transactions (or customers,etc)

Still I can’t seem to find what is causing it. Where do you recommend me checking?