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



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



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

$query->andWhere('e.user = :user')->setParameter('user', $params['user']); $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'])) { if (isset($params['mergeComplementaryOrderShops'])) {
$query->andWhere('e.mainOrderShop IS NULL'); $query->andWhere('e.mainOrderShop IS NULL');
$query->leftJoin('e.complementaryOrderShops', 'complementaryOrderShops'); $query->leftJoin('e.complementaryOrderShops', 'complementaryOrderShops');

Loading…
Cancel
Save