Gross and Net Profit Report GP, NP Not correct

I would like to report that Gross and Net Profit Report is not correct
image

GP = 4-5-6
NP = GP +7 -8

Is the format directly from Erpnext Or you rearrange it yourself?.Is your your production cost as shown in your report tagged to Direct Cost or Indirect cost?Your answers will give clue to what is wrong

The format directly from ERPNext
Production Cost is Direct Cost
I found out the problem, system can’t handle multi group
Sales - COGS - Production Cost = Gross Profit
Gross Profit - Expenses + Other Income = Net Profit

I get correct result for following one

Sales - COGS = Gross Profit
Gross Profit - Expenses = Net Profit