Procházet zdrojové kódy

Frontend : factures

feature/export_comptable
Guillaume před 4 roky
rodič
revize
c24703846e
2 změnil soubory, kde provedl 10 přidání a 0 odebrání
  1. +8
    -0
      ShopBundle/Repository/DocumentRepository.php
  2. +2
    -0
      ShopBundle/Services/Order/OrderUtils.php

+ 8
- 0
ShopBundle/Repository/DocumentRepository.php Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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;

Načítá se…
Zrušit
Uložit