|
@@ -124,7 +124,14 @@ public class InvoiceAfterCheckEvent implements IRule<InvoiceVO>{
|
|
|
// 使用正则表达式替换中文括号为英文括号
|
|
|
String orgnames = orgname.replaceAll("(", "(").replaceAll(")", ")");
|
|
|
String name2 = defdocVO.getName2().replaceAll("(", "(").replaceAll(")", ")");
|
|
|
+
|
|
|
+ //上海天华嘉易建筑设计有限公司(建筑) 上海天华嘉易建筑设计有限公司两家公司共用上海天华嘉易建筑设计有限公司抬头
|
|
|
+ //上海天华嘉易建筑设计有限公司(建筑)制单时去掉(建筑),保证能使用同一个抬头
|
|
|
+ if("上海天华嘉易建筑设计有限公司(建筑)".equals(orgnames)) {
|
|
|
+ orgnames = orgnames.replace("(建筑)", "");
|
|
|
+ }
|
|
|
if(!orgnames.equals(name2)) {
|
|
|
+
|
|
|
ExceptionUtils.wrappBusinessException("发票抬头与财务组织不一致,请修改财务组织!");
|
|
|
}
|
|
|
//比较纳税人识别号
|
|
@@ -135,11 +142,12 @@ public class InvoiceAfterCheckEvent implements IRule<InvoiceVO>{
|
|
|
sql2.append(" bd_defdoc ");
|
|
|
sql2.append(" WHERE");
|
|
|
sql2.append(" pk_defdoclist = ( SELECT pk_defdoclist FROM bd_defdoclist WHERE code = 'CORPYS04' ) ");
|
|
|
- sql2.append(" AND memo = '"+orgname+"' ");
|
|
|
+ sql2.append(" AND memo = '"+name2+"' ");
|
|
|
sql2.append(" AND enablestate = 2");
|
|
|
String tcode = (String) bs.executeQuery(sql2.toString(), new ColumnProcessor());
|
|
|
- if(!defdocVO.getMnecode().equals(tcode)) {
|
|
|
- ExceptionUtils.wrappBusinessException("行:"+invoiceItemVO.getCrowno()+"纳税人识别号不正确!请检查自定义档案是否维护正确!");
|
|
|
+ String mnecode = defdocVO.getMnecode() == null ? "" : defdocVO.getMnecode();
|
|
|
+ if(!mnecode.equals(tcode)) {
|
|
|
+ ExceptionUtils.wrappBusinessException("行:"+invoiceItemVO.getCrowno()+"纳税人识别号不正确! 请检查发票纳税人识别号和自定义档案是否正确!");
|
|
|
}
|
|
|
}
|
|
|
}
|