Browse Source

Merge branch 'develop'

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

+ 8
- 0
ShopBundle/Repository/OrderShopRepository.php View File

$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'));
} }


if(isset($params['deliveryDate'])) {
$query->andWhere('e.deliveryDate >= :deliveryDateStart');
$query->andWhere('e.deliveryDate < :deliveryDateEnd');
$date = clone $params['deliveryDate'];
$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'));
}

if (isset($params['mergeComplementaryOrderShops'])) { if (isset($params['mergeComplementaryOrderShops'])) {
$query->andWhere('e.mainOrderShop IS NULL'); $query->andWhere('e.mainOrderShop IS NULL');
$query->leftJoin('e.complementaryOrderShops', 'complementaryOrderShops'); $query->leftJoin('e.complementaryOrderShops', 'complementaryOrderShops');

Loading…
Cancel
Save