瀏覽代碼

Merge branch 'dev'

master
Guillaume Bourgeois 5 年之前
父節點
當前提交
00fea1d81f
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      producer/controllers/OrderController.php

+ 2
- 2
producer/controllers/OrderController.php 查看文件

@@ -326,9 +326,9 @@ class OrderController extends ProducerBaseController

$unit = (!is_null($order) && isset($unitsArray[$product->id])) ? $unitsArray[$product->id] : $product->unit ;
$coefficient = Product::$unitsArray[$unit]['coefficient'] ;
$quantity = ((int) $posts['products'][$product->id]) / $coefficient ;
$quantity = ((float) $posts['products'][$product->id]) / $coefficient ;
if ($availableProducts[$product->id]['quantity_max'] && $quantity > $availableProducts[$product->id]['quantity_remaining']) {
$quantity = $availableProducts[$product->id]['quantity_remaining'];
$quantity = $availableProducts[$product->id]['quantity_remaining'] ;
}
$productOrder->quantity = $quantity;

Loading…
取消
儲存