<?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="last_rent_due_date" dataType="java.util.Date" input="false" output="true" outputPath="@last_rent_due_date"/>
                <bm:parameter name="sum_received_rent_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@sum_received_rent_amount"/>
                <bm:parameter name="sum_unreceived_rent_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@sum_unreceived_rent_amount"/>
                <bm:parameter name="sum_overdue_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@sum_overdue_amount"/>
                <bm:parameter name="sum_unreceived_principal" dataType="java.lang.Double" input="false" output="true" outputPath="@sum_unreceived_principal"/>
                <bm:parameter name="due_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@due_amount"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                BEGIN
                cus_con_contract_repo_pkg.calc_repo_date_amount(p_contract_id                => ${@contract_id},
                                                                p_repurchase_date            => to_date(${@repurchase_date},'yyyy-mm-dd'),
                                                                p_last_rent_due_date         => ${@last_rent_due_date},
                                                                p_sum_received_rent_amount   => ${@sum_received_rent_amount},
                                                                p_sum_unreceived_rent_amount => ${@sum_unreceived_rent_amount},
                                                                p_sum_overdue_amount         => ${@sum_overdue_amount},
                                                                p_sum_unreceived_principal   => ${@sum_unreceived_principal},
                                                                p_due_amount                 => ${@due_amount},
                                                                p_user_id                    => ${/session/@user_id});
                END;
                ]]>
            </bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
