|
@@ -121,31 +121,21 @@ 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());
|
|
|
+
|
|
|
|
|
|
String orgnames = orgname.replaceAll("(", "(").replaceAll(")", ")");
|
|
|
String name2 = defdocVO.getName2().replaceAll("(", "(").replaceAll(")", ")");
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if("上海天华嘉易建筑设计有限公司(建筑)".equals(orgnames)) {
|
|
|
- orgnames = orgnames.replace("(建筑)", "");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if("上海天华室内设计有限公司(嘉易工程)".equals(orgnames)) {
|
|
|
- orgnames = orgnames.replace("(嘉易工程)", "");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- if("上海天华机电(北方)事业部".equals(orgnames)) {
|
|
|
- orgnames = "上海天华建筑设计有限公司";
|
|
|
- }
|
|
|
+
|
|
|
+ String docsql = "select mnecode as invoiceTitle from bd_defdoc where pk_defdoclist = (select pk_defdoclist from bd_defdoclist "
|
|
|
+ + "where code = 'kpttys' and dr = 0) and name = '"+orgnames+"' and enablestate = 2 and dr = 0";
|
|
|
+ String invoiceTitle = (String) bs.executeQuery(docsql, new ColumnProcessor());
|
|
|
+
|
|
|
+ if(invoiceTitle != null) {
|
|
|
+ orgnames = invoiceTitle;
|
|
|
+ }
|
|
|
if(!orgnames.equals(name2)) {
|
|
|
-
|
|
|
ExceptionUtils.wrappBusinessException("发票抬头与财务组织不一致,请修改财务组织!");
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
|
|
|
StringBuffer sql2 = new StringBuffer();
|
|
|
sql2.append("SELECT");
|
|
@@ -181,7 +171,6 @@ public class InvoiceAfterCheckEvent implements IRule<InvoiceVO>{
|
|
|
norigtaxmny1 = norigtaxmny1.add(invoiceItemVO.getNorigtaxmny());
|
|
|
nmny1 = nmny1.add(invoiceItemVO.getNmny());
|
|
|
ntax1 = ntax1.add(invoiceItemVO.getNtax());
|
|
|
-
|
|
|
}
|
|
|
|
|
|
if(vbdboo && idboo) {
|