瀏覽代碼

Merge branch 'packProduct' of https://forge.laclic.fr/Laclic/CaracoleBundle into packProduct

packProduct
Guillaume 2 年之前
父節點
當前提交
4557929e31
共有 3 個文件被更改,包括 6 次插入2 次删除
  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 查看文件

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


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

+ 3
- 1
Repository/Order/OrderShopStore.php 查看文件

@@ -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 查看文件

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

foreach ($countsOrderedByCyclesAndProducts as $result) {

Loading…
取消
儲存