Browse Source

[Administration] Exports : ajout colonne poids dans "Totaux produits"

feature/rotating_product
Guillaume Bourgeois 7 months ago
parent
commit
4f210f0d5b
5 changed files with 78 additions and 2161 deletions
  1. +2
    -2
      backend/controllers/DevelopmentController.php
  2. +1
    -1
      common/helpers/Souke.php
  3. +8
    -1
      domain/Distribution/Distribution/Export/DistributionReportTotalProductCsvGenerator.php
  4. +2
    -2
      domain/Producer/Producer/ProducerBuilder.php
  5. +65
    -2155
      producer/web/css/screen.css

+ 2
- 2
backend/controllers/DevelopmentController.php View File



namespace backend\controllers; namespace backend\controllers;


use common\helpers\Opendistrib;
use common\helpers\Souke;
use yii\filters\AccessControl; use yii\filters\AccessControl;


/** /**
public function actionIndex() public function actionIndex()
{ {
$producerModule = $this->getProducerModule(); $producerModule = $this->getProducerModule();
$versionsArray = Opendistrib::getVersions();
$versionsArray = Souke::getVersions();
$versionsRenderArray = []; $versionsRenderArray = [];
foreach ($versionsArray as $version) { foreach ($versionsArray as $version) {
$versionsRenderArray[$version] = [ $versionsRenderArray[$version] = [

common/helpers/Opendistrib.php → common/helpers/Souke.php View File



namespace common\helpers; namespace common\helpers;


class Opendistrib
class Souke
{ {
public static function getVersions() public static function getVersions()
{ {

+ 8
- 1
domain/Distribution/Distribution/Export/DistributionReportTotalProductCsvGenerator.php View File

$productsArray = $this->productRepository->findProductsByDistribution($distribution, true,'product.order ASC'); $productsArray = $this->productRepository->findProductsByDistribution($distribution, true,'product.order ASC');
$ordersArray = $this->orderRepository->findOrdersByDistribution($distribution); $ordersArray = $this->orderRepository->findOrdersByDistribution($distribution);


$datas[] = [
'Produit',
'Quantité (pièces)',
'Poids'
];

foreach($productsArray as $product) { foreach($productsArray as $product) {
$datas[] = [ $datas[] = [
$this->productSolver->getNameExport($product), $this->productSolver->getNameExport($product),
$this->orderSolver->getProductQuantityPiecesByOrders($product, $ordersArray)
$this->orderSolver->getProductQuantityPiecesByOrders($product, $ordersArray),
$this->productSolver->getWeightAsString($product)
]; ];
} }



+ 2
- 2
domain/Producer/Producer/ProducerBuilder.php View File



namespace domain\Producer\Producer; namespace domain\Producer\Producer;


use common\helpers\Opendistrib;
use common\helpers\Souke;
use common\helpers\Password; use common\helpers\Password;
use common\helpers\Upload; use common\helpers\Upload;
use common\helpers\Url; use common\helpers\Url;


public function updateOpendistribVersion(Producer $producer): void public function updateOpendistribVersion(Producer $producer): void
{ {
$versionsArray = Opendistrib::getVersions();
$versionsArray = Souke::getVersions();
$producer->latest_version_opendistrib = reset($versionsArray); $producer->latest_version_opendistrib = reset($versionsArray);


$this->update($producer); $this->update($producer);

+ 65
- 2155
producer/web/css/screen.css
File diff suppressed because it is too large
View File


Loading…
Cancel
Save