|
|
|
|
|
|
|
|
$query = $this->findByMerchantQuery(); |
|
|
$query = $this->findByMerchantQuery(); |
|
|
$query = $this->filterOrderValid($query); |
|
|
$query = $this->filterOrderValid($query); |
|
|
$query->andWhere('e.weekNumber = :weekNumber'); |
|
|
$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->andWhere('e.mainOrderShop = false OR e.mainOrderShop IS NULL'); |
|
|
$query->setParameter('weekNumber', $weekNumber); |
|
|
$query->setParameter('weekNumber', $weekNumber); |
|
|
$query->orderBy('e.weekId', 'DESC'); |
|
|
$query->orderBy('e.weekId', 'DESC'); |