erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

fix: incorrectly applying TDS when Advance is in previous FY

Open ruthra-kumar opened this issue 10 months ago • 0 comments

If Advance with TDS deducted is in previous fiscal year, Invoices in current fiscal year still get TDS applied, if there multiple invoices. Fixing in this PR.

Replication:

  1. Purchase Order on FY2023 above cumulative threshold of TDS
  2. Make 50% advance with TDS deducted for PO. Note: this 50% should be above cumulative threshold.
  3. Make an Invoice against PO with 25% value and allocate Advance. => No TDS applied
  4. Make another Invoice against PO with 25% value and allocate advance => TDS is applied (wrong)

The combination of 2 invoices should breach the cumulative threshold.

ps: TCS/TDS related code are long overdue for a refactor.

ruthra-kumar avatar Apr 26 '24 05:04 ruthra-kumar