|
|
@@ -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);
|