Browse Source

Merge branch 'develop'

master
Guillaume Bourgeois 4 months ago
parent
commit
1e98060fdc
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