<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    t1.approver_user_id sign_user_id,
                    e.employee_code,
                    e.employee_name,
                    e.position_name,
                    e.unit_name,
                    e.company_short_name,
                    t1.approver_type,
                    (SELECT
                        v.code_value_name
                    FROM
                        sys_code_values_v v
                    WHERE
                        v.code       = 'FND506_APPROVER_TYPE' AND
                        v.code_value = t1.approver_type
                    ) AS approver_type_desc,
                    t1.enabled_flag,
                    t1.creation_date,
                    t1.created_by,
                    t1.last_update_date,
                    t1.last_updated_by,
                    t1.ref_v01,
                    t1.ref_v02,
                    t1.ref_v03,
                    t1.ref_v04,
                    t1.ref_v05,
                    t1.ref_n01,
                    t1.ref_n02,
                    t1.ref_n03,
                    t1.ref_n04,
                    t1.ref_n05
                FROM
                    prj_project_approver_group t1
                JOIN exp_emp_assign_e_v e
                ON
                    e.user_id               = t1.approver_user_id AND
                    e.primary_position_flag = 'Y'
            ]]></bm:query-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
            	begin
            		hn_csh_payment_req_pkg.add_sign_user(p_sign_id => ${../@sign_id},
                          p_sign_user_id => ${@sign_user_id},
                          p_user_id      => ${/session/@user_id});
            	end;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
