|
@@ -121,8 +121,10 @@ public class InvoiceAfterCheckEvent implements IRule<InvoiceVO>{
|
|
|
//比较抬头
|
|
|
String sql1 = "select name from org_financeorg_v where pk_vid ='"+InvoiceVO.getParent().getAttributeValue("pk_org_v")+"'";
|
|
|
String orgname = (String) bs.executeQuery(sql1, new ColumnProcessor());
|
|
|
- if(!orgname.equals(defdocVO.getName2())) {
|
|
|
- ExceptionUtils.wrappBusinessException("行:"+invoiceItemVO.getCrowno()+"发票抬头不正确!请检查自定义档案是否维护!");
|
|
|
+ // 使用正则表达式替换中文括号为英文括号
|
|
|
+ String orgnames = orgname.replaceAll("(", "(").replaceAll(")", ")");
|
|
|
+ if(!orgnames.equals(defdocVO.getName2())) {
|
|
|
+ ExceptionUtils.wrappBusinessException("发票抬头与财务组织不一致,请修改财务组织!");
|
|
|
}
|
|
|
//比较纳税人识别号
|
|
|
StringBuffer sql2 = new StringBuffer();
|