Explorar el Código

Merge branch 'dev'

master
Guillaume Bourgeois hace 5 años
padre
commit
00fea1d81f
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      producer/controllers/OrderController.php

+ 2
- 2
producer/controllers/OrderController.php Ver fichero

@@ -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;

Cargando…
Cancelar
Guardar