<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select t.contract_id,
                       cc.contract_number,
                       cc.contract_status,
                       (select hbm.bp_name
                          from hls_bp_master hbm
                         where hbm.bp_id = cc.bp_id_tenant) tenant_name
                  from contract_cashflow_load_temp t, con_contract cc
                 where t.contract_id = cc.contract_id
                   and t.session_id = ${/session/@session_id}
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
     <bm:fields>
            <bm:field name="tenant_name"/>
            <bm:field name="contract_number"/>
            <bm:field name="contract_status"/>
            <bm:field name="contract_id"/>
     </bm:fields>
  </bm:model>
