<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Darming  
    $Date: 2017-12-28 下午5:45:36  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
           

begin
  -- Call the procedure
  prj_quotation_pkg.insert_prj_quotation(p_quotation_id => ${@quotation_id},
                                         p_product_id => ${@product_id},
                                         p_hd_user_col_v01 => ${@hd_user_col_v01},
                                         p_commission_receivable => ${@commission_receivable},
                                         p_down_payment_ratio => ${@down_payment_ratio},
                                         p_other_fee => ${@other_fee},
                                         p_other_fee3 => ${@other_fee3},
                                         p_lease_charge_ratio =>${@lease_charge_ratio},
                                           p_lease_charge      => ${@lease_charge},
  									    	p_int_rate_display      => ${@btb_int_rate_implicit},
  									    	p_lease_item_amount   =>  ${@lease_item_amount},
  									    	p_deposit_ratio => ${@margin_ratio},
  									    	p_deposit      => ${@deposit},
                                            p_deposit_deduction      => ${@deposit_deduction},
  									    	p_hd_user_col_n14      => ${@hd_user_col_n14},
  									    	p_insurance_fee      => ${@insurance_fee},
  									    	p_hd_user_col_n05      => ${@hd_user_col_n05},
  									    	p_notarial_fee_payable      => ${@notarial_fee_payable},
  									    	p_btb_interest_margin      => ${@btb_interest_margin},
                                            p_lease_item_price_agent      => ${@lease_item_price_agent},
  									    	p_hd_user_col_n06      => ${@hd_user_col_n06},
  									    	p_btb_fee_after_tax      => ${@btb_fee_after_tax},
  									    	p_base_rate      => 0.06,
  									    	p_base_rate_type      => 'pboc',
                                         p_document_category => 'PROJECT',
                                         p_document_id => ${@project_id},
                                         p_calc_session_id => ${@calc_session_id},
                                         p_quotation_date => null,
                                         p_quotation_type => null,
                                         p_version => null,
                                         p_text => null,
                                         p_contract_seq => null,
                                         p_internal_confirm => null,
                                         p_external_confirm => null,
                                         p_enabled_flag => null,
                                         p_company_id => 1,
                                         p_create_contract_flag => null,
                                         p_currency_precision => null,
                                         p_finance_amount => null,
                                         p_currency => null,
                                          p_lease_start_date     => to_date(${@lease_start_date},
                                                                           'yyyy-mm-dd hh24:mi:ss'),
                                         p_price_list           => ${@price_list},
                                         p_lease_times          => ${@lease_times},
                                         p_annual_pay_times     => ${@annual_pay_times},
                                         
                                         p_down_payment         => null,
                                         p_business_type        => null,
                                         p_user_id              => ${@user_id},
                                         p_ref_v01              => null,
                                         p_ref_v02              => null,
                                         p_ref_v03              => null,
                                         p_ref_v04              => null,
                                         p_ref_v05              => null,
                                         p_ref_n01              => null,
                                         p_ref_n02              => null,
                                         p_ref_n03              => null,
                                         p_ref_n04              => null,
                                         p_ref_n05              => null,
                                         p_ref_d01              => null,
                                         p_ref_d02              => null,
                                         p_ref_d03              => null,
                                         p_ref_d04              => null,
                                         p_ref_d05              => null);
end;


]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="quotation_id" dataType="java.lang.Long" input="true" output="true" outputPath="@quotation_id"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
</bm:model>
