修改增收补贴金额的错误
This commit is contained in:
parent
6999d00e07
commit
bdf7890cdc
@ -111,14 +111,14 @@ class Store extends BaseController
|
||||
foreach ($consumption['config'] as $k => $item) {
|
||||
if (empty($userConsumption) && in_array($merchant['type_id'], $item['type_id'])) {
|
||||
$saleTarget = $item['amount'];
|
||||
$subsidyAmount = $saleTarget;
|
||||
$subsidyAmount = $item['subsidy'];
|
||||
$purchaseTarget = bcmul($saleTarget, 0.5, 2);
|
||||
break;
|
||||
}
|
||||
if (!empty($userConsumption) && in_array($merchant['type_id'], $item['type_id'])) {
|
||||
$nextItem = $consumption['config'][$k + 1] ?? $item;
|
||||
$saleTarget = $nextItem['amount'];
|
||||
$subsidyAmount = $saleTarget;
|
||||
$subsidyAmount = $item['subsidy'];
|
||||
$purchaseTarget = bcmul($saleTarget, 0.5, 2);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user