Hi,
I would like to add a date filter to a dynamic page created in the www folder using the frappe.db.sql with the following code
context.customers = frappe.db.sql("""SELECT FORMAT(SUM(total),0) as total, customer FROM
`tabSales Invoice`
WHERE docstatus = 1 AND MONTH(posting_date) = MONTH(CURDATE())
GROUP BY customer WITH ROLLUP""", as_dict=True, formatted=True)
How and where would a filter to change the Date Range for example be included.
Any help would be appreciated.
Thanks