Sfoglia il codice sorgente

Stock : correctif déduction des stocks

feature/export_comptable
Guillaume 4 anni fa
parent
commit
b6032083d3
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      ShopBundle/Services/Order/OrderUtilsStockTrait.php

+ 1
- 1
ShopBundle/Services/Order/OrderUtilsStockTrait.php Vedi File

@@ -19,7 +19,7 @@ trait OrderUtilsStockTrait

//Disponibilité par unité de référence
$oldAvailability = $orderProduct->getProduct()->getAvailableQuantityInherited();
$newAvailability = $oldAvailability - ($orderProduct->getQuantityProduct() / $orderProduct->getUnit()->getCoefficient());
$newAvailability = $oldAvailability - ($orderProduct->getQuantityOrder() * ($orderProduct->getQuantityProduct() / $orderProduct->getUnit()->getCoefficient()));
$orderProduct->getProduct()->getProductFamily()->setAvailableQuantity($newAvailability);

$this->em->persist($orderProduct->getProduct()->getProductFamily());

Loading…
Annulla
Salva