Skip to content

Commit

Permalink
fix: skip twc if not account set
Browse files Browse the repository at this point in the history
  • Loading branch information
rtdany10 committed Jul 10, 2023
1 parent b3a99e3 commit 12b459d
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,14 @@ def get_party_tax_withholding_details(inv, tax_withholding_category=None):
tax_details = get_tax_withholding_details(tax_withholding_category, posting_date, inv.company)

if not tax_details:
frappe.throw(
_("Please set associated account in Tax Withholding Category {0} against Company {1}").format(
tax_withholding_category, inv.company
)
frappe.msgprint(
_(
"Skipping Tax Withholding Category {0} as there is no associated account set for Company {1} in it."
).format(tax_withholding_category, inv.company)
)
if inv.doctype == "Purchase Invoice":
return {}, [], {}
return {}

if party_type == "Customer" and not tax_details.cumulative_threshold:
# TCS is only chargeable on sum of invoiced value
Expand Down

0 comments on commit 12b459d

Please sign in to comment.