<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-6-20 下午02:54:45  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            	select t1.cashflow_id,
            	       t1.times,
            	       to_char(t1.due_date,'yyyy-mm-dd') due_date,
            	       rtrim(to_char(t1.due_amount, 'FM99,999,999,990.99'), '.') due_amount
					  from con_contract_cashflow t1
					 where t1.cf_item = 1
					   and t1.cf_type = 1
					   and t1.times >= 1
					   and t1.contract_id=${@contract_id}
					 order by to_number(t1.times) asc
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
