<bm:fieldname="unreceived_amount"expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="unreceived_amount"expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_principal"expression="(select ca.principal - nvl(ca.received_principal,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_principal"expression="(select ca.principal - nvl(ca.received_principal,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_interest"expression="(select ca.interest - nvl(ca.received_interest,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_interest"expression="(select ca.interest - nvl(ca.received_interest,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="unreceived_penalty"expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.contract_id = t1.contract_id and ca.times = t1.write_off_times and cf_item = 9)"forInsert="false"forUpdate="false"/>
<bm:fieldname="unreceived_penalty"expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.contract_id = t1.contract_id and ca.times = t1.write_off_times and cf_item = 9 and cf_status = 'RELEASE')"forInsert="false"forUpdate="false"/>
<bm:fieldname="agent_id_desc"expression="(select hbm.bp_name from hls_bp_master hbm where hbm.bp_id = t1.agent_id)"forUpdate="false"forInsert="false"/>
<bm:fieldname="agent_id_desc"expression="(select hbm.bp_name from hls_bp_master hbm where hbm.bp_id = t1.agent_id)"forUpdate="false"forInsert="false"/>
<bm:fieldname="bp_code"expression="(select d.bp_code from hls_bp_master_v d where d.bp_id=t1.bp_id)"forInsert="false"forUpdate="false"prompt="HLS.BP_CODE"/>
<bm:fieldname="bp_code"expression="(select d.bp_code from hls_bp_master_v d where d.bp_id=t1.bp_id)"forInsert="false"forUpdate="false"prompt="HLS.BP_CODE"/>
<bm:fieldname="bp_name"expression="(select d.bp_name from hls_bp_master_v d where d.bp_id=t1.bp_id)"forInsert="false"forUpdate="false"prompt="HLS.BP_NAME"/>
WHERE c.contract_id = t1.ref_contract_id) = '70' then
(SELECT cc.bp_id_agent_level1
FROM con_contract cc
WHERE cc.contract_id = t1.ref_contract_id) else t1.bp_id end))"forInsert="false"forUpdate="false"prompt="HLS.BP_NAME"/>
<bm:fieldname="unit_id"expression="(select d.unit_id from hls_bp_master d where d.bp_id=t1.bp_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="unit_id"expression="(select d.unit_id from hls_bp_master d where d.bp_id=t1.bp_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="payment_method_display"expression="(select cp.description from csh_payment_method cp where cp.payment_method_id=t1.payment_method_id)"forInsert="false"forUpdate="false"prompt="HLS.PAYMENT_METHOD"/>
<bm:fieldname="payment_method_display"expression="(select cp.description from csh_payment_method cp where cp.payment_method_id=t1.payment_method_id)"forInsert="false"forUpdate="false"prompt="HLS.PAYMENT_METHOD"/>
<bm:fieldname="currency_name"expression="(select gc.currency_name from gld_currency_vl gc where gc.currency_code=t1.currency_code)"forInsert="false"forUpdate="false"prompt="HLS.CURRENCY"/>
<bm:fieldname="currency_name"expression="(select gc.currency_name from gld_currency_vl gc where gc.currency_code=t1.currency_code)"forInsert="false"forUpdate="false"prompt="HLS.CURRENCY"/>
}else if (record.get('invoice_wfl_status') != 'APPROVING' && record.get('bp_wfl_status') != 'APPROVING'){
}else if (record.get('invoice_wfl_status') != 'APPROVING' && record.get('bp_wfl_status') != 'APPROVING'){
if (record.get('bp_type')=='THIRD_PARTY'&&"${/model/role_info/record/@role_code}"!="HAND"&&"${/model/user_name_path/record/@user_name}"!="DSF001"&&"${/model/user_name_path/record/@user_name}"!="DSF002") {