Deduction of Less Amount from Item Amount

Greetings,

We have a sales invoice with Less Amount or Deduction calculation.

Item Net Amount = (Item Standard Rate x Quantity) - Less Amount

Total of Net Amount = Sum of (Item Net Amounts)

Sales Tax = (Total of Net Amount / 100 ) x 13

Calculation is explained in below screenshot, and also you can view/download excel file here

Please Explain how to achieve Item Net Amount Calculation in ERP Next, such that tax and other calculations work properly.

For printing of our custom sales invoice, we have prepared HTML and Jinja template.

Best Regards