shish 3 лет назад
Родитель
Сommit
c776c83c57
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      console/controllers/OrderItemController.php

+ 2 - 1
console/controllers/OrderItemController.php

@@ -19,10 +19,11 @@ class OrderItemController extends Controller
         if (!empty($list)) {
             foreach ($list as $key => $item) {
                 $cost = $item->cost ?? 0;
+                $xhPrice = $item->xhPrice ?? 0;
                 $ratio = $item->ratio ?? 21;
                 $productId = $item->productId ?? 0;
                 $name = $item->name ?? '';
-                if ($cost < 10) {
+                if ($cost < 10 && $cost > $xhPrice) {
                     echo $productId . ' ' . $name . ' ' . $cost . ' ' . $ratio . "\n";
                 }
             }