mirror of
https://github.com/v2board/v2board.git
synced 2025-01-11 00:29:09 +08:00
fix: surplus
This commit is contained in:
parent
67ab0d1f22
commit
56a4ce5fe4
@ -215,7 +215,7 @@ class OrderService
|
||||
if ($item->cycle === 'onetime_price') continue;
|
||||
if ($this->orderIsUsed($item)) continue;
|
||||
$orderSurplusMonth = $orderSurplusMonth + self::STR_TO_TIME[$item->cycle];
|
||||
$orderSurplusAmount = $orderSurplusAmount + ($item['total_amount'] + $item['balance_amount'] + $item['surplus_amount']);
|
||||
$orderSurplusAmount = $orderSurplusAmount + ($item['total_amount'] + $item['balance_amount'] + $item['surplus_amount'] - $item['refund_amount']);
|
||||
}
|
||||
if (!$orderSurplusMonth || !$orderSurplusAmount) return;
|
||||
$monthUnitPrice = $orderSurplusAmount / $orderSurplusMonth;
|
||||
|
Loading…
Reference in New Issue
Block a user