Bläddra i källkod

Merge branch 'master' into debt

shish 1 år sedan
förälder
incheckning
45bd748aed
2 ändrade filer med 4 tillägg och 4 borttagningar
  1. 2 2
      app-ghs/controllers/CustomController.php
  2. 2 2
      biz/ghs/classes/GhsClass.php

+ 2 - 2
app-ghs/controllers/CustomController.php

@@ -536,7 +536,7 @@ class CustomController extends BaseController
             //客户欠款额度设置
             $debt = isset($post['debt']) && $post['debt'] == CustomClass::IS_DEBT_YES ? CustomClass::IS_DEBT_YES : CustomClass::IS_DEBT_NO;
             $customId = $custom['id'] ?? 0;
-            $debtLimit = isset($post['debtLimit']) && is_numeric($post['debtLimit']) ? $post['debtLimit'] : 5000;
+            $debtLimit = isset($post['debtLimit']) && is_numeric($post['debtLimit']) ? $post['debtLimit'] : 0;
             CustomClass::updateById($customId, ['debtLimit' => $debtLimit, 'debt' => $debt]);
 
             $transaction->commit();
@@ -929,7 +929,7 @@ class CustomController extends BaseController
         $get = Yii::$app->request->get();
         $id = $get['id'] ?? 0;
         $debtLimit = $get['debtLimit'] ?? 0;
-        if (is_numeric($debtLimit) == false || $debtLimit <= 0) {
+        if (is_numeric($debtLimit) == false || $debtLimit < 0) {
             util::fail('请填写金额');
         }
         $custom = CustomClass::getById($id, true);

+ 2 - 2
biz/ghs/classes/GhsClass.php

@@ -60,7 +60,7 @@ class GhsClass extends BaseClass
         $live = isset($ghsShop['live']) ? $ghsShop['live'] : 1;
         $isHd = $ghsShop['isHd'] ?? 1;
         $showStock = $ghsShop['showStock'] ?? 0;
-        $allowDebtAmount = $ghsShop['allowDebtAmount'] ?? 5000;
+        $allowDebtAmount = $ghsShop['allowDebtAmount'] ?? 0;
 
         if ($isHd == 1) {
             $giveLevel = 1;
@@ -130,7 +130,7 @@ class GhsClass extends BaseClass
             ShopClass::updateById($hdShopId, ['hasManyGhs' => 1]);
         }
 
-        $debtLimit = 5000;//欠款额度
+        $debtLimit = 0;//欠款额度
         $customData = [
             'sjId' => $hdSjId,
             'ghsId' => $ghsId,