Sfoglia il codice sorgente

[producer] Correction bug commande de produits avec une quantité à virgule

dev
parent
commit
30a84255de
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      producer/controllers/OrderController.php

+ 2
- 2
producer/controllers/OrderController.php Vedi File

@@ -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…
Annulla
Salva