chuweiqiang пре 1 година
родитељ
комит
254c4c27f1
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      application/api/controller/Order.php

+ 2 - 2
application/api/controller/Order.php

@@ -62,7 +62,7 @@ class Order extends Api
                         'order_id' => $OrderModel->id,
                         'goods_type' => $data['type'],
                         'goods_id' => $v,
-                        'price' => (int)$price[0],
+                        'price' => round($price[0],2)
                     ];
                     $OrderGoods = new OrderGoods();
                     $OrderGoods->save($arr);
@@ -72,7 +72,7 @@ class Order extends Api
                         'order_id' => $OrderModel->id,
                         'goods_type' => $data['type'],
                         'goods_id' => $v,
-                        'price' => (int)$price[0],
+                        'price' => round($price[0],2)
                     ];
                     $OrderGoods = new OrderGoods();
                     $OrderGoods->save($arr);