Commit 72990922 authored by 李贺贺's avatar 李贺贺

开票方式/接收邮件邮箱 取值检验

parent 23525589
......@@ -722,6 +722,12 @@
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}else if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
//小规模纳税人
record.getField('taxpayer_type').setRequired(true);
......@@ -733,6 +739,13 @@
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.set('invoice_type','');
record.set('invoice_type_n','');
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('reception_maile').setRequired(true);
}
}else if (value == 'NO_BILLING'){//暂时不开票
......@@ -746,13 +759,52 @@
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
if (record.get('bp_class') == 'NP') {
//开票
if (value == 'BILLING') {
//一般纳税人
if( record.get('taxpayer_type') == 'GENERAL_TAXPAYER'){
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
if(record.get('taxpayer_type') == 'SMALL_SCALE_TAXPAYER'){
//小规模纳税人
record.set('invoice_type','');
record.set('invoice_type_n','');
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('reception_maile').setRequired(true);
}
}else if (value == 'NO_BILLING'){//暂时不开票
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
}
//纳税人类型
if (name == 'taxpayer_type' && value) {
if (record.get('bp_class') == 'ORG') {
if (value == 'SMALL_SCALE_TAXPAYER') {
if (record.get('invoice_method') == 'BILLING') {
record.getField('taxpayer_type').setRequired(true);
record.getField('taxpayer_type_n').setRequired(true);
record.getField('tax_registry_num').setRequired(true);
......@@ -762,7 +814,32 @@
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
record.set('invoice_type','');
record.set('invoice_type_n','');
record.getField('invoice_type').setReadOnly(false);
record.getField('invoice_type_n').setReadOnly(false);
record.getField('invoice_type').setRequired(true);
record.getField('invoice_type_n').setRequired(true);
record.getField('reception_maile').setRequired(true);
}
//暂不开票
else if( record.get('invoice_method') == 'NO_BILLING'){
record.getField('taxpayer_type').setRequired(true);
record.getField('taxpayer_type_n').setRequired(true);
record.getField('tax_registry_num').setRequired(true);
record.getField('invoice_title').setRequired(true);
record.getField('invoice_bp_address').setRequired(false);
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}else if (value == 'GENERAL_TAXPAYER') {
if (record.get('invoice_method') == 'BILLING'){
record.getField('taxpayer_type').setRequired(true);
......@@ -774,6 +851,12 @@
record.getField('invoice_bp_phone_num').setRequired(true);
record.getField('invoice_bp_bank').setRequired(true);
record.getField('invoice_bp_bank_account').setRequired(true);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}else if ( record.get('invoice_method') == 'NO_BILLING'){
record.getField('taxpayer_type').setRequired(true);
......@@ -785,11 +868,23 @@
record.getField('invoice_bp_phone_num').setRequired(false);
record.getField('invoice_bp_bank').setRequired(false);
record.getField('invoice_bp_bank_account').setRequired(false);
//设置开票类型为纸质只读
record.set('invoice_type','PAPER');
record.set('invoice_type_n','纸质发票');
record.getField('invoice_type').setReadOnly(true);
record.getField('invoice_type_n').setReadOnly(true);
record.getField('reception_maile').setRequired(false);
}
}
}
}
if(name == 'invoice_type'){
if(value == 'PAPER'){
record.getField('reception_maile').setRequired(false);
}else{
record.getField('reception_maile').setRequired(true);
}
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment