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 (backport #41194) #41246

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Apr 30, 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.


This is an automatic backport of pull request #41194 done by Mergify.

Copy link
Contributor Author

mergify bot commented Apr 30, 2024

Cherry-pick of 2f9a144 has failed:

On branch mergify/bp/version-14-hotfix/pr-41194
Your branch is ahead of 'origin/version-14-hotfix' by 1 commit.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 2f9a144023.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@ruthra-kumar ruthra-kumar force-pushed the mergify/bp/version-14-hotfix/pr-41194 branch from fab66f7 to 4d56c46 Compare April 30, 2024 01:34
@ruthra-kumar ruthra-kumar merged commit ba45ea4 into version-14-hotfix Apr 30, 2024
10 checks passed
@ruthra-kumar ruthra-kumar deleted the mergify/bp/version-14-hotfix/pr-41194 branch April 30, 2024 02:12
@frappe-pr-bot
Copy link
Collaborator

🎉 This PR is included in version 14.69.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants