<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="ACR_INTERFACE_TMP">
    <bm:fields>
        <bm:field name="session_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SESSION_ID" prompt="ACR_INTERFACE_TMP.SESSION_ID"/>
        <bm:field name="invoice_hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INVOICE_HD_ID" prompt="ACR_INTERFACE_TMP.INVOICE_HD_ID"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:operations>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
    			
    				delete from ACR_INTERFACE_TMP  where session_id = ${/session/@session_id}
    			
    		]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
    			
    			  insert into ACR_INTERFACE_TMP(session_id,invoice_hd_id) values(${/session/@session_id},${@invoice_hd_id})
    			
    		]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[

    			  begin
                    acr_invoice_wfl_pkg.check_invoice_select_num(p_invoice_apply_id  =>  ${@invoice_apply_id},
                                                                 p_select_count =>  ${@select_count},
                                                                  p_user_id           =>  ${/session/@user_id});
                end;

    		]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
