Merge pull request #31125 from frappe/mergify/bp/develop/pr-31123

fix: Handle missing HSN Codes (backport #31123)
This commit is contained in:
Deepesh Garg 2022-05-25 13:32:41 +05:30 committed by GitHub
commit e8f44445fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")