var override_queryfields = [ 
{
	name : 'bp_id_tenant',
	queryexpression : "t1.bp_id_tenant =${@bp_id_tenant}"
},
{
	name : 'bp_id',
	queryexpression : "t1.bp_id_tenant =${@bp_id}"
},
{
	name : 'bp_id_tenant_n',
	queryexpression : "t1.bp_id_tenant_n like ${@bp_id_tenant_n}"
},
 
{
	name : 'lease_start_date_from',
	queryexpression : "t1.lease_start_date between to_date(${@lease_start_date_from},'yyyy-mm-dd') and nvl(to_date(${@lease_start_date_to},'yyyy-mm-dd'),t1.lease_start_date)"
},
{
	name : 'lease_start_date_to',
	queryexpression : "t1.lease_start_date between nvl(to_date(${@lease_start_date_from},'yyyy-mm-dd'),t1.lease_start_date) and to_date(${@lease_start_date_to},'yyyy-mm-dd')"
},
 
{
	name : 'contract_num_from',
	queryexpression : "t1.contract_id between ${@contract_num_from} and nvl(${@contract_num_to},${@contract_num_from})"
},
{
	name : 'contract_num_to',
	queryexpression : "t1.contract_id between ${@contract_num_from} and nvl(${@contract_num_to},${@contract_num_from})"
},
{
	name : 'cf_item',
	queryexpression : "t1.cf_item = ${@cf_item}"
},
 
{
	name : 'transaction_date_from',
	queryexpression : "t1.transaction_date between to_date(${@transaction_date_from},'yyyy-mm-dd') and nvl(to_date(${@transaction_date_to},'yyyy-mm-dd'),t1.transaction_date)"
},
{
	name : 'transaction_date_to',
	queryexpression : "t1.transaction_date between nvl(to_date(${@transaction_date_from},'yyyy-mm-dd'),t1.transaction_date) and to_date(${@transaction_date_to},'yyyy-mm-dd')"
},
{
	name : 'bank_full_name',
	queryexpression : "t1.bank_full_name like ${@bank_full_name}"
},
{
	name : 'contract_number',
	queryexpression : "t1.contract_number like ${@contract_number}"
},
{
	name : 'contract_name',
	queryexpression : "t1.contract_name like ${@contract_name}"
},
{
	name : 'search_term_1',
	queryexpression : "t1.search_term_1 like ${@search_term_1}"
}

];
 
var add_datafilters=[
                     {
                    	name:'datafilter1',
                    	expression:" EXISTS (SELECT 1 FROM csh_payment_req_ln l, csh_payment_req_ln_ddct ld  WHERE ld.payment_req_ln_id = l.payment_req_ln_id AND ld.ref_doc_category = 'CON_CONTRACT' AND ld.ref_doc_id = t1.contract_id  AND ld.ref_doc_line_id = t1.cashflow_id   AND l.payment_status <> 'NOT')"
                    }
                     ];


 
override();
add_datafilter();
