<?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
                    pq.quotation_id,
                    pq.document_number,
                    pq.document_id,
                    pq.quotation_date,
                    pq.lease_item_amount
                FROM
                    prj_quotation pq
                WHERE
                    pq.document_category            = 'LOAN_CONTRACT' AND
                    NVL(pq.main_contract_flag, 'N') = 'N' AND
                    NVL(pq.wfl_status, 'NEW')       = 'APPROVED'
                    and pq.document_id =${@loan_contract_id}
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="quotation_id"/>
        <bm:field name="document_number" forDisplay="true" forQuery="true" prompt="提款编号"/>
        <bm:field name="quotation_date" databaseType="DATE" datatype="java.util.Date" forDisplay="true" forQuery="true" prompt="提款日期"/>
        <bm:field name="lease_item_amount" databaseType="NUMBER" datatype="java.lang.Double" forDisplay="true" forQuery="true" prompt="提款金额"/>
        <bm:field name="document_id"/>
    </bm:fields>
</bm:model>
