shish 3 năm trước cách đây
mục cha
commit
9263cdc94e
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      console/controllers/OrderItemController.php

+ 2 - 0
console/controllers/OrderItemController.php

@@ -26,6 +26,8 @@ class OrderItemController extends Controller
                 $smallCost = bcdiv($cost, $ratio, 2);
                 if ($cost > 10 && $cost > $xhPrice) {
                     echo $productId . ' ' . $name . ' 成本:' . $cost . ' 价格:' . $xhPrice . ' 比例:' . $ratio . ' 小单位成本:' . $smallCost . "\n";
+                    $item->cost = $smallCost;
+                    $item->save();
                 }
                 if ($cost < 10 && $cost > $xhPrice) {
                     //echo $productId . ' ' . $name . ' 成本:' . $cost . ' 价格:' . $xhPrice . ' 比例:' . $ratio . "\n";