<bm:fieldname="due_date"datatype="java.util.Date"expression="(select a.due_date from con_contract_cashflow a where a.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="write_off_type_desc"Expression="(select v.code_value_name from sys_code_values_v v where v.code_value = t1.write_off_type and v.code = 'CSH513_WRITE_OFF_TYPE')"forInsert="false"forUpdate="false"/>
<bm:fieldname="write_off_cf_item_desc"expression="(select a.cf_item_desc from hls_cashflow_item_v a where a.cf_item = t1.write_off_cf_item)"forInsert="false"forUpdate="false"/>
<bm:fieldname="write_off_bp_name"Expression="(select a.bp_name from hls_bp_master a where a.bp_id = t1.write_off_bp_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="contract_status_desc"Expression="(select a.contract_status_n from con_contract_lv a where a.contract_id=t1.contract_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_amount"expression="(select decode(cf_item,1,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:field name="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"/>-->
due_amount) -nvl(received_amount,0) from con_contract_cashflow where 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="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="bp_tenant_name"expression="(select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id)"forInsert="false"forUpdate="false"/>
due_amount) from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)"/>
<bm:fieldname="payment_deduction"expression="(select payment_deduction from con_contract c where c.contract_id = t1.contract_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="division"expression="(select division from con_contract c where c.contract_id = t1.contract_id)"forInsert="false"forUpdate="false"/>