1
This commit is contained in:
parent
06c2d45f41
commit
b228882e7c
@ -472,11 +472,14 @@ class ShopController extends BaseAuthedController {
|
|||||||
$totalAmount = InAppRecord::getTotalAmount();
|
$totalAmount = InAppRecord::getTotalAmount();
|
||||||
$recordDb = InAppRecord::get();
|
$recordDb = InAppRecord::get();
|
||||||
$upLimit = mt\Parameter::getVal('inapp_daily_up_limit', 0);
|
$upLimit = mt\Parameter::getVal('inapp_daily_up_limit', 0);
|
||||||
|
$totalUpLimit = mt\Parameter::getVal('inapp_total_up_limit', 0);
|
||||||
$todayAmount = 0;
|
$todayAmount = 0;
|
||||||
if ($recordDb) {
|
if ($recordDb) {
|
||||||
$todayAmount = max($recordDb['amount'], $recordDb['amount_ok']);
|
$todayAmount = max($recordDb['amount'], $recordDb['amount_ok']);
|
||||||
}
|
}
|
||||||
return max(0, $upLimit - $todayAmount);
|
$dailyBalance = max(0, $upLimit - $todayAmount);
|
||||||
|
$totalBalance = max(0, $totalUpLimit - $totalAmount);
|
||||||
|
return min($dailyBalance, $totalBalance);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user