<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Feng  
    $Date: 2013-7-15 下午4:10:21  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
            begin
                   acp_invoice_pkg.save_acp_invoice(p_invoice_hd_id =>${@invoice_hd_id},
                                                    p_company_id  =>${/session/@company_id},
                                                    p_contract_id   =>${@contract_id},
                                                    p_project_id =>${@project_id},
                                                    p_division =>${@division},
                                                    p_bp_id =>${@bp_id},
                                                    p_bp_name =>${@bp_name},
                                                    p_owner_user_id =>${@owner_user_id},
                                                    p_cashflow_id =>${@cashflow_id},
                                                    p_cf_item =>${@cf_item},
                                                    p_cf_type =>${@cf_type},
                                                    p_invoice_number => ${@invoice_number},
                        							p_vat_invoice_code =>${@vat_invoice_code},
                        							p_tax_registry_num =>${@tax_registry_num},
                        							p_bp_tax_registry_num =>${@bp_tax_registry_num},
                        							p_total_amount =>${@total_amount},
                        							p_tax_amount =>${@tax_amount},
                       							    p_invoice_date =>to_date(${@invoice_date},'yyyy-mm-dd'),
                                                    p_user_id =>${/session/@user_id});
                end;]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="invoice_hd_id"/>
                <bm:parameter inputPath="/session/@company_id"/>
                <bm:parameter name="contract_id"/>
                <bm:parameter name="project_id"/>
                <bm:parameter name="division"/>
                <bm:parameter name="bp_id"/>
                <bm:parameter name="bp_name"/>
                <bm:parameter name="owner_user_id"/>
                <bm:parameter name="cashflow_id"/>
                <bm:parameter name="cf_item"/>
                <bm:parameter name="cf_type"/>
                <bm:parameter inputPath="/session/@user_id"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
</bm:model>
