From 466e549842c0e8a4c6b325240a9fda75090db28a Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sun, 2 Jan 2022 17:53:15 +0530 Subject: [PATCH 1/3] fix(India): Tax and Charges template not getting fetched based on tax category assigned (cherry picked from commit 7a5937a98c3d74bdb1da79c3d5a8f49ef76ded2d) --- erpnext/regional/india/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py index 215b483c7a5..d443f9c15c0 100644 --- a/erpnext/regional/india/utils.py +++ b/erpnext/regional/india/utils.py @@ -215,7 +215,7 @@ def get_regional_address_details(party_details, doctype, company): if tax_template_by_category: party_details['taxes_and_charges'] = tax_template_by_category - return + return party_details if not party_details.place_of_supply: return party_details if not party_details.company_gstin: return party_details From 4b6217a6832af1d61ef193f49e4cbf9ebdb6cc24 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sun, 2 Jan 2022 18:39:59 +0530 Subject: [PATCH 2/3] fix: Test Case (cherry picked from commit 342658ea7028cc0d890200364cc08cf97e55d6d0) # Conflicts: # erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py --- .../doctype/purchase_invoice/test_purchase_invoice.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index cb18dd3b176..699af608253 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -1236,7 +1236,11 @@ def check_gl_entries(doc, voucher_no, expected_gle, posting_date): def update_tax_witholding_category(company, account): from erpnext.accounts.utils import get_fiscal_year +<<<<<<< HEAD fiscal_year = get_fiscal_year(fiscal_year='2021') +======= + fiscal_year = get_fiscal_year(date=nowdate()) +>>>>>>> 342658ea70 (fix: Test Case) if not frappe.db.get_value('Tax Withholding Rate', {'parent': 'TDS - 194 - Dividends - Individual', 'from_date': ('>=', fiscal_year[1]), From c3d890f3f18f209cc2a6ba3ccb75f66470d14616 Mon Sep 17 00:00:00 2001 From: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Date: Sun, 2 Jan 2022 19:10:49 +0530 Subject: [PATCH 3/3] fix: get fiscal year based on date --- .../doctype/purchase_invoice/test_purchase_invoice.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py index 699af608253..21846bb76c8 100644 --- a/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.py @@ -1236,11 +1236,7 @@ def check_gl_entries(doc, voucher_no, expected_gle, posting_date): def update_tax_witholding_category(company, account): from erpnext.accounts.utils import get_fiscal_year -<<<<<<< HEAD - fiscal_year = get_fiscal_year(fiscal_year='2021') -======= fiscal_year = get_fiscal_year(date=nowdate()) ->>>>>>> 342658ea70 (fix: Test Case) if not frappe.db.get_value('Tax Withholding Rate', {'parent': 'TDS - 194 - Dividends - Individual', 'from_date': ('>=', fiscal_year[1]),