Browse Source

Correctif weekNumber year

develop
Fab 3 years ago
parent
commit
799437f12f
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      ShopBundle/Repository/OrderShopRepository.php

+ 3
- 0
ShopBundle/Repository/OrderShopRepository.php View File

@@ -312,6 +312,9 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
$query = $this->findByMerchantQuery();
$query = $this->filterOrderValid($query);
$query->andWhere('e.weekNumber = :weekNumber');
$currentYear = new \DateTime();
$currentYear->setDate($currentYear->format('Y'), 1, 1);
$query->andWhere('e.validationDate >= :now')->setParameter('now', $currentYear);
$query->andWhere('e.mainOrderShop = false OR e.mainOrderShop IS NULL');
$query->setParameter('weekNumber', $weekNumber);
$query->orderBy('e.weekId', 'DESC');

Loading…
Cancel
Save