<bm:query-fieldname="transaction_num"queryExpression="t.transaction_number like '%' || ${@transaction_num} || '%'"/>
<bm:query-fieldname="cf_item_n"queryExpression="t.cf_item_n like '%' || ${@cf_item_n} || '%'"/>
<bm:query-fieldname="extra_nam"queryExpression="t.extra_name like '%' || ${@extra_nam} || '%'"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filterenforceOperations="query"expression="exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 WHERE a1.trx_category = 'CONTRACT' and a1.trx_id = t.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 = ${/session/@user_id} AND trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate)))"/>
and exists (select 1 from con_contract c, hls_bp_master hb where c.contract_id = t.contract_id
and hb.bp_id = c.bp_id_agent_level1
and hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/>
<!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag='Y')" forInsert="false" forUpdate="false"/>-->
<bm:fieldname="lease_organization_desc"expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)"forInsert="false"forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:fieldname="is_terminate"expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status<>'BLOCK' and ccc.cf_item<>0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status<>'BLOCK')) = 0 THEN '是' ELSE '否' END)"forInsert="false"forUpdate="false"/>
<bm:fieldname="is_terminate"expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status<>'BLOCK' and ccc.cf_item<>0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status<>'BLOCK' and ccc.cf_item<>0)) = 0 THEN '是' ELSE '否' END)"forInsert="false"forUpdate="false"/>