Parcourir la source

Correctifs backoffice

feature/export_comptable
Fab il y a 4 ans
Parent
révision
20514b08d9
2 fichiers modifiés avec 15 ajouts et 14 suppressions
  1. +15
    -11
      ShopBundle/Repository/OrderShopRepository.php
  2. +0
    -3
      ShopBundle/Resources/translations/lcshop.fr.yaml

+ 15
- 11
ShopBundle/Repository/OrderShopRepository.php Voir le fichier

@@ -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 Voir le fichier

@@ -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

Chargement…
Annuler
Enregistrer