From 6edbc5887311d454ebf487d080ad966d59f603ed Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 25 May 2022 11:51:07 +0530 Subject: [PATCH] fix: Handle missing HSN Codes (cherry picked from commit ce3a21eb039453d4786dfd0871a278b588039d80) --- erpnext/regional/report/gstr_1/gstr_1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/report/gstr_1/gstr_1.py b/erpnext/regional/report/gstr_1/gstr_1.py index fd0fe26e88..0bdbe56de6 100644 --- a/erpnext/regional/report/gstr_1/gstr_1.py +++ b/erpnext/regional/report/gstr_1/gstr_1.py @@ -448,7 +448,7 @@ class Gstr1Report(object): hsn_code = self.item_hsn_map.get(item_code) tax_rate = 0 taxable_value = items.get(item_code) - for rates in hsn_wise_tax_rate.get(hsn_code): + for rates in hsn_wise_tax_rate.get(hsn_code, []): if taxable_value > rates.get("minimum_taxable_value"): tax_rate = rates.get("tax_rate")