shish 2 роки тому
батько
коміт
dac2fb5e5b
1 змінених файлів з 16 додано та 4 видалено
  1. 16 4
      biz-ghs/order/classes/OrderClearClass.php

+ 16 - 4
biz-ghs/order/classes/OrderClearClass.php

@@ -54,11 +54,23 @@ class OrderClearClass extends BaseClass
             $remainDebtPrice = $order->remainDebtPrice ?? 0;
             $currentTotal = bcadd($totalAmount, $remainDebtPrice, 2);
             if ($currentTotal > $customBalance) {
-                continue;
-            } else {
-                $totalAmount = bcadd($totalAmount, $remainDebtPrice, 2);
-                $need[] = ['id' => $orderId];
+                if (getenv('YII_ENV') == 'production') {
+                    //小向需要先结旧账
+                    if (in_array($shop->mainId, [23390])) {
+                        break;
+                    } else {
+                        continue;
+                    }
+                } else {
+                    if (in_array($shop->mainId, [644])) {
+                        break;
+                    } else {
+                        continue;
+                    }
+                }
             }
+            $totalAmount = bcadd($totalAmount, $remainDebtPrice, 2);
+            $need[] = ['id' => $orderId];
         }
         if (empty($need)) {
             return true;