Browse Source

Correctifs

refactoring
Guillaume Bourgeois 1 year ago
parent
commit
0870d3c959
3 changed files with 14 additions and 6 deletions
  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 View File

} }
} }


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


return $versionsArray; return $versionsArray;
} }

+ 8
- 3
producer/views/order/order.php View File



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


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


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

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

$this->setTitle('Commander') ;


?> ?>




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


<?php <?php

+ 5
- 2
producer/views/site/index.php View File

*/ */


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


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

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


$this->setTitle('Accueil'); $this->setTitle('Accueil');
'label' => 'Jours de livraison', 'label' => 'Jours de livraison',
'format' => 'raw', 'format' => 'raw',
'contentOptions' => ['class' => 'days'], 'contentOptions' => ['class' => 'days'],
'value' => function($model) {
'value' => function($model) use ($distributionManager) {


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


} }
elseif($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS) { elseif($producer->behavior_home_point_sale_day_list == Producer::BEHAVIOR_HOME_POINT_SALE_DAY_LIST_INCOMING_DISTRIBUTIONS) {
$html = '' ; $html = '' ;
$incomingDistributions = Distribution::getIncoming();
$incomingDistributions = $distributionManager->findDistributionsIncoming();
$cpt = 0 ; $cpt = 0 ;
foreach($incomingDistributions as $distribution) { foreach($incomingDistributions as $distribution) {
$countPointSaleDistribution = PointSaleDistribution::searchCount([ $countPointSaleDistribution = PointSaleDistribution::searchCount([

Loading…
Cancel
Save