<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ericyin  
    $Date: 2013-3-26 上午11:33:15  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_FINANCIAL_TEST_TMP" defaultOrderBy="per">
    <bm:fields>
        <bm:field name="session_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="SESSION_ID"/>
        <bm:field name="per" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PER" prompt="Per"/>
        <bm:field name="pmt" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PMT" prompt="PMT"/>
        <bm:field name="ipmt" databaseType="NUMBER" datatype="java.lang.Double" physicalName="IPMT" prompt="IPMT"/>
        <bm:field name="outstanding" databaseType="NUMBER" datatype="java.lang.Double" physicalName="OUTSTANDING" prompt="Outstanding"/>
    </bm:fields>
    <bm:data-filters>
        <bm:data-filter name="query" expression="t1.session_id=${/session/@session_id}"/>
    </bm:data-filters>
    <bm:operations>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
			
            BEGIN
                ${@return_value} := hls_financial_test_pkg.cal_data(p_session_id =>${/session/@session_id}, 
                                                              p_function_type =>${@function_type}, 
                                                              p_rate=>${@rate}, 
                                                              p_nper=>${@nper}, 
                                                              p_pv=>${@pv}, 
                                                              p_fv=>${@fv}, 
                                                              p_type=>${@type}, 
                                                              p_pmt=>${@pmt});
            END;
            
           ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="return_value" dataType="java.lang.Double" input="false" output="true" outputPath="@return_value"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
</bm:model>
