|
|
@@ -54,19 +54,11 @@ class CustomRechargeController extends BaseController
|
|
|
$ghsShopId = $ghs->shopId ?? 0;
|
|
|
$ghsMainId = $ghs->mainId ?? 0;
|
|
|
$ghsBalance = $ghs->balance ?? 0;
|
|
|
- $ghsDebtAmount = $ghs->debtAmount ?? 0;
|
|
|
$ghsName = $ghs->name ?? '';
|
|
|
$ghsShop = ShopClass::getById($ghsShopId, true);
|
|
|
if (empty($ghsShop)) {
|
|
|
util::fail('供货商信息不完全哦');
|
|
|
}
|
|
|
- $remainGhsDebt = bcsub($ghsDebtAmount, $ghsBalance, 2);
|
|
|
- if ($remainGhsDebt < 0) {
|
|
|
- util::fail('已结清,不需要充值');
|
|
|
- }
|
|
|
- if ($actPrice > $remainGhsDebt) {
|
|
|
- util::fail('只需要充' . $remainGhsDebt . '元');
|
|
|
- }
|
|
|
|
|
|
$customStaffId = 0;
|
|
|
$customStaffName = '';
|