瀏覽代碼

Correctifs

refactoring
Guillaume Bourgeois 1 年之前
父節點
當前提交
0870d3c959
共有 3 個檔案被更改,包括 14 行新增6 行删除
  1. +1
    -1
      common/helpers/Opendistrib.php
  2. +8
    -3
      producer/views/order/order.php
  3. +5
    -2
      producer/views/site/index.php

+ 1
- 1
common/helpers/Opendistrib.php 查看文件

@@ -56,7 +56,7 @@ class Opendistrib
}
}

krsort($versionsArray);
rsort($versionsArray);

return $versionsArray;
}

+ 8
- 3
producer/views/order/order.php 查看文件

@@ -38,14 +38,19 @@ termes.

use common\helpers\GlobalParam ;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Wrapper\DistributionManager;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Producer\Producer\Wrapper\ProducerManager;

\producer\assets\VuejsOrderOrderAsset::register($this);

$this->setTitle('Commander') ;
$distributionManager = DistributionManager::getInstance();
$producerManager = ProducerManager::getInstance();

$producer = $this->context->getProducerCurrent();
$producerManager = $this->getProducerManager();

$this->setTitle('Commander') ;

?>

@@ -165,7 +170,7 @@ $producerManager = $this->getProducerManager();

<?php if($producer->behavior_order_select_distribution == Producer::BEHAVIOR_ORDER_SELECT_DISTRIBUTION_LIST ): ?>
<div id="distributions-list">
<?php $incomingDistributions = Distribution::getIncoming(); ?>
<?php $incomingDistributions = $distributionManager->findDistributionsIncoming(); ?>
<?php foreach($incomingDistributions as $distribution): ?>

<?php

+ 5
- 2
producer/views/site/index.php 查看文件

@@ -37,6 +37,7 @@ termes.
*/

use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Wrapper\DistributionManager;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Producer\Producer\Wrapper\ProducerManager;
@@ -47,6 +48,8 @@ use common\helpers\Price;

$productManager = ProductManager::getInstance();
$producerManager = ProducerManager::getInstance();
$distributionManager = DistributionManager::getInstance();

$producer = $this->context->getProducerCurrent() ;

$this->setTitle('Accueil');
@@ -86,7 +89,7 @@ $this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ;
'label' => 'Jours de livraison',
'format' => 'raw',
'contentOptions' => ['class' => 'days'],
'value' => function($model) {
'value' => function($model) use ($distributionManager) {

$producer = \Yii::$app->controller->getProducerCurrent() ;

@@ -119,7 +122,7 @@ $this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ;
}
elseif($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS) {
$html = '' ;
$incomingDistributions = Distribution::getIncoming();
$incomingDistributions = $distributionManager->findDistributionsIncoming();
$cpt = 0 ;
foreach($incomingDistributions as $distribution) {
$countPointSaleDistribution = PointSaleDistribution::searchCount([

Loading…
取消
儲存