Procházet zdrojové kódy

Correctifs

refactoring
Guillaume Bourgeois před 1 rokem
rodič
revize
0870d3c959
3 změnil soubory, kde provedl 14 přidání a 6 odebrání
  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 Zobrazit soubor

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

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

return $versionsArray;
}

+ 8
- 3
producer/views/order/order.php Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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([

Načítá se…
Zrušit
Uložit