Explorar o código

订单反审核时判断款核销单及开票是否存在

hu %!s(int64=3) %!d(string=hai) anos
pai
achega
3e4d121cad
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      src/apps/saorder/saorder.java

+ 7 - 0
src/apps/saorder/saorder.java

@@ -1378,6 +1378,13 @@ public class saorder extends BaseSaorder {
             if (saorderdetail.sum("finvoiceamount") != 0) {
                 throw new P2AppException("", "开票金额不为0,不可反审核");
             }
+            if (!getPaoSet("TWRITEOFFORDER1").isEmpty()) {
+                throw new P2AppException("", "存在收款核销单,不可反审核");
+            }
+            if (!getPaoSet("TINVOICEAPPLYORDER_VIEW").isEmpty()) {
+                throw new P2AppException("", "存在开票申请,不可反审核");
+            }
+            
         }
     }