Merge pull request #20024 from deepeshgarg007/gstr_2_report_fix

fix: Tax amount not visible for some invoices
This commit is contained in:
rohitwaghchaure 2019-12-20 13:34:53 +05:30 committed by GitHub
commit 9c1d3f2f54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,12 +44,16 @@ class Gstr2Report(Gstr1Report):
for inv, items_based_on_rate in self.items_based_on_tax_rate.items():
invoice_details = self.invoices.get(inv)
for rate, items in items_based_on_rate.items():
if inv not in self.igst_invoices:
rate = rate / 2
row, taxable_value = self.get_row_data_for_invoice(inv, invoice_details, rate, items)
tax_amount = taxable_value * rate / 100
if inv in self.igst_invoices:
row += [tax_amount, 0, 0]
row += [0, tax_amount, tax_amount]
else:
row += [0, tax_amount / 2, tax_amount / 2]
row, taxable_value = self.get_row_data_for_invoice(inv, invoice_details, rate, items)
tax_amount = taxable_value * rate / 100
row += [tax_amount, 0, 0]
row += [
self.invoice_cess.get(inv),