var override_queryfields = [
		{
			name : 'creationdate_from',
			queryexpression : "trunc(t1.creationdate) >= to_date(${@creationdate_from},'yyyy-mm-dd')"
		},
		{
			name : 'creationdate_to',
			queryexpression : "trunc(t1.creationdate) <= to_date(${@creationdate_to},'yyyy-mm-dd')"
		},
		{
			name : 'status',
			queryexpression : "t1.status in ('000','Z00','NEW','APPROVING','APPROVED','REJECT','CANCEL','confirm','reject','send')"
		}];

var add_datafilters = [ {
    name : 'contract_id',
    expression : "not exists (select 1          from con_contract_penalty_reduce ccpr          where ccpr.record_id = t1.record_id           and not exists         (select 1                  from aut_trx_user_authorize a1, aut_owner_user_authorize a2                 where a1.trx_category = 'CONTRACT'                   and a1.trx_id = ccpr.contract_id                   and trunc(sysdate) between a1.start_date and                       nvl(a1.end_date, trunc(sysdate))                   and a1.user_id = a2.owner_user_id                   and a1.trx_category = a2.trx_category                   and a2.authorized_user_id = 1                   and trunc(sysdate) between a2.start_date and                       nvl(a2.end_date, trunc(sysdate))))"
} ];

override();

add_datafilter();