<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
       select * from (
            select ptw.gld_cf_item,
            (Select h.description
                      From hls_cashflow_item h
                     Where h.cf_item = ptw.gld_cf_item) gld_cf_item_n,
            ptw.gld_times,
            ptw.gld_write_off_id,
            ptw.csh_write_off_id,
            ptw.gld_write_off_amount,
            ctp.record_id
          from
                  penalty_trans_write_off  ptw,
                  cus_rent_trans_pently_hd ctp
             Where   ptw.trans_pently_hd_id=ctp.record_id
             and ptw.gld_write_off_amount>0
             ) t
               #WHERE_CLAUSE#

            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="record_id" queryExpression="t.record_id = ${@record_id}"/>
    </bm:query-fields>
</bm:model>
