<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-7-15 下午05:16:39  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:c="leaf.application.action" xmlns:s="leaf.plugin.script" xmlns:w="leaf.plugin.export.word" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" customizationEnabled="true" trace="true">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="guid_file_name_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.con_contract_basic_clause_print" rootPath="con_basic_clause_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.con_contract_update_print" rootPath="contract_path"/>
        <a:model-query defaultWhereClause="cf_direction = &apos;OUTFLOW&apos; and cf_item =0 and cf_type=0" fetchAll="true" model="cont.CON500.con_contract_cashflow_for_print" queryOrderBy="times" rootPath="contract_cashflow_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.con_contract_payment_terms_for_print" rootPath="contract_payment_terms_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.con_contract_lease_item_lv" rootPath="contract_lease_item_path"/>
        <a:model-query defaultWhereClause="lease_item_id = ${/model/contract_lease_item_path/record/@lease_item_id}" fetchAll="true" model="cont.CON500.hls_lease_item_list_for_print" rootPath="contract_lease_item_list_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.con_contract_content_number" rootPath="contract_content_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.hls_fin_calculator_hd_for_print" rootPath="hls_fin_calculator_path"/>
        <a:model-query fetchAll="true" model="hls.HLS211.hls_bp_master_bank_account" rootPath="con_contract_bp_path"/>
        <a:model-query defaultWhereClause="calc_session_id = ${/model/hls_fin_calculator_path/record/@calc_session_id} and lease_mgt_fee is not null" fetchAll="true" model="cont.CON500.hls_fin_calculator_ln_for_print" rootPath="hls_fin_calculator_ln_path"/>
        <a:model-query defaultWhereClause="calc_session_id = ${/model/hls_fin_calculator_path/record/@calc_session_id} and ln_user_col_n03 is not null" fetchAll="true" model="cont.CON500.hls_fin_calculator_ln_for_print" queryOrderBy="times" rootPath="hls_fin_calculator_ln_col_n03_path"/>
        <a:model-query defaultWhereClause="calc_session_id = ${/model/hls_fin_calculator_path/record/@calc_session_id} and t1.times &gt;=1" fetchAll="true" model="cont.CON500.hls_fin_calculator_ln_for_print" rootPath="hls_fin_calculator_ln_tental_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.hls_bp_master_all_data_v_for_print" rootPath="hls_bp_master_path"/>
        <a:model-query defaultWhereClause="bp_id = ${@bp_id}" fetchAll="true" model="cont.CON500.hls_bp_master_address_for_print" queryOrderBy="DECODE(address_type,&apos;DEFAULT_ADDRESS&apos;,0,length(address_type)) desc" rootPath="hls_bp_master_address_path"/>
        <a:model-query defaultWhereClause="bp_id =${/model/contract_path/record/@bp_id_tenant}" fetchAll="true" model="cont.CON500.hls_bp_master_address_for_print" queryOrderBy="address_type desc" rootPath="hls_t_bp_master_address_path"/>
        <a:model-query defaultWhereClause="bp_id =${/model/contract_lease_item_path/record/@vender_id}" fetchAll="true" model="cont.CON500.hls_bp_master_address_for_print" queryOrderBy="address_type desc" rootPath="hls_v_bp_master_address_path"/>
        <a:model-query defaultWhereClause="bp_id = ${@bp_id} " fetchAll="true" model="cont.CON500.hls_bp_master_contact_info_for_print" rootPath="bp_master_contact_info_path"/>
        <a:model-query defaultWhereClause="bp_id =${/model/contract_path/record/@bp_id_tenant}" fetchAll="true" model="cont.CON500.hls_bp_master_contact_info_for_print" rootPath="t_bp_master_contact_info_path"/>
        <a:model-query defaultWhereClause="bp_id =${/model/contract_lease_item_path/record/@vender_id}" fetchAll="true" model="cont.CON500.hls_bp_master_contact_info_for_print" rootPath="v_bp_master_contact_info_path"/>
        <a:model-query defaultWhereClause="bp_id = ${@bp_id} and ref_v01=&apos;Y&apos;" fetchAll="true" model="cont.CON500.hls_bp_master_contact_info_for_print" rootPath="bp_master_contact_info_ref_v01_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.prj_project_act_ctrler_in_i" rootPath="prj_project_act_ctrler_in_i_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.prj_project_act_ctrler_in_g" rootPath="prj_project_act_ctrler_in_g_path"/>
        <a:model-query fetchAll="true" model="cont.CON500.prj_project_act_ctrler_in_h" rootPath="prj_project_act_ctrler_in_h_path"/>
        <a:model-query model="cont.CON500.con_contract_rent_payment_hd_print" rootPath="contract_hd_rp"/>
        <a:model-query model="cont.CON500.con_contract_rent_payment_ln_print" rootPath="contract_cashflow_rp"/>
        <a:model-query fetchAll="true" model="cont.CON500.con_contract_lease_item_list_print" rootPath="con_lease_list_rp"/>
        <a:model-query defaultWhereClause="t1.contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON500.con_contract_print" rootPath="con_contract_rp"/>
        <a:model-query fetchAll="true" model="hls.HLS211.hls_bp_master" rootPath="bp_master_detail"/>
        <a:model-query model="cont.CON500.con_content_header" rootPath="content_header"/>
        <a:model-query defaultWhereClause="t1.mortgage_id=${/parameter/@mortgage_id} and t1.contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON500.prj_project_mortgage_print" rootPath="mortgage_detail"/>
        <w:word-export name="${/model/guid_file_name_path/record/@guid_file_name}" savePath="${/parameter/@file_path}" template="leaf.plugin.export.word/${/parameter/@templt_name}">
            <w:replaces>
                <w:replace name="content_number" path="/model/content_header/record/@content_number"/>
                <w:replace name="version_date" path="/model/content_header/record/@version_date"/>
                <w:replace name="couple_guarantee_flag" path="/parameter/@couple_guarantee_flag"/>
                <w:replace name="fin_content_number" path="/model/contract_path/record/@fin_content_number"/>
                <w:replace name="purchase_order_no" path="/model/contract_path/record/@purchase_order_no"/>
                <w:replace name="pur_ord_no" path="/model/contract_path/record/@pur_ord_no"/>
                <w:replace name="bp_name" path="/model/contract_path/record/@bp_name"/>
                <w:replace name="bp_name_sp" path="/model/contract_path/record/@bp_name_sp"/>
                <w:replace name="mobil_phone" path="/model/contract_path/record/@mobil_phone"/>
                <w:replace name="default_address" path="/model/contract_path/record/@default_address"/>
                <w:replace name="main_agency_address" path="/model/contract_path/record/@main_agency_address"/>
                <w:replace name="full_name" path="/model/contract_path/record/@full_name"/>
                <w:replace name="lease_item_amount" path="/model/contract_path/record/@lease_item_amount"/>
                <w:replace name="lease_item_amount_rmb" path="/model/contract_path/record/@lease_item_amount_rmb"/>
                <w:replace name="pay_times" path="/model/contract_path/record/@pay_times"/>
                <w:replace name="lease_term" path="/model/hls_fin_calculator_path/record/@lease_term"/>
                <w:replace name="lease_times" path="/model/hls_fin_calculator_path/record/@lease_times"/>
                <w:replace name="annual_pay_times_n" path="/model/hls_fin_calculator_path/record/@annual_pay_times_n"/>
                <w:replace name="finance_amount" path="/model/hls_fin_calculator_path/record/@finance_amount"/>
                <w:replace name="finance_amount_rmb" path="/model/hls_fin_calculator_path/record/@finance_amount_rmb"/>
                <w:replace name="deposit_ratio_n" path="/model/hls_fin_calculator_path/record/@deposit_ratio_n"/>
                <w:replace name="deposit" path="/model/hls_fin_calculator_path/record/@deposit"/>
                <w:replace name="deposit_rmb" path="/model/hls_fin_calculator_path/record/@deposit_rmb"/>
                <w:replace name="currency_n" path="/model/hls_fin_calculator_path/record/@currency_n"/>
                <w:replace name="currency_symbol" path="/model/hls_fin_calculator_path/record/@currency_symbol"/>
                <w:replace name="deposit_deduction_n" path="/model/hls_fin_calculator_path/record/@deposit_deduction_n"/>
                <w:replace name="pay_type_n" path="/model/hls_fin_calculator_path/record/@pay_type_n"/>
                <w:replace name="lease_charge" path="/model/hls_fin_calculator_path/record/@lease_charge"/>
                <w:replace name="lease_mgt_fee" path="/model/hls_fin_calculator_path/record/@lease_mgt_fee"/>
                <w:replace name="total_rental" path="/model/hls_fin_calculator_path/record/@total_rental"/>
                <w:replace name="notarial_fee" path="/model/hls_fin_calculator_path/record/@notarial_fee"/>
                <w:replace name="residual_value" path="/model/hls_fin_calculator_path/record/@residual_value"/>
                <w:replace name="lease_start_date" path="/model/hls_fin_calculator_path/record/@lease_start_date"/>
                <w:replace name="lease_mgt_fee_times" path="/model/hls_fin_calculator_path/record/@lease_mgt_fee_times"/>
                <w:replace name="lease_mgt_fee_first_time" path="/model/hls_fin_calculator_path/record/@lease_mgt_fee_first_time"/>
                <w:replace name="lease_mgt_fee_first_time_rate" path="/model/hls_fin_calculator_path/record/@lease_mgt_fee_first_time_rate"/>
                <w:replace name="invoice_title" path="/model/hls_bp_master_path/record/@invoice_title"/>
                <w:replace name="tax_registry_num" path="/model/hls_bp_master_path/record/@tax_registry_num"/>
                <w:replace name="invoice_bp_address_phone_num" path="/model/hls_bp_master_path/record/@invoice_bp_address_phone_num"/>
                <w:replace name="invoice_bp_bank_account" path="/model/hls_bp_master_path/record/@invoice_bp_bank_account"/>
                <w:replace name="lease_item_id_n" path="/model/contract_lease_item_path/record/@lease_item_id_n"/>
            </w:replaces>
            <w:sectLists>
                <w:sectList id="con_basic_clause" model="/model/con_basic_clause_path"/>
            </w:sectLists>
        </w:word-export>
        <s:server-script import="contract_print_path.js"><![CDATA[
            print_insert_fnd_atm('doc');
        ]]></s:server-script>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
		    window.close();
		    ]]></script>
    </a:view>
</a:screen>
