fix: Add total row in GSTR-1 report

This commit is contained in:
deepeshgarg007 2019-06-30 19:49:26 +05:30
parent 4c2eb0f13b
commit cef54ae3c2
2 changed files with 23 additions and 22 deletions

View File

@ -1,29 +1,30 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2018-01-02 15:54:41.424225",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
"modified": "2018-01-02 17:56:15.379347",
"modified_by": "Administrator",
"module": "Regional",
"name": "GSTR-1",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "GSTR-1",
"report_type": "Script Report",
"add_total_row": 1,
"creation": "2018-01-02 15:54:41.424225",
"disable_prepared_report": 0,
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
"modified": "2019-06-30 19:33:59.769385",
"modified_by": "Administrator",
"module": "Regional",
"name": "GSTR-1",
"owner": "Administrator",
"prepared_report": 0,
"ref_doctype": "GL Entry",
"report_name": "GSTR-1",
"report_type": "Script Report",
"roles": [
{
"role": "Accounts User"
},
},
{
"role": "Accounts Manager"
},
},
{
"role": "Auditor"
}
]
}
}

View File

@ -573,19 +573,19 @@ def get_json():
res = {}
if filters["type_of_business"] == "B2B":
for item in report_data:
for item in report_data[:-1]:
res.setdefault(item["customer_gstin"], {}).setdefault(item["invoice_number"],[]).append(item)
out = get_b2b_json(res, gstin)
gst_json["b2b"] = out
elif filters["type_of_business"] == "B2C Large":
for item in report_data:
for item in report_data[:-1]:
res.setdefault(item["place_of_supply"], []).append(item)
out = get_b2cl_json(res, gstin)
gst_json["b2cl"] = out
elif filters["type_of_business"] == "EXPORT":
for item in report_data:
for item in report_data[:-1]:
res.setdefault(item["export_type"], []).append(item)
out = get_export_json(res)