@@ -38,7 +38,7 @@ | |||
namespace backend\controllers; | |||
use common\helpers\Opendistrib; | |||
use common\helpers\Souke; | |||
use yii\filters\AccessControl; | |||
/** | |||
@@ -75,7 +75,7 @@ class DevelopmentController extends BackendController | |||
public function actionIndex() | |||
{ | |||
$producerModule = $this->getProducerModule(); | |||
$versionsArray = Opendistrib::getVersions(); | |||
$versionsArray = Souke::getVersions(); | |||
$versionsRenderArray = []; | |||
foreach ($versionsArray as $version) { | |||
$versionsRenderArray[$version] = [ |
@@ -38,7 +38,7 @@ | |||
namespace common\helpers; | |||
class Opendistrib | |||
class Souke | |||
{ | |||
public static function getVersions() | |||
{ |
@@ -31,10 +31,17 @@ class DistributionReportTotalProductCsvGenerator extends AbstractGenerator imple | |||
$productsArray = $this->productRepository->findProductsByDistribution($distribution, true,'product.order ASC'); | |||
$ordersArray = $this->orderRepository->findOrdersByDistribution($distribution); | |||
$datas[] = [ | |||
'Produit', | |||
'Quantité (pièces)', | |||
'Poids' | |||
]; | |||
foreach($productsArray as $product) { | |||
$datas[] = [ | |||
$this->productSolver->getNameExport($product), | |||
$this->orderSolver->getProductQuantityPiecesByOrders($product, $ordersArray) | |||
$this->orderSolver->getProductQuantityPiecesByOrders($product, $ordersArray), | |||
$this->productSolver->getWeightAsString($product) | |||
]; | |||
} | |||
@@ -2,7 +2,7 @@ | |||
namespace domain\Producer\Producer; | |||
use common\helpers\Opendistrib; | |||
use common\helpers\Souke; | |||
use common\helpers\Password; | |||
use common\helpers\Upload; | |||
use common\helpers\Url; | |||
@@ -78,7 +78,7 @@ class ProducerBuilder extends AbstractBuilder | |||
public function updateOpendistribVersion(Producer $producer): void | |||
{ | |||
$versionsArray = Opendistrib::getVersions(); | |||
$versionsArray = Souke::getVersions(); | |||
$producer->latest_version_opendistrib = reset($versionsArray); | |||
$this->update($producer); |