瀏覽代碼

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

hu 3 年之前
父節點
當前提交
3e4d121cad
共有 1 個文件被更改,包括 7 次插入0 次删除
  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("", "存在开票申请,不可反审核");
+            }
+            
         }
     }