update telegram

This commit is contained in:
Tokumeikoi 2020-05-20 11:56:56 +08:00
parent 12db88b998
commit c648308634

View File

@ -128,6 +128,7 @@ class OrderService
$surplusAmount = 0; $surplusAmount = 0;
foreach ($orderModel->get() as $item) { foreach ($orderModel->get() as $item) {
$surplusMonth = strtotime("+ {$strToMonth[$item->cycle]}month", $item->updated_at->format('U')); $surplusMonth = strtotime("+ {$strToMonth[$item->cycle]}month", $item->updated_at->format('U'));
if (!$surplusMonth) continue;
$surplusMonth = ($surplusMonth - time()) / 2678400 / $strToMonth[$item->cycle]; $surplusMonth = ($surplusMonth - time()) / 2678400 / $strToMonth[$item->cycle];
if ($surplusMonth > 0) { if ($surplusMonth > 0) {
$surplusAmount = $surplusAmount + ($item['total_amount'] + $item['balance_amount']) * $surplusMonth; $surplusAmount = $surplusAmount + ($item['total_amount'] + $item['balance_amount']) * $surplusMonth;