fix: Tax withholding reversal on Debit Notes

(cherry picked from commit 6d9cebfee9)
This commit is contained in:
Deepesh Garg
2023-08-24 11:49:03 +05:30
committed by Mergify
parent 6edfcf4de8
commit e8dc63c89c
2 changed files with 4 additions and 2 deletions

View File

@@ -345,6 +345,8 @@ def make_return_doc(doctype: str, source_name: str, target_doc=None):
elif doctype == "Purchase Invoice":
# look for Print Heading "Debit Note"
doc.select_print_heading = frappe.get_cached_value("Print Heading", _("Debit Note"))
if source.tax_withholding_category:
doc.set_onload("supplier_tds", source.tax_withholding_category)
for tax in doc.get("taxes") or []:
if tax.charge_type == "Actual":