shish пре 3 година
родитељ
комит
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";
                 }
             }