<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
                DECLARE
                    v_call_id NUMBER;
                BEGIN
                    con_collection_tool_pkg.insert_collection_cell_hd_data( 
                    p_call_id=>v_call_id, 
                    p_contract_id => ${@contract_id}, 
                    p_project_id=> ${@project_id}, 
                    p_bp_id => ${@bp_id}, 
                    p_overdue_state => ${@overdue_state}, 
                    p_overdue_state_type => ${@overdue_state_type}, 
                    p_payments_day => ${@payments_day}, 
                    p_payments_date => ${@payments_date}, 
                    p_user_id => ${/session/@user_id},
                    p_col_id=>${@col_id});
                    
                    
                    con_collection_tool_pkg.insert_collection_cell_ln_data(
                   p_call_id=>v_call_id,
                   p_bp_type_desc=>${@bp_type_desc},
                   p_collection_name=>${@collection_name},
                   p_cell_phone=>${@cell_phone},
                   p_call_time=>${@call_time},
                   p_staff_id=>${@staff_id},
                   p_note=>${@note},
                   p_user_id => ${/session/@user_id},
                   p_contract_id =>${@contract_id},
                   p_type=>${@type},
                   p_col_id=>${@col_id},
                   p_project_id=>${@project_id});
                END;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="contract_id" output="true" outputPath="@contract_id"/>
                <bm:parameter name="call_id" output="true" outputPath="@call_id"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
</bm:model>
