Browse Source

Processus de commande

feature/export_comptable
Fab 4 years ago
parent
commit
438e4a91a2
2 changed files with 12 additions and 0 deletions
  1. +11
    -0
      ShopBundle/Repository/OrderShopRepository.php
  2. +1
    -0
      ShopBundle/Services/Order/OrderUtils.php

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

@@ -158,4 +158,15 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
return $query->getQuery()->getResult() ;
}
}

public function findLastOrderValidOfWeek($weekNumber){
$query = $this->findByMerchantQuery();
$query = $this->filterOrderValid($query);
$query->andWhere('e.weekNumber = :weekNumber');
$query->setParameter('weekNumber', $weekNumber);
$query->orderBy('e.validationDate','DESC');

return $query->getQuery()->getOneOrNullResult();

}
}

+ 1
- 0
ShopBundle/Services/Order/OrderUtils.php View File

@@ -349,6 +349,7 @@ class OrderUtils

public function createDocumentInvoice(OrderShopInterface $orderShop)
{
//TODO set invoiceNumber
$merchantAddress = $orderShop->getMerchant()->getAddress();
$buyerAddress = $orderShop->getInvoiceAddress();


Loading…
Cancel
Save