shish 2 лет назад
Родитель
Сommit
0ff01e889c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      biz-ghs/order/classes/OrderClearClass.php

+ 1 - 1
biz-ghs/order/classes/OrderClearClass.php

@@ -52,9 +52,9 @@ class OrderClearClass extends BaseClass
         foreach ($orderList as $order) {
             $orderId = $order->id ?? 0;
             $remainDebtPrice = $order->remainDebtPrice ?? 0;
-            $totalAmount = bcadd($totalAmount, $remainDebtPrice, 2);
             if ($totalAmount <= $customBalance) {
                 $need[] = ['id' => $orderId];
+                $totalAmount = bcadd($totalAmount, $remainDebtPrice, 2);
             } else {
                 break;
             }