|
|
@@ -196,29 +196,42 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt |
|
|
|
} |
|
|
|
|
|
|
|
$setParameterHorsTournee = false ; |
|
|
|
$setParameterGiftVoucher = false ; |
|
|
|
|
|
|
|
if (isset($params['isCircuit'])) { |
|
|
|
if(isset($params['isCircuit'])) { |
|
|
|
$query->leftJoin('e.deliveryPointSale', 'pointSale'); |
|
|
|
$query->andWhere('e.deliveryPointSale IS NULL OR (pointSale.isDepository = 0 AND (pointSale.devAlias IS NULL OR pointSale.devAlias != :devAliasHorsTournee))'); |
|
|
|
$query->andWhere('e.deliveryPointSale IS NULL OR (pointSale.isDepository = 0 AND (pointSale.devAlias IS NULL OR (pointSale.devAlias != :devAliasHorsTournee AND pointSale.devAlias != :devAliasGiftVoucher)))'); |
|
|
|
$setParameterHorsTournee = true ; |
|
|
|
$setParameterGiftVoucher = true ; |
|
|
|
} |
|
|
|
|
|
|
|
if (isset($params['isDepository'])) { |
|
|
|
if(isset($params['isDepository'])) { |
|
|
|
$query->innerJoin('e.deliveryPointSale', 'pointSale'); |
|
|
|
$query->andWhere('pointSale IS NOT NULL AND pointSale.isDepository = 1 AND (pointSale.devAlias IS NULL OR pointSale.devAlias != :devAliasHorsTournee)'); |
|
|
|
$query->andWhere('pointSale IS NOT NULL AND pointSale.isDepository = 1 AND (pointSale.devAlias IS NULL OR (pointSale.devAlias != :devAliasHorsTournee AND pointSale.devAlias != :devAliasGiftVoucher))'); |
|
|
|
$setParameterHorsTournee = true ; |
|
|
|
$setParameterGiftVoucher = true ; |
|
|
|
} |
|
|
|
|
|
|
|
if (isset($params['isOffCircuit'])) { |
|
|
|
if(isset($params['isOffCircuit'])) { |
|
|
|
$query->innerJoin('e.deliveryPointSale', 'pointSale'); |
|
|
|
$query->andWhere('pointSale IS NOT NULL AND pointSale.devAlias = :devAliasHorsTournee'); |
|
|
|
$setParameterHorsTournee = true ; |
|
|
|
} |
|
|
|
|
|
|
|
if(isset($params['isGiftVoucher'])) { |
|
|
|
$query->innerJoin('e.deliveryPointSale', 'pointSale'); |
|
|
|
$query->andWhere('pointSale IS NOT NULL AND pointSale.devAlias = :devAliasGiftVoucher'); |
|
|
|
$setParameterGiftVoucher = true ; |
|
|
|
} |
|
|
|
|
|
|
|
if($setParameterHorsTournee) { |
|
|
|
$query->setParameter('devAliasHorsTournee', 'horstournee') ; |
|
|
|
} |
|
|
|
|
|
|
|
if($setParameterGiftVoucher) { |
|
|
|
$query->setParameter('devAliasGiftVoucher', 'giftvoucher') ; |
|
|
|
} |
|
|
|
|
|
|
|
if (isset($params['deliveryAvailability'])) { |
|
|
|
$deliveryAvailability = $params['deliveryAvailability'] ; |
|
|
|
|
|
|
@@ -249,7 +262,6 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt |
|
|
|
$query->orderBy('e.id', 'DESC'); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (isset($params['groupBy'])) { |
|
|
|
$query->groupBy( $params['groupBy']); |
|
|
|
} |