fix: GSTR 3b report fixes (#17317)

* fix: GSTR-3b report total taxable value fixes

* fix: Test Cases
This commit is contained in:
Deepesh Garg 2019-04-22 15:22:36 +05:30 committed by GitHub
parent 0828064596
commit 15a7b7ce71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -227,12 +227,18 @@ class GSTR3BReport(Document):
for d in inter_state_supply.get("Unregistered", []):
self.report_dict["inter_sup"]["unreg_details"].append(d)
self.report_dict["sup_details"]["osup_det"]["txval"] += d["txval"]
self.report_dict["sup_details"]["osup_det"]["iamt"] += d["iamt"]
for d in inter_state_supply.get("Registered Composition", []):
self.report_dict["inter_sup"]["comp_details"].append(d)
self.report_dict["sup_details"]["osup_det"]["txval"] += d["txval"]
self.report_dict["sup_details"]["osup_det"]["iamt"] += d["iamt"]
for d in inter_state_supply.get("UIN Holders", []):
self.report_dict["inter_sup"]["uin_details"].append(d)
self.report_dict["sup_details"]["osup_det"]["txval"] += d["txval"]
self.report_dict["sup_details"]["osup_det"]["iamt"] += d["iamt"]
def get_total_taxable_value(self, doctype, reverse_charge):
@ -296,7 +302,7 @@ class GSTR3BReport(Document):
inter_state_supply_details[d.gst_category].append({
"pos": get_state_code(d.gst_state),
"txval": d.total,
"txval": d.total - d.tax_amount,
"iamt": d.tax_amount
})

View File

@ -57,7 +57,7 @@ class TestGSTR3BReport(unittest.TestCase):
output = json.loads(report.json_output)
self.assertEqual(output["sup_details"]["osup_det"]["iamt"], 18),
self.assertEqual(output["sup_details"]["osup_det"]["iamt"], 36),
self.assertEqual(output["sup_details"]["osup_zero"]["iamt"], 18),
self.assertEqual(output["inter_sup"]["unreg_details"][0]["iamt"], 18),
self.assertEqual(output["sup_details"]["osup_nil_exmp"]["txval"], 100),