Browse Source

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

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

} }


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

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


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


$product->status = (int) $status; $product->status = (int) $status;
$product->save(); $product->save();


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


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

Loading…
Cancel
Save