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: round off tax withholding amount (backport #45271) #45314

Open
wants to merge 1 commit into
base: version-15-hotfix
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ def get_party_tax_withholding_details(inv, tax_withholding_category=None):
}
)

if cint(tax_details.round_off_tax_amount):
inv.round_off_applicable_accounts_for_tax_withholding = tax_details.account_head

if inv.doctype == "Purchase Invoice":
return tax_row, tax_deducted_on_advances, voucher_wise_amount
else:
Expand Down
5 changes: 5 additions & 0 deletions erpnext/controllers/taxes_and_totals.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ def __init__(self, doc: Document):
"Accounts Settings", "round_row_wise_tax"
)

if doc.get("round_off_applicable_accounts_for_tax_withholding"):
frappe.flags.round_off_applicable_accounts.append(
doc.round_off_applicable_accounts_for_tax_withholding
)

self._items = self.filter_rows() if self.doc.doctype == "Quotation" else self.doc.get("items")

get_round_off_applicable_accounts(self.doc.company, frappe.flags.round_off_applicable_accounts)
Expand Down
Loading