Browse Source

Gestion adresses

feature/export_comptable
Guillaume 4 years ago
parent
commit
2a3626fcf2
2 changed files with 5 additions and 1 deletions
  1. +1
    -1
      ShopBundle/Model/Document.php
  2. +4
    -0
      ShopBundle/Repository/OrderShopRepository.php

+ 1
- 1
ShopBundle/Model/Document.php View File

@@ -47,7 +47,7 @@ abstract class Document extends AbstractDocumentEntity implements FilterMerchant

/**
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\AddressInterface")
* @ORM\JoinColumn(nullable=false)
* @ORM\JoinColumn(nullable=true)
*/
protected $buyerAddress;


+ 4
- 0
ShopBundle/Repository/OrderShopRepository.php View File

@@ -154,6 +154,10 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
$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'])) {
$query->andWhere('e.mainOrderShop IS NULL');
$query->leftJoin('e.complementaryOrderShops', 'complementaryOrderShops');

Loading…
Cancel
Save