<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-10-1 下午04:39:18  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="FND_AGING_RESULT_LN_TMP_V" defaultOrderBy="t1.times">
    <bm:fields>
        <bm:field name="session_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SESSION_ID" prompt="FND_AGING_RESULT_LN_TMP_V.SESSION_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="FND_AGING_RESULT_LN_TMP_V.CONTRACT_ID"/>
        <bm:field name="cashflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CASHFLOW_ID" prompt="FND_AGING_RESULT_LN_TMP_V.CASHFLOW_ID"/>
        <bm:field name="aging_bucket_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AGING_BUCKET_SEQ" prompt="FND_AGING_RESULT_LN_TMP_V.AGING_BUCKET_SEQ"/>
        <bm:field name="aging_bucket_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AGING_BUCKET_ID" prompt="FND_AGING_RESULT_LN_TMP_V.AGING_BUCKET_ID"/>
        <bm:field name="days" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DAYS" prompt="FND_AGING_RESULT_LN_TMP_V.DAYS"/>
        <bm:field name="due_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="DUE_AMOUNT" prompt="FND_AGING_RESULT_LN_TMP_V.DUE_AMOUNT"/>
        <bm:field name="principal" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL" prompt="FND_AGING_RESULT_LN_TMP_V.PRINCIPAL"/>
        <bm:field name="interest" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST" prompt="FND_AGING_RESULT_LN_TMP_V.INTEREST"/>
        <bm:field name="times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TIMES" prompt="FND_AGING_RESULT_LN_TMP_V.TIMES"/>
        <bm:field name="cf_item" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_ITEM" prompt="FND_AGING_RESULT_LN_TMP_V.CF_ITEM"/>
        <bm:field name="cf_item_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CF_ITEM_NAME" prompt="FND_AGING_RESULT_LN_TMP_V.CF_ITEM_NAME"/>
        <bm:field name="cf_direction" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CF_DIRECTION" prompt="FND_AGING_RESULT_LN_TMP_V.CF_DIRECTION"/>
        <bm:field name="due_date" databaseType="DATE" datatype="java.util.Date" physicalName="DUE_DATE" prompt="FND_AGING_RESULT_LN_TMP_V.DUE_DATE"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.contract_id=${@contract_id} and t1.aging_bucket_seq=${@aging_bucket_seq} and t1.session_id=${/session/@session_id} and (t1.days between ${@days_from} and ${@days_to} or ${@days_to} is null)"/>
    </bm:data-filters>
</bm:model>
