Kirin před 4 roky
rodič
revize
92ef478c72
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      app/models/user/UserRecharge.php

+ 2 - 1
app/models/user/UserRecharge.php

@@ -186,7 +186,8 @@ class UserRecharge extends BaseModel
         $commission = bcmul($user['wdc_all'], bcmul(sys_config('wdc2money', 40), 0.01, 2), 2);
         $value = bcsub($user['wdc_all'], $commission);
         if ($price + $user['wdc_trade'] > $value) {
-            return self::setErrorInfo("可转酒币不足,您的可转酒币余额为$value");
+            $value_sub = bcsub($value, $user['wdc_trade'], 2);
+            return self::setErrorInfo("可转酒币不足,您的可转酒币余额为$value_sub");
         }
         self::beginTrans();
         try {