<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Feng  
    $Date: 2014-5-27 下午3:39:12  
    $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 a.invoice_header_id,v.cashflow_id, v.times,v.cf_item_desc,v.due_date,v.due_amount,v.received_amount,v.billing_amount,v.last_received_date,a.total_amount,a.tax_amount FROM ACR_INVOICE_CONTRACT_CF_V v,acp_invoice_ln a
WHERE v.cashflow_id = a.cashflow_id AND a.invoice_header_id = ${@invoice_hd_id}]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="cashflow_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="invoice_header_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INVOICE_HEADER_ID"/>
        <bm:field name="times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TIMES" required="true"/>
        <bm:field name="cf_item_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CF_ITEM_DESC"/>
        <bm:field name="due_date" databaseType="DATE" datatype="java.util.Date" physicalName="DUE_DATE"/>
        <bm:field name="due_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="DUE_AMOUNT"/>
        <bm:field name="received_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="RECEIVED_AMOUNT"/>
        <bm:field name="billing_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="BILLING_AMOUNT"/>
        <bm:field name="last_received_date" databaseType="DATE" datatype="java.util.Date" physicalName="LAST_RECEIVED_DATE"/>
        <bm:field name="total_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_AMOUNT"/>
        <bm:field name="tax_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TAX_AMOUNT"/>
    </bm:fields>
</bm:model>
