Browse Source

Correctifs backoffice

feature/export_comptable
Fab 4 years ago
parent
commit
20514b08d9
2 changed files with 15 additions and 14 deletions
  1. +15
    -11
      ShopBundle/Repository/OrderShopRepository.php
  2. +0
    -3
      ShopBundle/Resources/translations/lcshop.fr.yaml

+ 15
- 11
ShopBundle/Repository/OrderShopRepository.php View File

@@ -186,16 +186,25 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
if (isset($params['deliveryAvailability'])) {
$deliveryAvailability = $params['deliveryAvailability'] ;

$isDeliveryAvailabilityZone = ($deliveryAvailability instanceof DeliveryAvailabilityZone) ? true : false;
$isDeliveryAvailabilityPointSale = ($deliveryAvailability instanceof DeliveryAvailabilityPointSale) ? true : false;
$deliveryAvailabilityZone = ($deliveryAvailability instanceof DeliveryAvailabilityZone) ? $deliveryAvailability : false;
$deliveryAvailabilityPointSale = ($deliveryAvailability instanceof DeliveryAvailabilityPointSale) ? $deliveryAvailability : false;

if($isDeliveryAvailabilityZone) {
$query->innerJoin('e.deliveryAvailabilityZone','deliveryAvailabilityZone') ;
if($deliveryAvailabilityZone){
$query->andWhere('e.deliveryAvailabilityZone = :deliveryAvailabilityZone');
$query->setParameter('deliveryAvailabilityZone', $deliveryAvailabilityZone);
}

if($isDeliveryAvailabilityPointSale) {
$query->innerJoin('e.deliveryAvailabilityPointSale','deliveryAvailabilityPointSale') ;
if($deliveryAvailabilityPointSale) {
$query->andWhere('e.deliveryAvailabilityZone = :deliveryAvailabilityZone');
$query->setParameter('deliveryAvailabilityZone', $deliveryAvailabilityPointSale);
}

}else{
$query->leftJoin('e.deliveryAvailabilityZone', 'deliveryAvailabilityZone');
$query->leftJoin('deliveryAvailabilityZone.deliverySlot', 'deliverySlotZone');

$query->leftJoin('e.deliveryAvailabilityPointSale', 'deliveryAvailabilityPointSale');
$query->leftJoin('deliveryAvailabilityPointSale.deliverySlot', 'deliverySlotPointSale');
}

if (isset($params['orderBy'])) {
@@ -204,11 +213,6 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
$query->orderBy('e.id', 'DESC');
}

$query->leftJoin('e.deliveryAvailabilityZone', 'deliveryAvailabilityZone');
$query->leftJoin('deliveryAvailabilityZone.deliverySlot', 'deliverySlotZone');

$query->leftJoin('e.deliveryAvailabilityPointSale', 'deliveryAvailabilityPointSale');
$query->leftJoin('deliveryAvailabilityPointSale.deliverySlot', 'deliverySlotPointSale');

if (isset($params['count']) && $params['count']) {
return $query->getQuery()->getSingleScalarResult();

+ 0
- 3
ShopBundle/Resources/translations/lcshop.fr.yaml View File

@@ -56,10 +56,7 @@ group:
addRedeliveryOrderProduct: Ajouter une relivraison
payment: Historique des transactions
documents: Documents
<<<<<<< HEAD
=======
selectUser: Sélectionner un utilisateur
>>>>>>> 6b6e276b17d407c5909cae3079b616d6ccc8a286
deliveryAddress: Adresse de livraison
Ticket:
listMessages: Liste des messages

Loading…
Cancel
Save