Browse Source

[Administration] Correctif gestion des accessoires

feature/rotating_product
Guillaume Bourgeois 5 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

@@ -608,7 +608,9 @@ class DistributionController extends BackendController
$orderOverride = $orderModule->getBuilder()->instanciateOrderFromProductOrdersArray($productOrderArray, $order);
foreach($productOrderArray as $idProduct => $productOrder) {
$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;

Loading…
Cancel
Save