Browse Source

[Administration] Produits : correctif mise à jour dans les distributions futures

feature/rotating_product
Guillaume Bourgeois 7 months ago
parent
commit
8ef6135121
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      backend/controllers/ProductController.php

+ 3
- 2
backend/controllers/ProductController.php View File

@@ -182,10 +182,11 @@ class ProductController extends BackendController
}

$this->processAvailabilityPointsSale($model);
$productModule->getBuilder()->update($model);

if ($model->apply_distributions) {
$distributionModule->addProductIncomingDistributions($model);
}
$productModule->update($model);

$this->setFlash('success', 'Produit <strong>' . Html::encode($model->name) . '</strong> modifié');

@@ -360,7 +361,7 @@ class ProductController extends BackendController
$product->status = (int) $status;
$product->save();

$distributionModule->addProductIncomingDistributions($product);
$distributionModule->getBuilder()->addProductIncomingDistributions($product);

return ['success', 'id' => $id, 'status' => $status];
}

Loading…
Cancel
Save