Gross Profit line in Profit and Loss Statement

I wonder why the github issues regarding this are closed ?


Is it fixed or any solutions there to make Gross Profit appear in P/L statement?

Also wonder why. Im planning to modify the report. Anyone here already working on it?

1 Like

@jeffbangquil John @jhk and I were starting in on this yesterday. At the highest level, we wanted to modularize the get_data method to also fetch a from a “parent”, instead of only a “root” type, which appears to be the first bottleneck. We wanted to use the attach field on the report to pass it formatting instructions in JSON, schema to be defined, but it would need to label/rename get_data queries sections (COGS is a subset of expenses). It also needs to be able to reference a method (calculate_gross_margin, calculate_gross_margin_percentage, etc) that can return a single line. This means that you can also better combine balance sheet operations within a report, like an accrual-to-cash P&L or (my personal white whale) a P&L with an indirect method statement of cash flows at the bottom. I also think that modularizing this code means it will be easier to test. According to @clarkej, there are only two tests for reports in ERPNext, at least as of a few months ago when we talked about it. We expect to contribute this code back, but it’s likely going to start in our custom app, for ease of development. Some pieces will be drop ins. If you’re interested in collaborating, let us know the parameters.

2 Likes

I am not a coder, so I have no idea how complicated this is.

But…

ERPNext is over 10 years old and yet it does not have a proper profit and loss statement ? How ?

I love ERPNext but this anomaly puzzles me all day. This is beyond basic . It’s a standard feature in ALL accounting or ERP solutions I have ever used and to see this missing in ERPNext for over 10 years of its existence truly amazes me.

Olamide.

3 Likes

That’s fair. And not all of the team at Frappe have a financial background.

Yeah, it’s not great, but nobody has sponsored a solution or a contributed one back, which isn’t awesome either. So I think there are two takeaways:

  1. Report code could be written in a more modular way, but that requires somebody working on it who understand both programmatic design requirements and accounting report conventions. There aren’t a lot of those people around.
  2. Reports that are “standard” aren’t really “standard”. Different countries specify different formats and use different terminology and that’s something that ERPNext has respected everywhere else with India/ IFRS as the fallback case. A good design would be able to take this into account without placing an onerous burden on the user.

My guess is that we’ll have something to share in the next few weeks. I left my conversation with John pretty excited about the potential.

The profit and loss account where you cannot specify the period is too bad.Sorry to say the profit or loss account report in ERP next is bad.(i am not a coder but i am willing to contribute my cent to remove this shame from our beloved erpnext).We are not even talking about standard which may depend on jurisdiction. We are pleading with the team to make the profit and loss determinable on period and not just have the whole of the twelve months at a go.An interface to specify say January to March or March to March. Sincerely I have never seen any accounting software or ERP where you cannot define profit or loss per period

@Fred1 - Your “customize dates” point is a good one. It’s possible to combine both the custom date range and periodicity divisions. We’ll take this into account in our design.

Here’s how i plan to do it.

  1. add field in accounts as FS Subtype. (which basically should contain Revenue, Cost, Operating Expenses, Other Income, Other Expense, Other Comprehensive Item
  2. modify some functions and add get_gross_profit, get_net_comprehensive_income.

@jeffbangquil kindly make your design to ensure any line item that passes Other Comprehensive Income behaves like Net Profit that is rooted to Retained Earning in Balance Sheet.Those incomes that pass Other Comprehensive Income are not destributable incomes and they are meant to be accumulated under the name of the line item in the Balance Sheet