Hi All,
I am new to ERPNext and working with query reports. I want to add a filter in query report which I have named as “Debtor report” and was able to create a filter for to_date using a custom script for report. We wont be able to change any files from the folder as the Production site is on frappe cloud and even if we modify any files we wont be able to deploy those changes. Following is the custom script written from the UI for the “Debtor report”:
frappe.query_reports[“Debtor Report”] = {
“filters”: [
{
fieldname:“to_date”,
label: __(“Date”),
fieldtype: “Date”,
default:frappe.datetime.get_today(),
“reqd”:1
}
]
}
And have added the following in the query:
ON s.transaction_date <= %(to_date)s
This works fine when I open the report from Report list.
But when I try to open the report from selling module page, it shows me a key error for to_date. Please find the below image for reference. Could anyone please guide me if I am missing anything or something I can do to solve this.
Thanks.