|
|
|
|
|
|
|
|
use Lc\CaracoleBundle\Model\Distribution\DistributionInterface; |
|
|
use Lc\CaracoleBundle\Model\Distribution\DistributionInterface; |
|
|
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; |
|
|
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; |
|
|
use Lc\CaracoleBundle\Model\Order\OrderStatusModel; |
|
|
use Lc\CaracoleBundle\Model\Order\OrderStatusModel; |
|
|
|
|
|
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface; |
|
|
use Lc\CaracoleBundle\Model\Product\ProductInterface; |
|
|
use Lc\CaracoleBundle\Model\Product\ProductInterface; |
|
|
use Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface; |
|
|
use Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface; |
|
|
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface; |
|
|
use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface; |
|
|
|
|
|
|
|
|
public function countValidOrderProductsOfDistributionsByProducts( |
|
|
public function countValidOrderProductsOfDistributionsByProducts( |
|
|
array $distributions, |
|
|
array $distributions, |
|
|
array $products, |
|
|
array $products, |
|
|
|
|
|
ProductFamilyInterface $productFamily, |
|
|
$query = null |
|
|
$query = null |
|
|
): array { |
|
|
): array { |
|
|
$query = $this->createDefaultQuery($query); |
|
|
$query = $this->createDefaultQuery($query); |
|
|
|
|
|
|
|
|
->groupBy('distribution.cycleNumber, product.id'); |
|
|
->groupBy('distribution.cycleNumber, product.id'); |
|
|
|
|
|
|
|
|
//TODO vérifier ou est utilisé cette fonction ??? |
|
|
//TODO vérifier ou est utilisé cette fonction ??? |
|
|
|
|
|
|
|
|
|
|
|
dump($query->find()); |
|
|
return $query->find(); |
|
|
return $query->find(); |
|
|
} |
|
|
} |
|
|
|
|
|
|