mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
order process fix
This commit is contained in:
parent
998ac1d500
commit
5630066aa4
@ -130,7 +130,9 @@ class OrderService
|
||||
$totalValue = $orderModel->sum('total_amount') + $orderModel->sum('balance_amount');
|
||||
$totalMonth = 0;
|
||||
foreach ($orderModel->get() as $item) {
|
||||
$totalMonth = $totalMonth + $strToMonth[$item->cycle];
|
||||
$surplusMonth = strtotime("+ {$strToMonth[$item->cycle]}month", $item->updated_at);
|
||||
$surplusMonth = ($surplusMonth - time()) / 2678400;
|
||||
$totalMonth = $totalMonth + $surplusMonth;
|
||||
}
|
||||
if (!$totalValue || !$totalMonth) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user