<?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
                    *
                FROM
                    (SELECT
                        h.project_id,
                        l.loan_seq,
                        TO_CHAR(l.payment_amount,'FM999,999,999,990.00'),
                        l.payment_time,
                        l.money_paid_object
                    FROM
                        bgfl_lease_item_loan_plan_hd h,
                        bgfl_lease_item_loan_plan_ln l
                    WHERE
                        h.loan_plan_id = l.loan_plan_id
                    ) t1 #WHERE_CLAUSE#
                ORDER BY
                    t1.loan_seq
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
