<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="execute">
            <bm:parameters>
                <bm:parameter name="et_fee" dataType="java.lang.Double" input="true" output="true" outputPath="@et_fee"/>
                <bm:parameter name="et_total_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@et_total_amount"/>
                <bm:parameter name="et_due_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@et_due_amount"/>
                <bm:parameter name="overdue_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@overdue_amount"/>
                <bm:parameter name="penalty" dataType="java.lang.Double" input="false" output="true" outputPath="@penalty"/>
                <bm:parameter name="fund_possession_time" dataType="java.lang.Double" input="false" output="true" outputPath="@fund_possession_time"/>
                <bm:parameter name="fund_possession_cost" dataType="java.lang.Double" input="false" output="true" outputPath="@fund_possession_cost"/>
                <bm:parameter name="sum_unreceived_principal" dataType="java.lang.Double" input="false" output="true" outputPath="@sum_unreceived_principal"/>
                <bm:parameter name="fund_possession_rate" dataType="java.lang.Double" input="false" output="true" outputPath="@fund_possession_rate"/>
                <bm:parameter name="last_rent_due_date" dataType="date"  input="false" output="true" outputPath="@last_rent_due_date"/>
                <bm:parameter name="asset_possession_cost" dataType="java.lang.Double" input="false" output="true" outputPath="@asset_possession_cost"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                BEGIN
                    cus_con_et_pkg.calc_et_date_amount(p_change_req_id              =>${@change_req_id},
                                                       p_contract_id                => ${@contract_id},
                                                       p_et_date                    => TO_DATE(${@termination_date},'yyyy-mm-dd'),
                                                        p_ET_FEE                     => ${@et_fee},
                                                       p_et_interest_rate           => ${@et_interest_rate},
                                                       p_et_total_amount            => ${@et_total_amount},
                                                       p_et_due_amount              => ${@et_due_amount},
                                                       p_overdue_amount             => ${@overdue_amount},
                                                       p_penalty                    => ${@penalty},
                                                       p_fund_possession_time       => ${@fund_possession_time},
                                                       p_fund_possession_cost       => ${@fund_possession_cost},
                                                       p_sum_unreceived_principal   => ${@sum_unreceived_principal},
                                                       p_fund_possession_rate=>${@fund_possession_rate},
                                                       p_last_rent_due_date=>${@last_rent_due_date},
													   p_asset_possession_cost       => ${@asset_possession_cost},
                                                       p_residual_value=>${@residual_value},
													   p_deposit_deduction=>${@deposit_deduction},
                                                       p_user_id                    => ${/session/@user_id});
                END;
                ]]>
            </bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
