fix: From date and to date filters in HSN wise summary of out ward supplies

This commit is contained in:
deepeshgarg007 2019-06-19 18:25:38 +05:30
parent d849ce7ce0
commit ecc670047e
2 changed files with 17 additions and 2 deletions

View File

@ -29,7 +29,20 @@ frappe.query_reports["HSN-wise-summary of outward supplies"] = {
"placeholder":"Company GSTIN",
"options": [""],
"width": "80"
}
},
{
"fieldname":"from_date",
"label": __("From Date"),
"fieldtype": "Date",
"width": "80"
},
{
"fieldname":"to_date",
"label": __("To Date"),
"fieldtype": "Date",
"width": "80"
},
],
onload: (report) => {
fetch_gstins(report);

View File

@ -88,7 +88,9 @@ def get_conditions(filters):
for opts in (("company", " and company=%(company)s"),
("gst_hsn_code", " and gst_hsn_code=%(gst_hsn_code)s"),
("company_gstin", " and company_gstin=%(company_gstin)s")):
("company_gstin", " and company_gstin=%(company_gstin)s"),
("from_date", " and posting_date >= %(from_date)s"),
("to_date", "and posting_date <= %(to_date)s")):
if filters.get(opts[0]):
conditions += opts[1]