I have created a script report in which i have added filter in .js file as below:
> frappe.query_reports["Internal Voucher"] = {
> "filters": [
> {
> "fieldname":"customer",
> "label": __("Customer"),
> "fieldtype": "Link",
> "options": "Customer",
> "get_query": function() {
> return {
> "doctype": "Customer",
> "filters": {
> "customer_group": "Internal Customer",
> }
> }
> }
> },
> ]
> }
I was trying to get a list of customer based on customer_group = “Internal Customer” but it’s not working. Instead, above filter shows all customer instead of list of customer where customer_group = “Internal Customer”.
How could i set user defined value in link filter in custom report?