Browse Source

[Administration] Correctif gestion des accessoires

feature/rotating_product
Guillaume Bourgeois 4 months ago
parent
commit
0ad5e73ff7
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      backend/controllers/DistributionController.php

+ 3
- 1
backend/controllers/DistributionController.php View File

$orderOverride = $orderModule->getBuilder()->instanciateOrderFromProductOrdersArray($productOrderArray, $order); $orderOverride = $orderModule->getBuilder()->instanciateOrderFromProductOrdersArray($productOrderArray, $order);
foreach($productOrderArray as $idProduct => $productOrder) { foreach($productOrderArray as $idProduct => $productOrder) {
$product = $productModule->getRepository()->findOneProductById($idProduct); $product = $productModule->getRepository()->findOneProductById($idProduct);
$productOrderArray[$idProduct]['quantity_remaining'] = $orderModule->getResolver()->getProductQuantityRemaining($product, $distribution, $orderOverride);
if($product) {
$productOrderArray[$idProduct]['quantity_remaining'] = $orderModule->getResolver()->getProductQuantityRemaining($product, $distribution, $orderOverride);
}
} }


return $productOrderArray; return $productOrderArray;

Loading…
Cancel
Save