<?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 * from (select * from rpt_commission_split tt where tt.created_by = ${/session/@user_id}) t
             #WHERE_CLAUSE#
            order by t.seq_order

            ]]></bm:query-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
		        begin
		           rpt_commission_split_pkg.insert_commission_split_job(
		                                                       p_data_month =>${@period_name_cal},
		                                                       p_user_id  =>${/session/@user_id}
		                             );
		        end;
        ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="period_name_query" queryExpression=" t.split_month =  ${@period_name_query}"/>
        <bm:query-field name="contract_number" queryExpression="t.contract_number = ${@contract_number}"/>
        <bm:query-field name="tenant_name" queryExpression="t.tenant_name = ${@tenant_name}"/>
        <bm:query-field name="agent_name" queryExpression="t.agent_name = ${@agent_name}"/>
    </bm:query-fields>
</bm:model>
