Sfoglia il codice sorgente

Problème getProductDistributionManager() #1366

master
Guillaume Bourgeois 1 anno fa
parent
commit
8716ef6e71
2 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. +3
    -3
      backend/controllers/DistributionController.php
  2. +4
    -4
      backend/controllers/OrderController.php

+ 3
- 3
backend/controllers/DistributionController.php Vedi File

@@ -642,7 +642,7 @@ class DistributionController extends BackendController
public function actionAjaxProcessProductQuantityMax($idDistribution, $idProduct, $quantityMax)
{
\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
$productDistributionModule = $this->getProductDistributionManager();
$productDistributionModule = $this->getProductDistributionModule();
$productDistribution = $this->getProductDistribution($idProduct, $idDistribution);
$productDistributionModule->updateProductDistributionQuantityMax($productDistribution, (float) $quantityMax);
return ['success'];
@@ -651,7 +651,7 @@ class DistributionController extends BackendController
public function actionAjaxProcessActiveProduct(int $idDistribution, int $idProduct, int $active)
{
\Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
$productDistributionModule = $this->getProductDistributionManager();
$productDistributionModule = $this->getProductDistributionModule();
$productDistribution = $this->getProductDistribution($idProduct, $idDistribution);
$productDistributionModule->updateProductDistributionActive($productDistribution, $active);
return ['success'];
@@ -679,7 +679,7 @@ class DistributionController extends BackendController
{
$distributionModule = $this-> getDistributionModule();
$productModule = $this->getProductModule();
$productDistributionModule = $this->getProductDistributionManager();
$productDistributionModule = $this->getProductDistributionModule();

return $productDistributionModule->findOneProductDistribution(
$distributionModule->findOneDistributionById($idDistribution),

+ 4
- 4
backend/controllers/OrderController.php Vedi File

@@ -174,7 +174,7 @@ class OrderController extends BackendController
$productModule = $this->getProductModule();
$pointSaleModule = $this->getPointSaleModule();
$orderModule = $this->getOrderModule();
$productDistributionModule = $this->getProductDistributionManager();
$productDistributionModule = $this->getProductDistributionModule();

if (!Product::searchCount() || !PointSale::searchCount()) {
$this->redirect(['dashboard/index', 'error_products_points_sale' => 1]);
@@ -421,7 +421,7 @@ class OrderController extends BackendController
$distributionModule = $this-> getDistributionModule();
$pointSaleModule = $this->getPointSaleModule();
$productModule = $this->getProductModule();
$productDistributionModule = $this->getProductDistributionManager();
$productDistributionModule = $this->getProductDistributionModule();

$distribution = $distributionModule->findOneDistribution($date);
$selectedProductsArray = $productDistributionModule->findProductDistributionsByDistribution($distribution);
@@ -544,7 +544,7 @@ class OrderController extends BackendController
{
$orderModule = $this->getOrderModule();
$distributionModule = $this-> getDistributionModule();
$productDistributionModule = $this->getProductDistributionManager();
$productDistributionModule = $this->getProductDistributionModule();

$data = [];
$filename = 'summary_' . $date;
@@ -605,7 +605,7 @@ class OrderController extends BackendController
public function contentPointSaleCSV($date, $products, $pointsSale, $idPointSale)
{
$distributionModule = $this-> getDistributionModule();
$productDistributionModule = $this->getProductDistributionManager();
$productDistributionModule = $this->getProductDistributionModule();

$data = [];
$distribution = $distributionModule->findOneDistribution($date);

Loading…
Annulla
Salva