Browse Source

Merge branch 'develop'

master
Fab 4 years ago
parent
commit
d59dc9a099
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      ShopBundle/Repository/OrderShopRepository.php

+ 4
- 4
ShopBundle/Repository/OrderShopRepository.php View File

$query->andWhere('e.weekDeliveryTruck = :weekDeliveryTruck')->setParameter('weekDeliveryTruck', $params['weekDeliveryTruck']); $query->andWhere('e.weekDeliveryTruck = :weekDeliveryTruck')->setParameter('weekDeliveryTruck', $params['weekDeliveryTruck']);
} }


if(isset($params['deliveryDate'])) {
$query->andWhere('e.deliveryDate >= :deliveryDateStart');
$query->andWhere('e.deliveryDate < :deliveryDateEnd');
$date = clone $params['deliveryDate'];
if(isset($params['estimatedDeliveryDateTime'])) {
$query->andWhere('e.estimatedDeliveryDateTime >= :deliveryDateStart');
$query->andWhere('e.estimatedDeliveryDateTime < :deliveryDateEnd');
$date = clone $params['estimatedDeliveryDateTime'];
$query->setParameter('deliveryDateStart', $date->format('Y-m-d 00:00:00')); $query->setParameter('deliveryDateStart', $date->format('Y-m-d 00:00:00'));
$query->setParameter('deliveryDateEnd', $date->modify('+1 day')->format('Y-m-d 00:00:00')); $query->setParameter('deliveryDateEnd', $date->modify('+1 day')->format('Y-m-d 00:00:00'));
} }

Loading…
Cancel
Save