|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function findLastOrderValid() |
|
|
|
|
|
{ |
|
|
|
|
|
$query = $this->findByMerchantQuery(); |
|
|
|
|
|
$query = $this->filterOrderValid($query); |
|
|
|
|
|
$query->andWhere('e.mainOrderShop = false OR e.mainOrderShop IS NULL'); |
|
|
|
|
|
$query->orderBy('e.validationDate', 'DESC'); |
|
|
|
|
|
$query->setMaxResults(1); |
|
|
|
|
|
|
|
|
|
|
|
return $query->getQuery()->getOneOrNullResult(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function countValidOrderProductsOfWeekByProduct($weekNumber, $productId) |
|
|
public function countValidOrderProductsOfWeekByProduct($weekNumber, $productId) |
|
|
{ |
|
|
{ |
|
|
$query = $this->findByMerchantQuery(); |
|
|
$query = $this->findByMerchantQuery(); |