|
|
@@ -150,8 +150,11 @@ class CustomClass extends BaseClass
|
|
|
$custom->isDebt = CustomClass::IS_DEBT_YES;
|
|
|
$debtLimit = $custom->debtLimit ?? 0;
|
|
|
if ($bookOrder == false) {
|
|
|
- if ($custom->debtAmount > $debtLimit) {
|
|
|
- util::fail("已欠款{$custom->debtAmount},请先结账哦");
|
|
|
+ if (isset($order->shopAdminId) && $order->shopAdminId == 0) {
|
|
|
+ //客户自己下单要受额度限制
|
|
|
+ if ($custom->debtAmount > $debtLimit) {
|
|
|
+ util::fail("已欠款{$custom->debtAmount},请先结账哦");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
$balance = bcadd($custom->debtAmount, $amount, 2);
|