<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: lixi  
    $Date: 2011-8-1 下午02:15:06  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
            
            begin
			  -- Call the procedure
			  acr_vat_interface_pkg.insert_interface(p_batch_id => ${@batch_id},
			                                         p_batch_line_id => ${@batch_line_id},
			                                         p_document_number => ${@document_number},
			                                         p_business_type_desc => ${@business_type_desc},
			                                         p_invoice_kind_desc => ${@invoice_kind_desc},
			                                         p_invoice_number => ${@invoice_number},
			                                         p_invoice_date => ${@invoice_date},
			                                         p_invoice_bp_code => ${@invoice_bp_code},
			                                         p_invoice_bp_name => ${@invoice_bp_name},
			                                         p_invoice_title => ${@invoice_title},
			                                         p_total_amount => to_number(${@total_amount}),
			                                         p_currency => ${@currency},
			                                         p_created_by_name => ${@created_by_name},
			                                         p_confirmed_by_name => ${@confirmed_by_name},
			                                         p_invoice_status_desc => ${@invoice_status_desc},
			                                         p_reversed_flag_desc => ${@reversed_flag_desc},
			                                         p_vat_interface_status_desc => ${@vat_interface_status_desc},
			                                         p_vat_invoice_status_desc => ${@vat_invoice_status_desc},
			                                         p_accounting_date => ${@accounting_date},
			                                         p_internal_period_num => to_number(${@internal_period_num}),
			                                         p_create_je_flag => ${@create_je_flag},
			                                         p_project_number => ${@project_number},
			                                         p_project_name => ${@project_name},
			                                         p_contract_number => ${@contract_number},
			                                         p_contract_name => ${@contract_name},
			                                         p_company_id => ${/session/@company_id},
			                                         p_user_id => ${/session/@user_id});
			end;                
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>