@@ -255,7 +255,7 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt | |||
$query = $this->findByMerchantQuery(); | |||
$query = $this->filterOrderValid($query); | |||
$query->andWhere('e.mainOrderShop = false OR e.mainOrderShop IS NULL'); | |||
$query->orderBy('e.validationDate', 'DESC'); | |||
$query->orderBy('e.weekId', 'DESC'); | |||
$query->setMaxResults(1); | |||
return $query->getQuery()->getOneOrNullResult(); |