You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DocumentStore.php 739B

3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
3 년 전
1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\File;
  3. use Lc\CaracoleBundle\Repository\MerchantStoreTrait;
  4. use Lc\SovBundle\Repository\AbstractStore;
  5. class DocumentStore extends AbstractStore
  6. {
  7. use MerchantStoreTrait;
  8. protected DocumentRepositoryQuery $query;
  9. public function __construct(DocumentRepositoryQuery $query)
  10. {
  11. $this->query = $query;
  12. }
  13. public function getOneLatestByType(string $documentType)
  14. {
  15. // @TODO : à écrire
  16. }
  17. //findLastInvoice
  18. public function getOneLastInvoice()
  19. {
  20. $query = $this->query->create();
  21. $query
  22. ->filterByMerchant($this->merchant)
  23. ->orderBy('.createdAt', 'DESC');
  24. return $query->findOne();
  25. }
  26. }