<bm:fieldname="bp_name"expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_tenant and enabled_flag='Y')"forInsert="false"forUpdate="false"/>
<!--<bm:field name="signing_user_id_n" expression="(select name from exp_employees where employee_id = t1.signing_user_id)" forInsert="false" forUpdate="false"/>-->
<bm:fieldname="lease_channel_desc"expression="(select description from hls_lease_channel where lease_channel = t1.lease_channel)"forInsert="false"forUpdate="false"/>
<!--<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 cf_item=1) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item=1)) = 0 THEN '是' ELSE '否' END)"forInsert="false"forUpdate="false"/>
<bm:fieldname="bp_id_agent_desc"/>
<bm:fieldname="business_type_n"/>
<bm:fieldname="division_n"/>
</bm:fields>
<bm:features>
<f:standard-who/>
<s:bm-script><![CDATA[
var cx = Packages.leaf.javascript.Context.getCurrentContext();
<bm:query-fieldfield="bp_id_agent_desc"queryExpression="bp_id_agent_desc like upper('%'||${@bp_id_agent_desc}||'%')"/>
</bm:query-fields>
<bm:data-filters>
<bm:fieldname="is_terminate"expression="((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1)) = 0"/>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_status in ('INCEPT','ETING','ADING') "/>-->
<!--<bm:data-filter enforceOperations="query" expression=" NOT EXISTS (SELECT 1 FROM con_contract_cashflow WHERE contract_id = t1.contract_id AND cf_item IN (1,8,52) AND (write_off_flag IN ('PARTIAL', 'NOT') OR received_amount != due_amount))"/>-->
<!--<bm:data-filter enforceOperations="query" expression="exists (select 1 from con_contract where contract_id = t1.contract_id and created_by = ${/session/@user_id})"/>-->