|
|
|
|
|
|
|
|
$query->andWhere('e.user = :user')->setParameter('user', $params['user']); |
|
|
$query->andWhere('e.user = :user')->setParameter('user', $params['user']); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(isset($params['address'])) { |
|
|
|
|
|
$query->andWhere('e.deliveryAddress = :address OR e.invoiceAddress = :address')->setParameter('address', $params['address']); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
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'); |