|
|
|
|
|
|
|
|
public function selectCount(): self |
|
|
public function selectCount(): self |
|
|
{ |
|
|
{ |
|
|
return $this |
|
|
return $this |
|
|
->addSelect('count(r.id) as total'); |
|
|
|
|
|
|
|
|
->select('count(r.id) as total'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterByUser(UserInterface $user): self |
|
|
public function filterByUser(UserInterface $user): self |
|
|
|
|
|
|
|
|
->setParameter('dateEnd', $dateEnd); |
|
|
->setParameter('dateEnd', $dateEnd); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterByEstimatedDeliveryDateStart(DateTime $dateStart): self |
|
|
|
|
|
|
|
|
public function filterByEstimatedDeliveryDateStart(string $dateStart): self |
|
|
{ |
|
|
{ |
|
|
return $this |
|
|
return $this |
|
|
->andWhere('.estimatedDeliveryDateTime >= :deliveryDateStart') |
|
|
->andWhere('.estimatedDeliveryDateTime >= :deliveryDateStart') |
|
|
->setParameter('deliveryDateStart', $dateStart); |
|
|
->setParameter('deliveryDateStart', $dateStart); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterByEstimatedDeliveryDateEnd(DateTime $dateEnd): self |
|
|
|
|
|
|
|
|
public function filterByEstimatedDeliveryDateEnd(string $dateEnd): self |
|
|
{ |
|
|
{ |
|
|
return $this |
|
|
return $this |
|
|
->andWhere('.estimatedDeliveryDateTime < :deliveryDateEnd') |
|
|
->andWhere('.estimatedDeliveryDateTime < :deliveryDateEnd') |
|
|
->setParameter('deliveryDateEnd', $dateEnd); |
|
|
->setParameter('deliveryDateEnd', $dateEnd); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterByDeliveryDateStart(DateTime $dateStart): self |
|
|
|
|
|
|
|
|
public function filterByDeliveryDateStart(string $dateStart): self |
|
|
{ |
|
|
{ |
|
|
return $this |
|
|
return $this |
|
|
->andWhere('.deliveryDate >= :deliveryDateStart') |
|
|
->andWhere('.deliveryDate >= :deliveryDateStart') |
|
|
->setParameter('deliveryDateStart', $dateStart); |
|
|
->setParameter('deliveryDateStart', $dateStart); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterByDeliveryDateEnd(DateTime $dateEnd): self |
|
|
|
|
|
|
|
|
public function filterByDeliveryDateEnd(string $dateEnd): self |
|
|
{ |
|
|
{ |
|
|
return $this |
|
|
return $this |
|
|
->andWhere('.deliveryDate < :deliveryDateEnd') |
|
|
->andWhere('.deliveryDate < :deliveryDateEnd') |
|
|
|
|
|
|
|
|
->setParameter('reductionCart', $reductionCart); |
|
|
->setParameter('reductionCart', $reductionCart); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterByAvailabilityPointZone(DeliveryAvailabilityZone $deliveryAvailabilityZone): self |
|
|
|
|
|
|
|
|
public function filterByAvailabilityPointZone(DeliveryAvailabilityPointSale $deliveryAvailabilityPointSale): self |
|
|
{ |
|
|
{ |
|
|
return $this |
|
|
return $this |
|
|
->andWhere('.deliveryAvailabilityZone = :deliveryAvailabilityZone') |
|
|
|
|
|
->setParameter('deliveryAvailabilityZone', $deliveryAvailabilityZone); |
|
|
|
|
|
|
|
|
->andWhere('.deliveryAvailabilityPointSale = :deliveryAvailabilityPointSale') |
|
|
|
|
|
->setParameter('deliveryAvailabilityPointSale', $deliveryAvailabilityPointSale); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function filterByAvailabilityPointSale(DeliveryAvailabilityPointSale $deliveryAvailabilityPointSale): self |
|
|
public function filterByAvailabilityPointSale(DeliveryAvailabilityPointSale $deliveryAvailabilityPointSale): self |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function joinDeliverySlotPointSale(): self |
|
|
public function joinDeliverySlotPointSale(): self |
|
|
{ |
|
|
{ |
|
|
$this->joinDeliveryAvailabilityZone(); |
|
|
|
|
|
|
|
|
$this->joinDeliveryAvailabilityPointSale(); |
|
|
|
|
|
|
|
|
if (!$this->isJoinDeliverySlotPointSale) { |
|
|
if (!$this->isJoinDeliverySlotPointSale) { |
|
|
$this->isJoinDeliverySlotPointSale = true; |
|
|
$this->isJoinDeliverySlotPointSale = true; |