Sfoglia il codice sorgente

[Backend] PackProduct : Statistiques de vente #116

packProduct
Fabien Normand 2 anni fa
parent
commit
82cc65b422
3 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. +1
    -0
      Repository/Order/OrderShopRepositoryQuery.php
  2. +3
    -1
      Repository/Order/OrderShopStore.php
  3. +2
    -1
      Statistic/Product/ProductsSalesStatistic.php

+ 1
- 0
Repository/Order/OrderShopRepositoryQuery.php Vedi File

@@ -57,6 +57,7 @@ class OrderShopRepositoryQuery extends AbstractRepositoryQuery
);
}


public function selectSum(): self
{
$this->joinProduct();

+ 3
- 1
Repository/Order/OrderShopStore.php Vedi File

@@ -10,6 +10,7 @@ use Lc\CaracoleBundle\Builder\File\DocumentBuilder;
use Lc\CaracoleBundle\Model\Distribution\DistributionInterface;
use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
use Lc\CaracoleBundle\Model\Order\OrderStatusModel;
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
use Lc\CaracoleBundle\Model\Product\ProductInterface;
use Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface;
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface;
@@ -590,6 +591,7 @@ class OrderShopStore extends AbstractStore
public function countValidOrderProductsOfDistributionsByProducts(
array $distributions,
array $products,
ProductFamilyInterface $productFamily,
$query = null
): array {
$query = $this->createDefaultQuery($query);
@@ -601,7 +603,7 @@ class OrderShopStore extends AbstractStore
->groupBy('distribution.cycleNumber, product.id');

//TODO vérifier ou est utilisé cette fonction ???
dump($query->find());
return $query->find();
}


+ 2
- 1
Statistic/Product/ProductsSalesStatistic.php Vedi File

@@ -81,7 +81,8 @@ class ProductsSalesStatistic extends Statistic
{
$countsOrderedByCyclesAndProducts = $orderShopStore->countValidOrderProductsOfDistributionsByProducts(
$this->distributionList,
$this->productIds
$this->productIds,
$this->productFamily
);

foreach ($countsOrderedByCyclesAndProducts as $result) {

Loading…
Annulla
Salva