<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-7-4 下午5:06:06  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
				begin
					ACR_INVOICE_PKG.tmp_delete_session(p_session_id => ${/session/@session_id});
				end;
			]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
				begin
					 ACR_INVOICE_PKG.split_cashflow(p_cashflow_id					=> ${@cashflow_id},
													p_session_id					=> ${/session/@session_id},
													p_bp_id         				=> ${@billing_object_id},
						                            p_bp_name       				=> ${@billing_object_name},
						                            p_invoice_title                 => ${@invoice_title},
						                            p_invoice_bp_address_phone_num  => ${@invoice_bp_address_phone_num},
						                            p_invoice_bp_bank_account       => ${@invoice_bp_bank_account},
						                            p_invoice_bp_tax_registry_num	=> ${@object_tax_registry_num},
						                            p_head_description              => ${@description},
						                            p_currency						=> 'CNY',
						                            p_exchange_rate_type            => ${@exchange_rate_type},
													p_exchange_rate_quotation       => ${@exchange_rate_quotation},
													p_exchange_rate                 => ${@exchange_rate},
						                            p_user_id			  			=> ${/session/@user_id}
						                            );
				end;
			]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
