Invalid Reference Row Error - Sales Taxes and Charges Table

I am trying to add 2 discounts as part of the Sales Taxes and Charges Table. But unable to do so.

You say you’d like to add two discounts but from the limited info you provided (only a screenshot), it appears you are trying to apply the same Output Tax twice. If you are trying to apply two discounts, shouldn’t they be unique?

Yes, they are Unique, one is Cash Discount and the next one is Trade Discount.
Ideally the rate should have been -ve as well. My bad.


I wasn’t able to replicate the issue.

It’s triggered from here:

It’s looping over GST Accounts (rows_to_validate) to ensure reference row number (in my example 4) is same for CGST and SGST.

Possible Causes of the issue:

  1. Incorrect GST Account setup in GST Settings
  2. Customisations gone wrong

Solved now.
Missed to provide reference row for row 3. It is mandatory to provide reference row even if a row references just the previous row.

Thank You for all the pointers.

This was already set in your original screenshot with error.

However, nice to know you figured it out.