Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: TDS incorrectly applied when Advance is in previous FY #41194

Conversation

ruthra-kumar
Copy link
Member

@ruthra-kumar ruthra-kumar commented Apr 26, 2024

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 the 2 invoices should breach the cumulative threshold, and the total TDS for those invoices should be greater than the TDS deducted from the Advance Payment.

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

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Apr 26, 2024
@ruthra-kumar ruthra-kumar force-pushed the fix_incorrectly_applying_tds_when_advance_in_prev_fiscal_year branch from 4a6997c to b195f51 Compare April 29, 2024 02:55
@ruthra-kumar ruthra-kumar added backport version-14-hotfix backport to version 14 backport version-15-hotfix and removed needs-tests This PR needs automated unit-tests. labels Apr 29, 2024
@ruthra-kumar ruthra-kumar changed the title fix: incorrectly applying TDS when Advance is in previous FY fix: TDS incorrectly applied when Advance is in previous FY Apr 29, 2024
@ruthra-kumar ruthra-kumar merged commit 52e52e8 into frappe:develop Apr 30, 2024
14 checks passed
ruthra-kumar added a commit that referenced this pull request Apr 30, 2024
…-41194

fix: TDS incorrectly applied when Advance is in previous FY (backport #41194)
ruthra-kumar added a commit that referenced this pull request Apr 30, 2024
…-41194

fix: TDS incorrectly applied when Advance is in previous FY (backport #41194)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant