<!--<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 ccc.contract_id = t1.contract_id AND ccc.cf_status<>'BLOCK' and ccc.cf_item<>0 and ccc.cf_item<>40) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status<>'BLOCK' and ccc.cf_item<>0 and ccc.cf_item<>40 )) = 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 ccc.contract_id = t1.contract_id AND ccc.cf_status<>'BLOCK' and ccc.cf_item not in(0,40,911)) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status<>'BLOCK' and ccc.cf_item not in(0,40,911))) = 0 THEN '是' ELSE '否' END)"forInsert="false"forUpdate="false"/>
<bm:fieldname="amount_total"expression="(select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status<>'BLOCK' and ccc.cf_item=1)"forInsert="false"forUpdate="false"/>
<bm:fieldname="amount_principal"expression="(select sum(nvl(ccc.principal,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status<>'BLOCK')"forInsert="false"forUpdate="false"/>
<bm:fieldname="amount_interest"expression="(select sum(nvl(ccc.interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status<>'BLOCK' and cf_item=1)"forInsert="false"forUpdate="false"/>
queryexpression:"t1.inception_of_lease between to_date(${@inception_of_lease_from},'yyyy-mm-dd') and nvl(to_date(${@inception_of_lease_to},'yyyy-mm-dd'),t1.inception_of_lease)"
},
{
name:'inception_of_lease_to',
queryexpression:"t1.inception_of_lease between nvl(to_date(${@inception_of_lease_from},'yyyy-mm-dd'),t1.inception_of_lease) and to_date(${@inception_of_lease_to},'yyyy-mm-dd')"
expression:'t1.division in (${@division1},${@division2},${@division3},${@division4},${@division5},${@division6},${@division7},${@division8},{@division9},{@division10}) '
expression:'t1.division in (${@division1},${@division2},${@division3},${@division4},${@division5},${@division6},${@division7},${@division8},{@division9},{@division10},{@division14}) '