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

if (isset($params['deliveryAvailability'])) { if (isset($params['deliveryAvailability'])) {
$deliveryAvailability = $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'])) { if (isset($params['orderBy'])) {
$query->orderBy('e.id', 'DESC'); $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']) { if (isset($params['count']) && $params['count']) {
return $query->getQuery()->getSingleScalarResult(); return $query->getQuery()->getSingleScalarResult();

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

addRedeliveryOrderProduct: Ajouter une relivraison addRedeliveryOrderProduct: Ajouter une relivraison
payment: Historique des transactions payment: Historique des transactions
documents: Documents documents: Documents
<<<<<<< HEAD
=======
selectUser: Sélectionner un utilisateur selectUser: Sélectionner un utilisateur
>>>>>>> 6b6e276b17d407c5909cae3079b616d6ccc8a286
deliveryAddress: Adresse de livraison deliveryAddress: Adresse de livraison
Ticket: Ticket:
listMessages: Liste des messages listMessages: Liste des messages

Loading…
Cancel
Save