@@ -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(); | |||
} | |||
} |
@@ -349,6 +349,7 @@ class OrderUtils | |||
public function createDocumentInvoice(OrderShopInterface $orderShop) | |||
{ | |||
//TODO set invoiceNumber | |||
$merchantAddress = $orderShop->getMerchant()->getAddress(); | |||
$buyerAddress = $orderShop->getInvoiceAddress(); | |||