Browse Source

Frontend : factures

feature/export_comptable
Guillaume 4 years ago
parent
commit
c24703846e
2 changed files with 10 additions and 0 deletions
  1. +8
    -0
      ShopBundle/Repository/DocumentRepository.php
  2. +2
    -0
      ShopBundle/Services/Order/OrderUtils.php

+ 8
- 0
ShopBundle/Repository/DocumentRepository.php View File

{ {
return DocumentInterface::class; 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 View File

protected $orderShopRepo; protected $orderShopRepo;
protected $reductionCreditRepo ; protected $reductionCreditRepo ;
protected $orderReductionCreditRepo ; protected $orderReductionCreditRepo ;
protected $documentRepo ;
protected $priceUtils; protected $priceUtils;
protected $productFamilyUtils; protected $productFamilyUtils;
protected $documentUtils; protected $documentUtils;
$this->orderShopRepo = $this->em->getRepository($this->em->getClassMetadata(OrderShopInterface::class)->getName()); $this->orderShopRepo = $this->em->getRepository($this->em->getClassMetadata(OrderShopInterface::class)->getName());
$this->reductionCreditRepo = $this->em->getRepository($this->em->getClassMetadata(ReductionCreditInterface::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->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->priceUtils = $priceUtils;
$this->productFamilyUtils = $productFamilyUtils; $this->productFamilyUtils = $productFamilyUtils;
$this->documentUtils = $documentUtils; $this->documentUtils = $documentUtils;

Loading…
Cancel
Save