Kaynağa Gözat

解决撤销发票时 撤销金额不对bug

y 2 yıl önce
ebeveyn
işleme
06d860deaa

+ 2 - 2
src/main/java/com/ydtech/modules/inv/utils/TransferUtils.java

@@ -364,12 +364,12 @@ public class TransferUtils {
         if (entInvAccount.getOuterFlag().equals("0")) {
             if (enterAccountCard != null) {
                 if (outAccountCard != null) {
-                    if (enterAccountCard.getBalance().equals("0")) {
+                    if (enterAccountCard.getBalance().equals("0") || enterAccountCard.getBalance().equals("0.00")) {
                         throw new SystemException("账户余额不足");
                     }
                 }
             }
-            if (enterAccountCard != null && enterAccountCard.getBalance().isEmpty()) {
+            if (enterAccountCard != null && !enterAccountCard.getBalance().isEmpty()) {
                 enterAccountCard.setBalance(new BigDecimal(enterAccountCard.getBalance()).subtract(invAccountExcelApplyAmount).toString());
             }
         }