How to calculate Net rofit

I have written this code. The issue is I dont know how to get the net profit. How can I get net profit by adding counter margin profit + room sales - expences- salariese. Kindly help.

[ACCOUNTS SUMMARY:2,1]
COUNTER MARGIN PROFIT|{REPORT COST DETAILS:[([C.AvgPrice][C.Quantity]).Sum]-[([C.Cost][C.Quantity]).Sum]}
ROOM SALES|{REPORT ORDER DETAILS:O.TotalPrice.sum:(DE=ROOMS)}
EXPENCES|{ACCOUNT TOTAL:EXPENCES ACCOUNT}
SALARIES|{ACCOUNT TOTAL:Salary Accounts}
TOTAL PROFIT|


This is just a sample, you can edit the syntax to match the formula you need

TOTAL PROFIT|[=F( TN('{REPORT COST DETAILS:[([C.AvgPrice][C.Quantity]).Sum]-[([C.Cost][C.Quantity]).Sum]}') + TN('{REPORT ORDER DETAILS:O.TotalPrice.sum:(DE=ROOMS)}')  )]

Thank you. It worked

1 Like