<?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 
   round(sum(ch.total_rental/(ch.pay_times*12/ch.annual_pay_times)),2) fin_credit_rental
from prj_project pp,prj_quotation quo,hls_fin_calculator_hd ch
where pp.project_id = quo.document_id 
and pp.bp_id_tenant = ${/parameter/@bp_id}
and quo.calc_session_id = ch.calc_session_id
and nvl(quo.create_contract_flag,'N') = 'N'
and pp.project_status not in('NEW','REJECT','CANCEL')
and pp.project_id!= ${/parameter/@project_id}]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="fin_credit_rental" databaseType="NUMBER" datatype="java.lang.Double" physicalName="FIN_CREDIT_RENTAL"/>
    </bm:fields>
</bm:model>
