From a9a97fa1ef54c8cf847ce38ff6d08368f89d0964 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 1 Sep 2021 10:05:10 +0530 Subject: [PATCH] fix: Advance TDS test case (cherry picked from commit d06221ad7a0c622d3b2c9e8992c97af28f38f79f) # Conflicts: # erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py --- .../purchase_invoice/test_purchase_invoice.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index d61efe1c44c..2b75a83e347 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -1673,6 +1673,7 @@ def update_tax_witholding_category(company, account): fiscal_year = get_fiscal_year(date=nowdate()) +<<<<<<< HEAD if not frappe.db.get_value( "Tax Withholding Rate", { @@ -1694,6 +1695,18 @@ def update_tax_witholding_category(company, account): "cumulative_threshold": 0, }, ) +======= + if not frappe.db.get_value('Tax Withholding Rate', + {'parent': 'TDS - 194 - Dividends - Individual', 'fiscal_year': fiscal_year[0]}): + tds_category = frappe.get_doc('Tax Withholding Category', 'TDS - 194 - Dividends - Individual') + tds_category.append('rates', { + 'from_date': fiscal_year[1], + 'to_date': fiscal_year[2], + 'tax_withholding_rate': 10, + 'single_threshold': 2500, + 'cumulative_threshold': 0 + }) +>>>>>>> d06221ad7a (fix: Advance TDS test case) tds_category.save() if not frappe.db.get_value(