Ver código fonte

订单反审核时判断核销金额和开票金额是否大于0,如果大于0,则不可进行反审核

沈静伟 4 anos atrás
pai
commit
1a2aaef18c
1 arquivos alterados com 9 adições e 2 exclusões
  1. 9 2
      src/apps/saorder/saorder.java

+ 9 - 2
src/apps/saorder/saorder.java

@@ -1358,9 +1358,10 @@ public class saorder extends BaseSaorder {
             if (!getPaoSet("saorderdetail_close").isEmpty()) {
                 throw new P2AppException("", "已存在关闭的行,不可反审核");
             }
-            if(saorderdetail.sum("fwriteoffamount")!=0){
+            if (saorderdetail.sum("fwriteoffamount") != 0) {
                 throw new P2AppException("", "核销金额不为0,不可反审核");
-            } if(saorderdetail.sum("finvoiceamount")!=0){
+            }
+            if (saorderdetail.sum("finvoiceamount") != 0) {
                 throw new P2AppException("", "开票金额不为0,不可反审核");
             }
         }
@@ -1409,6 +1410,12 @@ public class saorder extends BaseSaorder {
             if (!getPaoSet("saorderdetail_close").isEmpty()) {
                 throw new P2AppException("", "已存在关闭的行,不可反审核");
             }
+            if (saorderdetail.sum("fwriteoffamount") != 0) {
+                throw new P2AppException("", "核销金额不为0,不可反审核");
+            }
+            if (saorderdetail.sum("finvoiceamount") != 0) {
+                throw new P2AppException("", "开票金额不为0,不可反审核");
+            }
         }
     }