Browse Source

金额控制

shish 4 years ago
parent
commit
9cec72c35c
1 changed files with 4 additions and 2 deletions
  1. 4 2
      app-pt/controllers/CashController.php

+ 4 - 2
app-pt/controllers/CashController.php

@@ -59,8 +59,10 @@ class CashController extends BaseController
             }
             $miniCashAmount = dict::getDict('miniCashAmount');
             if ($cashAmount < $miniCashAmount) {
-                CashClass::rollback($cash, $shop, $transaction, $cashAmount, $remark);
-                util::fail("余额不足{$miniCashAmount}元");
+                if (getenv('YII_ENV') == 'production') {
+                    CashClass::rollback($cash, $shop, $transaction, $cashAmount, $remark);
+                    util::fail("余额不足{$miniCashAmount}元");
+                }
             }
 
             $getAmount = $cash->beAmount;