瀏覽代碼

Merge branch 'hotfix/hotfix_1366'

master
Guillaume Bourgeois 1 年之前
父節點
當前提交
e6b1867da9
共有 2 個檔案被更改,包括 7 行新增7 行删除
  1. +3
    -3
      backend/controllers/DistributionController.php
  2. +4
    -4
      backend/controllers/OrderController.php

+ 3
- 3
backend/controllers/DistributionController.php 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存