What will be best possible way to generate a report for net profit earned after all expenses like purchase, landed cost voucher, taxes or other expenses in a sales order OR a sales invoice ?
There shall be reports of two types:
- Against a sales order or sales invoice
- Yearly, monthly, quarterly
This will help to evaluate the net profit earned after all expenses and taxes paid.
Any help on this ?
There are 4 kinds of built-in reporting mechanisms in ERPNext : Report Builder, Query Report, Script Report and Query Builder.
For both Query Reports and Script Reports the same UI view is used to render them : Query Report View.
Report Builder allows for simple reports to be built from the web user interface (WUI) without any coding, unlike the others
Query Report is a SQL query defined within the WUI by a user with System Manager permissions
How To Make Query Report
Script Reports are written client-side in the WUI or in JS/Python and stored as files server-side by a user with Administrator permissions in Developer mode
Also look at this tutorial
[Tutorial] Script Report / Chart
Making use of these methods you should be able to build whatever your requirements are, especially using Script Reporting.
First of all I think we need to understand the terminology Net Profit.
What you are looking for is probably Gross Profit report and not Net Profit.
Gross Profit is the Profit from Sales of Goods or Services without considering the Indirect Costs like Salary, Rent,etc.
Whereas Net Profit is Profit after deducting the indirect Expenses.
Let us take an example:
Let us say you sold Product A 50 Nos. at $100 each to Customer A.
Your Sales (Income) Amount is $5000.
The Cost of Goods Sold (Expense) for the above product is $60 each, therefore $3000 for the above Sale.
COGS is calculated by ERPNext based on the valuation of the Product, it may also include your Landed Costs if you post LCV after Purchase. So let us assume that $60 consists of $50 product valuation and $10 from Landed Costs.
Now your Gross Profit is Sales-Expense = $5000-$3000 = $2000 at the Invoice/Order level and $2000/5 each= $40 each at the item level.
You will get this Gross Profit at Invoice/Order, Item,Brand level from Gross Profit Report in ERPNext
Next for Net Profit, we have to consider the indirect costs, now attributing Indirect Costs to items is a very Subjective topic, therefore usually company view Net Profit at the Company level or at Cost Center level (Line of Business, Branch, Product Line or whatever you consider as a significant Cost or Profit Center).
If lets say you spend $2000 on Salary and $3000 on Rent that month, how will you attribute these on the Items or Invoices? Therefore it makes more sense to view Net Profit at a Company or Cost Center level rather than Item Level
I hope this makes sense.
Thanks a lot for your response. Since my background is Mechanical Engineering, i am not aware of scripts and programing and in depth software things. The steps advised by you are very good but it goes bouncer over my head. I need a programmer OR someone known with languages to solve this.
Mananji, Thanks for your response. There’s one more thing I wanted to clarify, i have explained as under:
I purchase an item and I recieved the invoice from my supplier as under:
Material - XYZ, Unit rate - 2000, QTY - 3 nos., Total Amount - 6000
Invoice basic value - 6000 rs
Packaging & Forwarding charges by my supplier (to be under P&F account in my entry) - 180 (@3%)
TOTAL Invoice Value - 6180/- Rs.
Now while i make purchase reciept and purchase invoice, it is same as above.
However, i spent 500 Rs on transportation by myslef. So i made a Landed Cost Voucher with expenses under (Freight Charges account) . So now 500 Rs will be divided among 3 qty of material = 166.66 each
Hence, now my Valuation Rate in Stock is shown as 2000 + 166.66 = 2166.66
Now , what about the packaging charge 180Rs my supplier charged me? how shall i add that in Valuation. Because, now my stock valuation is 2166.66 but packaging charges are not added to it for valuation. Thus it creates or may create a conflict during balance sheet and yearly accounting. I hope you got my point. I believe I may be confused or may not be, but i am not sure how this will work.