<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: zl $Date: 2016-3-29 下午03:23:03 $Revision: 1.0 $Purpose: 开票方式维护 --> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true"> <a:view> <script type="text/javascript"><![CDATA[ function hls_billing_method_edit_save() { var result_ds = $('hls_billing_method_edit_ds'); if (result_ds.validate()) { result_ds.submit(); } } function hls_billing_method_edit_return() { $('hls250_billing_method_edit_window').close(); $('hls_billing_method_list_ds').query(); } function hls250_cf_invoice_kind_editorFunction(record, name) { if(name=='invoice_kind_n') { if (record.get('invoice_kind_tp') == '20') { return 'hls250_edit_comboBox'; } return ''; } if(name=='tax_rate_n') { if (record.get('tax_rate_tp') == '20') { return 'hls250_edit_comboBox'; } return ''; } } function onUpdate_hls_billing_method_cf_edit_ds(ds, record, name, value, oldvalue) { if(name=='invoice_kind_tp') { if(value=='10') { record.set('invoice_kind', ''); record.set('invoice_kind_n', ''); record.getField('invoice_kind_n').setRequired(false); } if(value=='20') { record.getField('invoice_kind_n').setRequired(true); } } if(name=='tax_rate_tp') { if(value=='10') { record.set('tax_rate', ''); record.set('tax_rate_n', ''); record.getField('tax_rate_n').setRequired(false); } if(value=='20') { record.getField('tax_rate_n').setRequired(true); } } } function onLoad_hls_billing_method_edit_ds(ds) { var record=ds.getCurrentRecord(); if(record.get('equipment_invoice_kind_tp')=='10') { record.set('equipment_invoice_kind', ''); record.set('equipment_invoice_kind_n', ''); record.getField('equipment_invoice_kind_n').setRequired(false); record.getField('equipment_invoice_kind_n').setReadOnly(true); } if(record.get('equipment_invoice_kind_tp')=='20') { record.getField('equipment_invoice_kind_n').setRequired(true); record.getField('equipment_invoice_kind_n').setReadOnly(false); } if(record.get('equipment_tax_rate_tp')=='10') { record.set('equipment_tax_rate', ''); record.set('equipment_tax_rate_n', ''); record.getField('equipment_tax_rate_n').setRequired(false); record.getField('equipment_tax_rate_n').setReadOnly(true); } if(record.get('equipment_tax_rate_tp')=='20') { record.getField('equipment_tax_rate_n').setRequired(true); record.getField('equipment_tax_rate_n').setReadOnly(false); } // ----------------- if(record.get('rental_invoice_kind_tp')=='10') { record.set('rental_invoice_kind', ''); record.set('rental_invoice_kind_n', ''); record.getField('rental_invoice_kind_n').setRequired(false); record.getField('rental_invoice_kind_n').setReadOnly(true); } if(record.get('rental_invoice_kind_tp')=='20') { record.getField('rental_invoice_kind_n').setRequired(true); record.getField('rental_invoice_kind_n').setReadOnly(false); } if(record.get('rental_tax_rate_tp')=='10') { record.set('rental_tax_rate', ''); record.set('rental_tax_rate_n', ''); record.getField('rental_tax_rate_n').setRequired(false); record.getField('rental_tax_rate_n').setReadOnly(true); } if(record.get('rental_tax_rate_tp')=='20') { record.getField('rental_tax_rate_n').setRequired(true); record.getField('rental_tax_rate_n').setReadOnly(false); } // ----------------- if(record.get('principal_invoice_kind_tp')=='10') { record.set('principal_invoice_kind', ''); record.set('principal_invoice_kind_n', ''); record.getField('principal_invoice_kind_n').setRequired(false); record.getField('principal_invoice_kind_n').setReadOnly(true); } if(record.get('principal_invoice_kind_tp')=='20') { record.getField('principal_invoice_kind_n').setRequired(true); record.getField('principal_invoice_kind_n').setReadOnly(false); } if(record.get('principal_tax_rate_tp')=='10') { record.set('principal_tax_rate', ''); record.set('principal_tax_rate_n', ''); record.getField('principal_tax_rate_n').setRequired(false); record.getField('principal_tax_rate_n').setReadOnly(true); } if(record.get('principal_tax_rate_tp')=='20') { record.getField('principal_tax_rate_n').setRequired(true); record.getField('principal_tax_rate_n').setReadOnly(false); } // ----------------- if(record.get('interest_invoice_kind_tp')=='10') { record.set('interest_invoice_kind', ''); record.set('interest_invoice_kind_n', ''); record.getField('interest_invoice_kind_n').setRequired(false); record.getField('interest_invoice_kind_n').setReadOnly(true); } if(record.get('interest_invoice_kind_tp')=='20') { record.getField('interest_invoice_kind_n').setRequired(true); record.getField('interest_invoice_kind_n').setReadOnly(false); } if(record.get('interest_tax_rate_tp')=='10') { record.set('interest_tax_rate', ''); record.set('interest_tax_rate_n', ''); record.getField('interest_tax_rate_n').setRequired(false); record.getField('interest_tax_rate_n').setReadOnly(true); } if(record.get('interest_tax_rate_tp')=='20') { record.getField('interest_tax_rate_n').setRequired(true); record.getField('interest_tax_rate_n').setReadOnly(false); } // ----------------- if(record.get('other_invoice_kind_tp')=='10') { record.set('other_invoice_kind', ''); record.set('other_invoice_kind_n', ''); record.getField('other_invoice_kind_n').setRequired(false); record.getField('other_invoice_kind_n').setReadOnly(true); } if(record.get('other_invoice_kind_tp')=='20') { record.getField('other_invoice_kind_n').setRequired(true); record.getField('other_invoice_kind_n').setReadOnly(false); } if(record.get('other_tax_rate_tp')=='10') { record.set('other_tax_rate', ''); record.set('other_tax_rate_n', ''); record.getField('other_tax_rate_n').setRequired(false); record.getField('other_tax_rate_n').setReadOnly(true); } if(record.get('other_tax_rate_tp')=='20') { record.getField('other_tax_rate_n').setRequired(true); record.getField('other_tax_rate_n').setReadOnly(false); } // ----------------- } function onUpdate_hls_billing_method_edit_ds(ds, record, name, value, oldvalue) { if(name=='equipment_invoice_kind_tp') { if(value=='10') { record.set('equipment_invoice_kind', ''); record.set('equipment_invoice_kind_n', ''); record.getField('equipment_invoice_kind_n').setRequired(false); record.getField('equipment_invoice_kind_n').setReadOnly(true); } if(value=='20') { record.getField('equipment_invoice_kind_n').setRequired(true); record.getField('equipment_invoice_kind_n').setReadOnly(false); } } if(name=='equipment_tax_rate_tp') { if(value=='10') { record.set('equipment_tax_rate', ''); record.set('equipment_tax_rate_n', ''); record.getField('equipment_tax_rate_n').setRequired(false); record.getField('equipment_tax_rate_n').setReadOnly(true); } if(value=='20') { record.getField('equipment_tax_rate_n').setRequired(true); record.getField('equipment_tax_rate_n').setReadOnly(false); } } if(name=='rental_invoice_kind_tp') { if(value=='10') { record.set('rental_invoice_kind', ''); record.set('rental_invoice_kind_n', ''); record.getField('rental_invoice_kind_n').setRequired(false); record.getField('rental_invoice_kind_n').setReadOnly(true); } if(value=='20') { record.getField('rental_invoice_kind_n').setRequired(true); record.getField('rental_invoice_kind_n').setReadOnly(false); } } if(name=='rental_tax_rate_tp') { if(value=='10') { record.set('rental_tax_rate', ''); record.set('rental_tax_rate_n', ''); record.getField('rental_tax_rate_n').setRequired(false); record.getField('rental_tax_rate_n').setReadOnly(true); } if(value=='20') { record.getField('rental_tax_rate_n').setRequired(true); record.getField('rental_tax_rate_n').setReadOnly(false); } } if(name=='principal_invoice_kind_tp') { if(value=='10') { record.set('principal_invoice_kind', ''); record.set('principal_invoice_kind_n', ''); record.getField('principal_invoice_kind_n').setRequired(false); record.getField('principal_invoice_kind_n').setReadOnly(true); } if(value=='20') { record.getField('principal_invoice_kind_n').setRequired(true); record.getField('principal_invoice_kind_n').setReadOnly(false); } } if(name=='principal_tax_rate_tp') { if(value=='10') { record.set('principal_tax_rate', ''); record.set('principal_tax_rate_n', ''); record.getField('principal_tax_rate_n').setRequired(false); record.getField('principal_tax_rate_n').setReadOnly(true); } if(value=='20') { record.getField('principal_tax_rate_n').setRequired(true); record.getField('principal_tax_rate_n').setReadOnly(false); } } if(name=='interest_invoice_kind_tp') { if(value=='10') { record.set('interest_invoice_kind', ''); record.set('interest_invoice_kind_n', ''); record.getField('interest_invoice_kind_n').setRequired(false); record.getField('interest_invoice_kind_n').setReadOnly(true); } if(value=='20') { record.getField('interest_invoice_kind_n').setRequired(true); record.getField('interest_invoice_kind_n').setReadOnly(false); } } if(name=='interest_tax_rate_tp') { if(value=='10') { record.set('interest_tax_rate', ''); record.set('interest_tax_rate_n', ''); record.getField('interest_tax_rate_n').setRequired(false); record.getField('interest_tax_rate_n').setReadOnly(true); } if(value=='20') { record.getField('interest_tax_rate_n').setRequired(true); record.getField('interest_tax_rate_n').setReadOnly(false); } } if(name=='other_invoice_kind_tp') { if(value=='10') { record.set('other_invoice_kind', ''); record.set('other_invoice_kind_n', ''); record.getField('other_invoice_kind_n').setRequired(false); record.getField('other_invoice_kind_n').setReadOnly(true); } if(value=='20') { record.getField('other_invoice_kind_n').setRequired(true); record.getField('other_invoice_kind_n').setReadOnly(false); } } if(name=='other_tax_rate_tp') { if(value=='10') { record.set('other_tax_rate', ''); record.set('other_tax_rate_n', ''); record.getField('other_tax_rate_n').setRequired(false); record.getField('other_tax_rate_n').setReadOnly(true); } if(value=='20') { record.getField('other_tax_rate_n').setRequired(true); record.getField('other_tax_rate_n').setReadOnly(false); } } if(name=='rental_billing_flag') { if(value=='Y') { record.set('principal_billing_flag', 'N'); record.set('interest_billing_flag', 'N'); } } if(name=='principal_billing_flag') { if(value=='Y') { record.set('rental_billing_flag', 'N'); } } if(name=='interest_billing_flag') { if(value=='Y') { record.set('rental_billing_flag', 'N'); } } } ]]></script> <a:dataSets> <a:dataSet id="hls250_invoice_kind" lookupCode="ACR510_INVOICE_KIND"/> <a:dataSet id="hls250_invoice_kind_category" lookupCode="HLS250_INVOICE_KIND_CATEGORY"/> <a:dataSet id="hls250_tax_rate_category" lookupCode="HLS250_TAX_RATE_CATEGORY"/> <a:dataSet id="hls250_fnd_tax_type" autoQuery="true" fetchAll="true" model="fnd.FND2100.fnd_tax_type_codes"/> <a:dataSet id="hls_billing_method_edit_ds" autoQuery="true" model="hls.HLS250.hls_billing_method" queryUrl="${/request/@context_path}/autocrud/hls.HLS250.hls_billing_method/query?billing_method=${/parameter/@billing_method}" submitUrl="${/request/@context_path}/modules/hls/HLS250/hls_billing_method_edit.lsc"> <a:fields> <a:field name="billing_method" required="true"/> <a:field name="usage_type_n" displayField="code_value_name" options="billing_method_usage_type" required="true" returnField="usage_type" valueField="code_value"/> <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="equipment_billing_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="equipment_invoice_kind_tp_n" displayField="code_value_name" options="hls250_invoice_kind_category" returnField="equipment_invoice_kind_tp" valueField="code_value"/> <a:field name="equipment_invoice_kind_n" displayField="code_value_name" options="hls250_invoice_kind" returnField="equipment_invoice_kind" valueField="code_value"/> <a:field name="equipment_tax_rate_tp_n" displayField="code_value_name" options="hls250_tax_rate_category" returnField="equipment_tax_rate_tp" valueField="code_value"/> <a:field name="equipment_tax_rate_n" displayField="description" options="hls250_fnd_tax_type" returnField="equipment_tax_rate" valueField="tax_type_id"/> <a:field name="rental_billing_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="rental_invoice_kind_tp_n" displayField="code_value_name" options="hls250_invoice_kind_category" returnField="rental_invoice_kind_tp" valueField="code_value"/> <a:field name="rental_invoice_kind_n" displayField="code_value_name" options="hls250_invoice_kind" returnField="rental_invoice_kind" valueField="code_value"/> <a:field name="rental_tax_rate_tp_n" displayField="code_value_name" options="hls250_tax_rate_category" returnField="rental_tax_rate_tp" valueField="code_value"/> <a:field name="rental_tax_rate_n" displayField="description" options="hls250_fnd_tax_type" returnField="rental_tax_rate" valueField="tax_type_id"/> <a:field name="principal_billing_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="principal_invoice_kind_tp_n" displayField="code_value_name" options="hls250_invoice_kind_category" returnField="principal_invoice_kind_tp" valueField="code_value"/> <a:field name="principal_invoice_kind_n" displayField="code_value_name" options="hls250_invoice_kind" returnField="principal_invoice_kind" valueField="code_value"/> <a:field name="principal_tax_rate_tp_n" displayField="code_value_name" options="hls250_tax_rate_category" returnField="principal_tax_rate_tp" valueField="code_value"/> <a:field name="principal_tax_rate_n" displayField="description" options="hls250_fnd_tax_type" returnField="principal_tax_rate" valueField="tax_type_id"/> <a:field name="interest_billing_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="interest_invoice_kind_tp_n" displayField="code_value_name" options="hls250_invoice_kind_category" returnField="interest_invoice_kind_tp" valueField="code_value"/> <a:field name="interest_invoice_kind_n" displayField="code_value_name" options="hls250_invoice_kind" returnField="interest_invoice_kind" valueField="code_value"/> <a:field name="interest_tax_rate_tp_n" displayField="code_value_name" options="hls250_tax_rate_category" returnField="interest_tax_rate_tp" valueField="code_value"/> <a:field name="interest_tax_rate_n" displayField="description" options="hls250_fnd_tax_type" returnField="interest_tax_rate" valueField="tax_type_id"/> <a:field name="other_billing_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="other_invoice_kind_tp_n" displayField="code_value_name" options="hls250_invoice_kind_category" returnField="other_invoice_kind_tp" valueField="code_value"/> <a:field name="other_invoice_kind_n" displayField="code_value_name" options="hls250_invoice_kind" returnField="other_invoice_kind" valueField="code_value"/> <a:field name="other_tax_rate_tp_n" displayField="code_value_name" options="hls250_tax_rate_category" returnField="other_tax_rate_tp" valueField="code_value"/> <a:field name="other_tax_rate_n" displayField="description" options="hls250_fnd_tax_type" returnField="other_tax_rate" valueField="tax_type_id"/> <a:field name="average_split" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="bill_of_sale" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> </a:fields> <a:events> <a:event name="update" handler="onUpdate_hls_billing_method_edit_ds"/> <a:event name="load" handler="onLoad_hls_billing_method_edit_ds"/> </a:events> </a:dataSet> <a:dataSet id="hls_billing_method_cf_edit_ds" autoQuery="true" bindName="hls250_bind_ds" bindTarget="hls_billing_method_edit_ds" model="hls.HLS250.hls_billing_method_cf" queryUrl="${/request/@context_path}/autocrud/hls.HLS250.hls_billing_method_cf/query?billing_method=${/parameter/@billing_method}" selectable="true"> <a:fields> <a:field name="invoice_kind_tp_n" displayField="code_value_name" options="hls250_invoice_kind_category" returnField="invoice_kind_tp" valueField="code_value"/> <a:field name="invoice_kind_n" displayField="code_value_name" options="hls250_invoice_kind" returnField="invoice_kind" valueField="code_value"/> <a:field name="tax_rate_tp_n" displayField="code_value_name" options="hls250_tax_rate_category" returnField="tax_rate_tp" valueField="code_value"/> <a:field name="tax_rate_n" displayField="description" options="hls250_fnd_tax_type" returnField="tax_rate" valueField="tax_type_id"/> <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/> <a:field name="cf_item_n" required="true"/> <a:field name="billing_method" defaultValue="${/parameter/@billing_method}"/> <a:field name="cf_item_n" lovHeight="500" lovService="hls.HLS250.hls_billing_method_cf_for_lov" lovWidth="550" prompt="现金流项目" required="true" title="现金流项目"> <a:mapping> <a:map from="cf_item" to="cf_item"/> <a:map from="description" to="cf_item_n"/> </a:mapping> </a:field> </a:fields> <a:events> <a:event name="update" handler="onUpdate_hls_billing_method_cf_edit_ds"/> </a:events> </a:dataSet> </a:dataSets> <a:screenBody> <a:screenTopToolbar> <a:screenTitle/> <a:gridButton click="hls_billing_method_edit_save" text="保存"/> <a:gridButton click="hls_billing_method_edit_return" text="返回"/> </a:screenTopToolbar> <a:form bindTarget="hls_billing_method_edit_ds" column="4" labelWidth="120"> <a:textField name="billing_method" bindTarget="hls_billing_method_edit_ds" prompt="开票方式" readOnly="true"/> <a:textField name="description" bindTarget="hls_billing_method_edit_ds" prompt="描述"/> <a:comboBox name="usage_type_n" bindTarget="hls_billing_method_edit_ds" prompt="用途类型"/> <a:checkBox name="enabled_flag" bindTarget="hls_billing_method_edit_ds" prompt="启用标志"/> <a:checkBox name="equipment_billing_flag" bindTarget="hls_billing_method_edit_ds" prompt="设备开票标志"/> <a:comboBox name="equipment_invoice_kind_tp_n" bindTarget="hls_billing_method_edit_ds" prompt="设备发票种类方式"/> <a:comboBox name="equipment_invoice_kind_n" bindTarget="hls_billing_method_edit_ds" prompt="指定设备发票种类"/> <div/> <div/> <a:comboBox name="equipment_tax_rate_tp_n" bindTarget="hls_billing_method_edit_ds" prompt="设备发票税率方式"/> <a:comboBox name="equipment_tax_rate_n" bindTarget="hls_billing_method_edit_ds" prompt="指定设备发票税率"/> <div/> <a:checkBox name="rental_billing_flag" bindTarget="hls_billing_method_edit_ds" prompt="租金开票标志"/> <a:comboBox name="rental_invoice_kind_tp_n" bindTarget="hls_billing_method_edit_ds" prompt="租金发票种类方式"/> <a:comboBox name="rental_invoice_kind_n" bindTarget="hls_billing_method_edit_ds" prompt="指定租金发票种类"/> <div/> <div/> <a:comboBox name="rental_tax_rate_tp_n" bindTarget="hls_billing_method_edit_ds" prompt="租金发票税率方式"/> <a:comboBox name="rental_tax_rate_n" bindTarget="hls_billing_method_edit_ds" prompt="指定租金发票税率"/> <div/> <a:checkBox name="principal_billing_flag" bindTarget="hls_billing_method_edit_ds" prompt="本金开票标志"/> <a:comboBox name="principal_invoice_kind_tp_n" bindTarget="hls_billing_method_edit_ds" prompt="本金发票种类方式"/> <a:comboBox name="principal_invoice_kind_n" bindTarget="hls_billing_method_edit_ds" prompt="指定本金发票种类"/> <div/> <div/> <a:comboBox name="principal_tax_rate_tp_n" bindTarget="hls_billing_method_edit_ds" prompt="本金发票税率方式"/> <a:comboBox name="principal_tax_rate_n" bindTarget="hls_billing_method_edit_ds" prompt="指定本金发票税率"/> <div/> <a:checkBox name="interest_billing_flag" bindTarget="hls_billing_method_edit_ds" prompt="利息开票标志"/> <a:comboBox name="interest_invoice_kind_tp_n" bindTarget="hls_billing_method_edit_ds" prompt="利息发票种类方式"/> <a:comboBox name="interest_invoice_kind_n" bindTarget="hls_billing_method_edit_ds" prompt="指定利息发票种类"/> <div/> <div/> <a:comboBox name="interest_tax_rate_tp_n" bindTarget="hls_billing_method_edit_ds" prompt="利息发票税率方式"/> <a:comboBox name="interest_tax_rate_n" bindTarget="hls_billing_method_edit_ds" prompt="指定利息发票税率"/> <div/> <a:checkBox name="other_billing_flag" bindTarget="hls_billing_method_edit_ds" prompt="其他开票标志"/> <a:comboBox name="other_invoice_kind_tp_n" bindTarget="hls_billing_method_edit_ds" prompt="其他发票种类方式"/> <a:comboBox name="other_invoice_kind_n" bindTarget="hls_billing_method_edit_ds" prompt="指定其他发票种类"/> <div/> <div/> <a:comboBox name="other_tax_rate_tp_n" bindTarget="hls_billing_method_edit_ds" prompt="其他发票税率方式"/> <a:comboBox name="other_tax_rate_n" bindTarget="hls_billing_method_edit_ds" prompt="指定其他发票税率"/> <div/> <a:checkBox name="average_split" bindTarget="hls_billing_method_edit_ds" prompt="超限额平均拆分标志"/> <div/> <div/> <div/> <!-- <a:numberField name="vat_invoice_split_limit" bindTarget="hls_billing_method_edit_ds" prompt="增票拆分限额"/> <a:numberField name="invoice_split_limit" bindTarget="hls_billing_method_edit_ds" prompt="普票拆分限额"/> <a:numberField name="sales_tax_invoice_split_limit" bindTarget="hls_billing_method_edit_ds" prompt="营业税发票拆分限额"/> <div/> <a:checkBox name="bill_of_sale" bindTarget="hls_billing_method_edit_ds" prompt="是否生成销货清单"/> <a:numberField name="split_rounding" bindTarget="hls_billing_method_edit_ds" prompt="拆分取整精度"/> <a:numberField name="invoice_line_limit" bindTarget="hls_billing_method_edit_ds" prompt="发票行数上限"/>--> <a:numberField name="electronic_invoice_limit" bindTarget="hls_billing_method_edit_ds" prompt="电子票开票限额"/> <a:numberField name="paper_invoice_limit" bindTarget="hls_billing_method_edit_ds" prompt="纸质发票开票限额"/> </a:form> <a:grid id="hls_billing_method_cf_edit" bindTarget="hls_billing_method_cf_edit_ds" marginHeight="120" marginWidth="30" navBar="true"> <a:toolBar> <a:button type="add"/> <a:button type="delete"/> <a:button type="clear"/> </a:toolBar> <a:columns> <a:column name="cf_item_n" editor="hls250_edit_lov" prompt="现金流项目" width="200"/> <a:column name="invoice_kind_tp_n" editor="hls250_edit_comboBox" prompt="发票种类方式" width="200"/> <a:column name="invoice_kind_n" editor="hls250_edit_comboBox" editorFunction="hls250_cf_invoice_kind_editorFunction" prompt="指定发票种类" width="200"/> <a:column name="tax_rate_tp_n" editor="hls250_edit_comboBox" prompt="发票税率方式" width="200"/> <a:column name="tax_rate_n" editor="hls250_edit_comboBox" editorFunction="hls250_cf_invoice_kind_editorFunction" prompt="指定发票税率" width="200"/> <a:column name="enabled_flag" editor="hls250_edit_checkBox" prompt="启用"/> </a:columns> <a:editors> <a:textField id="hls250_edit_textField"/> <a:comboBox id="hls250_edit_comboBox"/> <a:checkBox id="hls250_edit_checkBox"/> <a:lov id="hls250_edit_lov"/> </a:editors> </a:grid> </a:screenBody> </a:view> </a:screen>