<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.document_category=&apos;CONTRACT&apos;" fetchAll="true"
                       model="basic.hls_document_type_for_lov" rootPath="con501_document_type_path"/>
        <a:model-query defaultWhereClause="document_category=&apos;CONTRACT&apos;" fetchAll="true"
                       model="basic.hls_document_type_v_lov" rootPath="contract_type_list"/>
        <a:model-query defaultWhereClause="t1.enabled_flag = &apos;Y&apos;" model="prj.PRJ505.con_billing_method"
                       rootPath="billing_method_list"/>
        <a:model-query fetchAll="true" model="basic.hls_lease_channel_for_lov" rootPath="acr510_lease_list"/>
        <a:model-query fetchAll="true" defaultWhereClause="t1.business_type in ('LEASE','LEASEBACK')" model="basic.hls_business_type_for_lov" rootPath="acr510_business_list"/>
    </a:init-procedure>
    <a:view>
        <!-- <a:screen-include screen="${/request/@context_path}/modules/hls/hls_common_javascript.lview"/>-->

        <a:link id="pageLink_select_cashflow"
                url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_select_cashflow.lview"/>
        <!-- <a:link id="pageLink_conditionScreen_welcome" url="${/request/@context_path}/welcome.lview"/> -->
        <a:link id="pageLink_invoice_create"
                url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_create_invoice.lview"/>
        <a:link id="svcLink_save_selected"
                url="${/request/@context_path}/modules/acr/ACR510N/acr_invoice_save_selected_n.lsc"/>
        <script type="text/javascript"><![CDATA[
        //校验函数,开票头信息不能为空。
        function validate_contractDs(record, name, value) {
            if (name == 'object_tax_registry_num' || name == 'invoice_bp_address_phone_num' || name == 'invoice_bp_bank_account' || name == 'invoice_title') {
                if (Ext.isEmpty(value)) {
                    if (record.get('bill_object_bp_class') == 'NP' || record.get('small_scale_taxpayer') != 'Y' || record.get('tax_type_vat') != 'Y') {
                        if (record.get('bill_object_bp_class') == 'ORG') {
                            if (name == 'object_tax_registry_num' || name == 'invoice_title')
                                return '必输字段不能为空!';
                        }
                        return true;
                    } else {
                        return '必输字段不能为空!';
                    }
                }
                return true;
            }
            return true;
        }

        function render_contractDs_grid(value, record, name) {
            if (name == 'billing_object_name') {
                record.getField('billing_object_name').setLovPara('contract_id', record.get('contract_id'));
            }
            return value;
        }

        function contractDs_grid_query() {
            $('condition_queryForm').close();
            $('ar510n_cashflow_ds').query();
        }

        function contractDs_grid_add() {
            $('contractDs_grid').showEditorByRecord($('ar510n_cashflow_ds').create());
        }

        function invoiceHd_close() {
            $('acr_invoice_select_cashflow').close();
        }

        function contractDs_grid_clear() {
            $('contractDs_grid').clear();
        }

        function allConditionDs_reset() {
            $('allConditionDs').reset();
        }

        function cashflowDs_grid_clear() {
            $('cashflowDs_grid').clear();
        }

        function winOpen_invoice_create() {
            var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
            var group_billing_method;
            if (final_bill_flag == 'Y') {
                group_billing_method = 'GROUP_BY_CONTRACT';
            } else {
                group_billing_method = 'GROUP_BY_TIMES';
            }
            var win = new Leaf.Window({
                id: 'acr_invoice_create_invoice',
                url: $('pageLink_invoice_create').getUrl(),
                params: {
                    company_id: '${/session/@company_id}',
                    group_billing_method: group_billing_method
                },
                title: '${l:ACR510.WIN_TITLE.CREATE}',
                fullScreen: true
            });

            win.on('close', function () {
                contractDs_grid_query();
            });
        }

        function invoiceHd_confirm() {
            winMask();
            var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
            var cat_ini_flag = $('allConditionDs').getAt(0).get('cat_ini_flag');
            var ds = $('ar510n_cashflow_ds');
            if (!ds.validate(true)) {
                winNoMask();
                return;
            }
            if (ds.getSelected().length == 0) {
                winNoMask();
                return;
            }
            var datas = ds.getJsonData(true);
            for (var i = 0; i < datas.length; i++) {
                datas[i].final_bill_flag = final_bill_flag;
                datas[i].cat_ini_flag = cat_ini_flag;

            }

                Leaf.request({
                    url: $('svcLink_save_selected').getUrl(),
                    para: datas,
                    success: function (res) {
                        winNoMask();
                        winOpen_invoice_create();
                    },
                    failure: function () {
                        winNoMask();
                    },
                    error: function () {
                        winNoMask();
                    },
                    scope: this
                });

        }

        function acr510n_query_update(ds, record, name, value, oldvalue) {
            if (name == 'times_bill_flag' || name == 'mid_bill_flag' || name == 'final_bill_flag' || name == 'et_bill_flag') {
                var times_bill_flag = record.get('times_bill_flag');
                var mid_bill_flag = record.get('mid_bill_flag');
                var final_bill_flag = record.get('final_bill_flag');
                var et_bill_flag = record.get('et_bill_flag');
                if (times_bill_flag || mid_bill_flag || final_bill_flag || et_bill_flag) {
                    record.set('bill_flag', 'Y');
                } else {
                    record.set('bill_flag', null);
                }
            }
            if (name == 'times_bill_flag' || name == 'mid_bill_flag' || name == 'final_bill_flag' || name == 'et_bill_flag') {
                contractDs_grid_query();
            }
        }

        function acr510n_excel() {
            $('contractDs_grid_forexport')._export('xls', 'excel_report');
        }

        function winNoMask() {
            Leaf.Masker.unmask(Ext.getBody());

        }

        function winMask() {
            Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
        }

        ]]></script>
        <a:dataSets>
            <a:dataSet id="acr510_document_type_name_ds">
                <a:datas dataSource="/model/con501_document_type_path"/>
            </a:dataSet>
            <a:dataSet id="contractTypeDs">
                <a:datas dataSource="/model/contract_type_list"/>
            </a:dataSet>
            <a:dataSet id="billingMethodDs">
                <a:datas dataSource="/model/billing_method_list"/>
            </a:dataSet>
            <a:dataSet id="acr515_lease_channel_ds">
                <a:datas dataSource="/model/acr510_lease_list"/>
            </a:dataSet>
            <a:dataSet id="acr515_business_type_ds">
                <a:datas dataSource="/model/acr510_business_list"/>
            </a:dataSet>
            <a:dataSet id="division_name_ds" loadData="true" model="basic.hls_division_for_lov"/>
            <a:dataSet id="billing_frequency_name_ds" lookupCode="DS_INVOICE_FREQUENCY"/>
            <a:dataSet id="billing_way_ds" lookupCode="DS_INVOICE_CATEGORY"/>
            <a:dataSet id="bp_class_desc_ds" lookupCode="HLS211_BP_CLASS"/>
            <a:dataSet id="con_contract_desc_ds" lookupCode="CON390_CONTRACT_STATUS"/>
            <a:dataSet id="allConditionDs" autoCreate="true">
                <a:fields>
                    <a:field name="billing_way_n" displayField="code_value_name" options="billing_way_ds" returnField="billing_way" valueField="code_value"/>
                    <a:field name="bill_object_bp_class_desc" displayField="code_value_name" options="bp_class_desc_ds" returnField="bill_object_bp_class" valueField="code_value"/>
                    <a:field name="contract_status_desc" displayField="code_value_name" options="con_contract_desc_ds" returnField="contract_status" valueField="code_value"/>

                    <a:field name="lease_channel_desc" displayField="description" options="acr515_lease_channel_ds"
                             returnField="lease_channel" valueField="lease_channel"/>

                    <a:field name="business_type_desc" displayField="description" options="acr515_business_type_ds"
                             returnField="business_type" valueField="business_type"/>
                    <a:field name="residue_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
                    <a:field name="cat_ini_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
                    <a:field name="project_number_from" lovGridHeight="300" lovHeight="450"
                             lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500"
                             title="ACR510.FIELD.PROJECT_NUMBER_FROM">
                        <a:mapping>
                            <a:map from="project_number" to="project_number_from"/>
                            <a:map from="project_name" to="project_name_from"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="project_number_to" lovGridHeight="300" lovHeight="450"
                             lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500"
                             title="ACR510.FIELD.PROJECT_NUMBER_TO">
                        <a:mapping>
                            <a:map from="project_number" to="project_number_to"/>
                            <a:map from="project_name" to="project_name_to"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="project_name_from" readOnly="true"/>
                    <a:field name="project_name_to" readOnly="true"/>
                    <a:field name="contract_number_from" lovGridHeight="300" lovHeight="500"
                             lovService="basic.con_contract_for_lov" lovWidth="800"
                             title="ACR510.FIELD.CONTRACT_NUMBER_FROM">
                        <a:mapping>
                            <a:map from="contract_number" to="contract_number_from"/>
                            <a:map from="contract_name" to="contract_name_from"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="contract_number" lovGridHeight="300" lovHeight="500"
                             lovService="basic.con_contract_for_lov" lovWidth="800"
                             title="ACR510.FIELD.CONTRACT_NUMBER_TO">
                        <a:mapping>
                            <a:map from="contract_number" to="contract_number"/>
                            <a:map from="contract_number" to="contract_number"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="contract_name_from" readOnly="true"/>
                    <a:field name="contract_name_to" readOnly="true"/>
                    <a:field name="bp_code_tenant_from" lovGridHeight="300" lovHeight="450" lovLabelWidth="100"
                             lovService="basic.hls_bp_master_v_for_lov" lovWidth="600"
                             title="ACR510.FIELD.BP_CODE_TENANT_FROM">
                        <a:mapping>
                            <a:map from="bp_code" to="bp_code_tenant_from"/>
                            <a:map from="bp_name" to="bp_name_tenant_from"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_code_tenant_to" lovGridHeight="300" lovHeight="450" lovLabelWidth="100"
                             lovService="basic.hls_bp_master_v_for_lov" lovWidth="600"
                             title="ACR510.FIELD.BP_CODE_TENANT_TO">
                        <a:mapping>
                            <a:map from="bp_code" to="bp_code_tenant_to"/>
                            <a:map from="bp_name" to="bp_name_tenant_to"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_name_tenant_from" readOnly="true"/>
                    <a:field name="bp_name_tenant_to" readOnly="true"/>
                    <a:field name="inception_of_lease_from"/>
                    <a:field name="inception_of_lease_to"/>
                    <a:field name="last_received_date_from"/>
                    <a:field name="last_received_date_to"/>
                    <a:field name="termination_date_from"/>
                    <a:field name="termination_date_to"/>
                    <a:field name="document_type"/>
                    <a:field name="document_type_desc" displayField="document_type_desc" options="contractTypeDs">
                        <a:mapping>
                            <a:map from="document_type" to="document_type"/>
                            <a:map from="document_type_desc" to="document_type_desc"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="cf_item"/>
                    <a:field name="cf_item_desc" lovGridHeight="300" lovHeight="500"
                             lovService="hls.HLS005.hls_cashflow_item_v_lov" lovWidth="850"
                             title="ACR510.ACR_INVOICE_CONTRACT_CF_V.CF_ITEM_DESC">
                        <a:mapping>
                            <a:map from="cf_item" to="cf_item"/>
                            <a:map from="cf_item_desc" to="cf_item_desc"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="billing_method"/>
                    <a:field name="billing_method_desc" displayField="description" options="billingMethodDs"
                             returnField="billing_method" valueField="billing_method"/>
                    <a:field name="document_type_desc"/>
                    <a:field name="lease_start_date_from"/>
                    <a:field name="lease_start_date_to"/>
                    <a:field name="contract_name"/>
                    <a:field name="project_name"/>
                    <a:field name="bp_name"/>
                    <a:field name="prj_search_term_1"/>
                    <a:field name="con_search_term_1"/>
                    <a:field name="prj_search_term_2"/>
                    <a:field name="con_search_term_2"/>
                    <a:field name="part_bill_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
                    <a:field name="document_type_desc" displayField="description" options="acr510_document_type_name_ds"
                             returnField="document_type" valueField="document_type"/>
                    <a:field name="final_bill_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
                    <a:field name="division_desc" displayField="description" options="division_name_ds"
                             returnField="division" valueField="division"/>
                    <a:field name="billing_frequency"/>
                    <a:field name="billing_frequency_n" displayField="code_value_name"
                             options="billing_frequency_name_ds"
                             returnField="billing_frequency" valueField="code_value"/>
                    <a:field name="times_bill_flag" checkedValue="10" uncheckedValue=""/>
                    <a:field name="mid_bill_flag" checkedValue="30" uncheckedValue=""/>
                    <a:field name="final_bill_flag" checkedValue="40" uncheckedValue=""/>
                    <a:field name="et_bill_flag" checkedValue="20" uncheckedValue=""/>
                    <a:field name="notbilling_amount_from" defaultValue="0.01"/>
                    <a:field name="__async__" defaultValue="Y" prompt="异步导出"/>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="acr510n_query_update"/>
                </a:events>
            </a:dataSet>
            <a:dataSet id="ar510n_cashflow_ds" autoPageSize="true" autoQuery="true" fetchAll="false"
                       model="acr.ACR510N.acr_inovice_cf_v_n" queryDataSet="allConditionDs" selectable="true">
                <a:fields>
                    <a:field name="invoice_title" required="true" prompt="发票抬头"/>
                    <a:field name="object_tax_registry_num" prompt="纳税人识别号" validator="validate_contractDs"/>
                    <a:field name="invoice_bp_address_phone_num" prompt="开票地址电话" validator="validate_contractDs"/>
                    <a:field name="invoice_bp_bank_account" prompt="开户行及账号" validator="validate_contractDs"/>

                    <a:field name="billing_object_name" lovGridHeight="300" lovHeight="450" lovLabelWidth="100"
                             lovService="acr.ACR510.acr_invoice_billing_object_lov" lovWidth="650" required="true"
                             title="ACR510.ACR_INVOICE_CONTRACT_V.BILLING_OBJECT_NAME">
                        <a:mapping>
                            <a:map from="bp_id" to="billing_object_id"/>
                            <a:map from="bp_name" to="billing_object_name"/>
                            <a:map from="invoice_title" to="invoice_title"/>
                            <a:map from="invoice_bp_address_phone_num" to="invoice_bp_address_phone_num"/>
                            <a:map from="invoice_bp_bank_account" to="invoice_bp_bank_account"/>
                            <a:map from="taxpayer_type" to="object_taxpayer_type"/>
                            <a:map from="taxpayer_type_desc" to="object_taxpayer_type_desc"/>
                            <a:map from="tax_registry_num" to="object_tax_registry_num"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="__async__" defaultValue="Y" prompt="异步导出"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="contractDs_grid_query" text="HLS.QUERY"/>
                <a:gridButton click="allConditionDs_reset" text="重置"/>
<!--                <a:gridButton click="contractDs_grid_clear" text="ACR510.BUTTON.CLEAR_CONTRACT"/>-->
                <a:gridButton click="invoiceHd_confirm" text="继续"/>
                <!--<a:gridButton click="acr510n_excel" text="导出"/>-->
            </a:screenTopToolbar>
            <a:queryForm id="condition_queryForm" bindTarget="allConditionDs" createSearchButton="false"
                         resultTarget="contractDs">
                <a:formToolBar labelWidth="100">
                    <a:datePicker name="last_received_date_from" bindTarget="allConditionDs"
                                  prompt="ACR.RECEIVED_DATE_FROM"/>
                    <a:datePicker name="last_received_date_to" bindTarget="allConditionDs"
                                  prompt="ACR.RECEIVED_DATE_TO"/>
                    <a:checkBox name="times_bill_flag" bindTarget="allConditionDs" prompt="按期开票"/>
                    <a:checkBox name="mid_bill_flag" bindTarget="allConditionDs" prompt="年中开票"/>
                    <a:checkBox name="final_bill_flag" bindTarget="allConditionDs" prompt="年末开票"/>
                    <a:checkBox name="et_bill_flag" bindTarget="allConditionDs" prompt="结清开票"/>
                </a:formToolBar>
                <a:formBody>
                    <a:hBox>
                        <!-- <a:comboBox name="billing_method_desc" bindTarget="allConditionDs" prompt="HLS.BILLING_RULE"/>-->
                        <a:comboBox name="division_desc" bindTarget="allConditionDs" prompt="产品线"/>
                        <a:lov name="contract_number" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER"/>
                        <a:datePicker name="lease_start_date_from" bindTarget="allConditionDs"
                                      prompt="HLS.LEASE_START_DATE_FROM"/>
                        <a:datePicker name="lease_start_date_to" bindTarget="allConditionDs"
                                      prompt="HLS.LEASE_START_DATE_TO"/>
                        <!-- <a:textField name="contract_name" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NAME"/>-->

                    </a:hBox>
                    <a:hBox>
                        <a:comboBox name="lease_channel_desc" bindTarget="allConditionDs" prompt="业务类型"/>
                        <a:textField name="bp_name" bindTarget="allConditionDs" prompt="HLS.TENANT_NAME"/>
                        <!--<a:comboBox name="document_type_desc" bindTarget="allConditionDs" prompt="HLS.CONTRACT_TYPE"/>-->
                        <a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/>
                        <a:comboBox name="billing_way_n" bindTarget="allConditionDs" prompt="开票方式"/>
                    </a:hBox>

                    <a:hBox>
                        <a:numberField name="notreceived_amount_from" allowDecimals="true" decimalPrecision="2" bindTarget="allConditionDs" prompt="未收金额从"/>

                        <a:numberField name="notreceived_amount_to" allowDecimals="true" decimalPrecision="2" bindTarget="allConditionDs"
                                       prompt="未收金额到"/>
                        <a:numberField name="notbilling_amount_from" allowDecimals="true" decimalPrecision="2" bindTarget="allConditionDs" prompt="未开金额从"/>

                        <a:numberField name="notbilling_amount_to" allowDecimals="true" decimalPrecision="2" bindTarget="allConditionDs"
                                       prompt="未开金额到"/>

                    </a:hBox>
                    <a:hBox>
                        <a:textField name="inv_billing_object_name" bindTarget="allConditionDs" prompt="代理商"/>
                        <a:comboBox name="business_type_desc" bindTarget="allConditionDs" prompt="业务类型"/>
                        <a:datePicker name="due_date_from" bindTarget="allConditionDs"
                                      prompt="到期日从"/>
                        <a:datePicker name="due_date_to" bindTarget="allConditionDs"
                                      prompt="到期日到"/>
                    </a:hBox>
                    <a:hBox>
                        <a:comboBox name="bill_object_bp_class_desc" bindTarget="allConditionDs" prompt="客户类型"/>
                        <a:comboBox name="contract_status_desc" bindTarget="allConditionDs" prompt="合同状态"/>
                    </a:hBox>
                    <a:hBox>
                        <a:textArea name="all_contract_number" width="840" bindTarget="allConditionDs" prompt="合同号"/>
                    </a:hBox>
                </a:formBody>
            </a:queryForm>
            <a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="30">
                <a:tabs>
                    <a:tab prompt="开票信息" width="120">
                        <a:grid id="contractDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="210"
                                marginWidth="70"
                                navBar="true">
                            <a:toolBar>
                                <a:button type="excel"/>
                            </a:toolBar>
                            <a:columns>
                                <a:column name="contract_number" lock="true" width="150" prompt="合同编号"/>
                                <a:column name="contract_name" lock="true" width="150" prompt="合同名称"/>
                                <a:column name="inv_billing_object_name" prompt="代理店"/>
                                <a:column name="business_type_desc" prompt="业务类型"/>
                                <a:column name="division_desc" prompt="产品线"/>
                                <a:column name="times" align="right" lock="true" width="40" prompt="期数"/>
                                <a:column name="cf_item_desc" prompt="应收项目"/>
                                <a:column name="due_date" renderer="Leaf.formatDate" prompt="到期日"/>
                                <a:column name="last_received_date" renderer="Leaf.formatDate" prompt="收款日期"/>
                                <a:column name="due_amount" align="right" renderer="Leaf.formatMoney" prompt="应收金额"/>
                                <a:column name="principal" align="right" renderer="Leaf.formatMoney" prompt="本金"/>
                                <a:column name="interest" align="right" renderer="Leaf.formatMoney" prompt="利息"/>
                                <a:column name="received_amount" align="right" renderer="Leaf.formatMoney" prompt="已收金额"/>
                                <a:column name="received_principal" align="right" renderer="Leaf.formatMoney" prompt="已收本金"/>
                                <a:column name="received_interest" align="right" renderer="Leaf.formatMoney" prompt="已收利息"/>
                                <a:column name="notreceived_amount" align="right" renderer="Leaf.formatMoney" prompt="未收金额"/>
                                <a:column name="notreceived_principal" align="right" renderer="Leaf.formatMoney" prompt="未收本金"/>
                                <a:column name="notreceived_interest" align="right" renderer="Leaf.formatMoney" prompt="未收利息"/>
                                <a:column name="billing_amount" align="right" prompt="已开票金额"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="billing_principal" align="right" prompt="已开票本金"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="billing_interest" align="right" prompt="已开票利息"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="notbilling_amount" align="right" prompt="未开票金额"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="notbilling_principal" align="right" prompt="未开票本金"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="notbilling_interest" align="right" prompt="未开票利息"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="interest" align="right" renderer="Leaf.formatMoney" prompt="利息"/>
                            </a:columns>
                            <a:editors>
                                <a:lov id="contractDs_grid_editor_lov"/>
                                <a:textField id="contractDs_grid_editor_tf"/>
                            </a:editors>
                        </a:grid>
                    </a:tab>
                    <a:tab prompt="抬头信息" width="120">
                        <a:grid id="acr510n_cashflowds_grid" bindTarget="ar510n_cashflow_ds" marginHeight="210"
                                marginWidth="70" navBar="true">
                            <a:toolBar>
                                <a:button type="excel"/>
                            </a:toolBar>
                            <a:columns>
                                <a:column name="contract_number" lock="true" width="150" prompt="合同编号"/>
                                <a:column name="contract_name" lock="true" width="150" prompt="合同名称"/>
                                <a:column name="bp_name" prompt="承租人名称"/>
                                <a:column name="contract_status_desc" width="80" prompt="合同状态"/>
                                <a:column name="billing_method_desc" prompt="开票规则"/>
                                <a:column name="billing_way_n" prompt="开票方式" width="80"/>
                                <a:column name="billing_frequency_n" prompt="开票频率" width="80"/>
                                <a:column name="billing_object_name" prompt="开票对象" autoAdjust="true"
                                          editor="acr510n_cashflowds_grid_editor_lov" renderer="render_contractDs_grid"
                                          showTitle="true" width="80"/>
                                <a:column name="invoice_title" prompt="发票抬头" autoAdjust="true" editor="acr510n_cashflowds_grid_editor_tf"
                                          showTitle="true" width="80"/>
                                <a:column name="object_taxpayer_type" prompt="纳税人类型"/>
                                <a:column name="object_tax_registry_num" prompt="纳税人识别号" width="150"
                                          editor="acr510n_cashflowds_grid_editor_tf"/>
                                <a:column name="invoice_bp_address_phone_num" prompt="开票地址电话" autoAdjust="false"
                                          editor="acr510n_cashflowds_grid_editor_tf" showTitle="true" width="200"/>
                                <a:column name="invoice_bp_bank_account" prompt="开户行及账号" autoAdjust="false"
                                          editor="acr510n_cashflowds_grid_editor_tf" showTitle="true" width="150"/>
                                <a:column name="description" prompt="备注" autoAdjust="false" editor="acr510n_cashflowds_grid_editor_tf"
                                          showTitle="true" width="200"/>
                            </a:columns>
                            <a:editors>
                                <a:lov id="acr510n_cashflowds_grid_editor_lov"/>
                                <a:textField id="acr510n_cashflowds_grid_editor_tf"/>
                            </a:editors>
                        </a:grid>
                    </a:tab>
                    <!--<a:tab prompt="导出" width="100">-->
                    <!--<a:grid id="contractDs_grid_forexport" bindTarget="ar510n_cashflow_ds" marginHeight="170"-->
                    <!--marginWidth="70" navBar="true">-->
                    <!--<a:toolBar>-->
                    <!--<a:button type="excel"/>-->
                    <!--</a:toolBar>-->
                    <!--<a:columns>-->
                    <!--<a:column name="contract_number" lock="true" prompt="合同编号" width="150"/>-->
                    <!--&lt;!&ndash; <a:column name="project_name" autoAdjust="false" lock="true" showTitle="true" width="200"/> &ndash;&gt;-->
                    <!--<a:column name="times" align="right" lock="true" width="40"/>-->
                    <!--&lt;!&ndash; <a:column name="serial_number" prompt="机编号" width="80"/>&ndash;&gt;-->
                    <!--<a:column name="cf_item_desc"/>-->
                    <!--<a:column name="due_amount"/>-->
                    <!--<a:column name="received_amount" align="right" renderer="Leaf.formatMoney"/>-->
                    <!--<a:column name="billing_amount" align="right" renderer="Leaf.formatMoney"/>-->
                    <!--<a:column name="need_bill_amount" align="right" prompt="应开票金额"-->
                    <!--renderer="Leaf.formatMoney"/>-->
                    <!--<a:column name="billing_object_name" autoAdjust="false" showTitle="true"-->
                    <!--width="200"/>-->
                    <!--<a:column name="invoice_title" autoAdjust="false" showTitle="true" width="200"/>-->
                    <!--<a:column name="object_tax_registry_num" width="150"/>-->
                    <!--</a:columns>-->
                    <!--</a:grid>-->
                    <!--</a:tab>-->
                </a:tabs>
            </a:tabPanel>
        </a:screenBody>
    </a:view>
</a:screen>