diff --git a/app/Services/OrderService.php b/app/Services/OrderService.php index f0c28d10..99ede9ee 100644 --- a/app/Services/OrderService.php +++ b/app/Services/OrderService.php @@ -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;