Merge pull request #19527 from deepeshgarg007/gstr_1_error_fix

fix: Exception handling in GSTR-1 Report
This commit is contained in:
Deepesh Garg 2019-11-07 20:19:29 +05:30 committed by GitHub
commit 4a6c723310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,7 @@ class Gstr1Report(object):
taxable_value = 0
for item_code, net_amount in self.invoice_items.get(invoice).items():
if item_code in items:
if self.item_tax_rate.get(invoice) and tax_rate in self.item_tax_rate.get(invoice, {}).get(item_code):
if self.item_tax_rate.get(invoice) and tax_rate in self.item_tax_rate.get(invoice, {}).get(item_code, []):
taxable_value += abs(net_amount)
elif not self.item_tax_rate.get(invoice):
taxable_value += abs(net_amount)