i user script report in appraisal, but its not working. i have branch filter field, employee filter field and start and end date filter. but know of them are working
i use below js script:
frappe.query_reports["Appraisal Report"] = {
"filters": [
{
"fieldname": "branch",
"label":__("Branch Name"),
"fieldtype":"Link",
"options":"Branch",
},
{
"fieldname":"employee_name",
"label": __("Employee Name"),
"fieldtype": "Link",
"options": "Employee",
"get_query" : function(){
var branch = frappe.query_report_filters_by_name.branch.get_value();
return{
"doctype": "Appraisal",
"filters":{
"branch":branch,
}
}
}
},
{
"fieldname":"start_date",
"label": __("From Date"),
"fieldtype": "Date",
"reqd": 1,
"default": frappe.datetime.year_start()
},
{
"fieldname":"end_date",
"label": __("To Date"),
"fieldtype": "Date",
"reqd": 1,
"default": frappe.datetime.year_end()
},
in firstly i have try to filter employee name, but its not working.
please help me