Quellcode durchsuchen

Frontend : factures

feature/export_comptable
Guillaume vor 4 Jahren
Ursprung
Commit
c24703846e
2 geänderte Dateien mit 10 neuen und 0 gelöschten Zeilen
  1. +8
    -0
      ShopBundle/Repository/DocumentRepository.php
  2. +2
    -0
      ShopBundle/Services/Order/OrderUtils.php

+ 8
- 0
ShopBundle/Repository/DocumentRepository.php Datei anzeigen

@@ -20,4 +20,12 @@ class DocumentRepository extends BaseRepository implements DefaultRepositoryInte
{
return DocumentInterface::class;
}

public function findLastInvoice()
{
$query = $this->findByMerchantQuery();
$query->orderBy('e.createdAt', 'DESC');
$query->setMaxResults(1);
return $query->getQuery()->getOneOrNullResult();
}
}

+ 2
- 0
ShopBundle/Services/Order/OrderUtils.php Datei anzeigen

@@ -46,6 +46,7 @@ class OrderUtils
protected $orderShopRepo;
protected $reductionCreditRepo ;
protected $orderReductionCreditRepo ;
protected $documentRepo ;
protected $priceUtils;
protected $productFamilyUtils;
protected $documentUtils;
@@ -63,6 +64,7 @@ class OrderUtils
$this->orderShopRepo = $this->em->getRepository($this->em->getClassMetadata(OrderShopInterface::class)->getName());
$this->reductionCreditRepo = $this->em->getRepository($this->em->getClassMetadata(ReductionCreditInterface::class)->getName());
$this->orderReductionCreditRepo = $this->em->getRepository($this->em->getClassMetadata(OrderReductionCreditInterface::class)->getName());
$this->documentRepo = $this->em->getRepository($this->em->getClassMetadata(DocumentInterface::class)->getName());
$this->priceUtils = $priceUtils;
$this->productFamilyUtils = $productFamilyUtils;
$this->documentUtils = $documentUtils;

Laden…
Abbrechen
Speichern