var add_datafilters = [ {
	name : 'query',
	expression : "t1.approve_status = 'Y' and (${/session/@user_id} = 1 or ${/session/@user_id} in (SELECT su.user_id FROM sys_user su, exp_employee_assigns eea, exp_employees ex,exp_org_position_vl eo WHERE su.employee_id = eea.employee_id AND eea.position_id = eo.position_id and ex.employee_id = su.employee_id and nvl(su.frozen_flag, 'N') <> 'Y' and eea.enabled_flag = 'Y' and ex.enabled_flag = 'Y' and eo.enabled_flag = 'Y' and sysdate between su.start_date and nvl(su.end_date, to_date('3000-01-01', 'yyyy-mm-dd')) and eo.POSITION_CODE = '300') or ${/session/@user_id} in (SELECT su.user_id FROM sys_user su, exp_employee_assigns eea, exp_employees ex,exp_org_position_vl eo WHERE su.employee_id = eea.employee_id AND eea.position_id = eo.position_id and ex.employee_id = su.employee_id and nvl(su.frozen_flag, 'N') <> 'Y' and eea.enabled_flag = 'Y' and ex.enabled_flag = 'Y' and eo.enabled_flag = 'Y' and sysdate between su.start_date and nvl(su.end_date, to_date('3000-01-01', 'yyyy-mm-dd')) and eo.POSITION_ID = t1.edit_post_id))"
}];

add_datafilter();

var override_queryfields = [ 

{
	name : 'next_send_date_from',
	queryexpression : "trunc(t1.next_send_date) >=to_date(${@next_send_date_from},'yyyy-mm-dd')"
},
{
	name : 'next_send_date_to',
	queryexpression : "trunc(t1.next_send_date) <=to_date(${@next_send_date_to},'yyyy-mm-dd')"
}

];

override();
