|
1234567891011121314151617181920212223242526272829303132333435 |
- <?php
-
- namespace Lc\CaracoleBundle\Repository\File;
-
- use Lc\CaracoleBundle\Repository\MerchantStoreTrait;
- use Lc\SovBundle\Repository\AbstractStore;
-
- class DocumentStore extends AbstractStore
- {
- use MerchantStoreTrait;
-
- protected DocumentRepositoryQuery $query;
-
- public function __construct(DocumentRepositoryQuery $query)
- {
- $this->query = $query;
- }
-
- public function getOneLatestByType(string $documentType)
- {
- // @TODO : à écrire
- }
-
- //findLastInvoice
- public function getOneLastInvoice()
- {
- $query = $this->query->create();
-
- $query
- ->filterByMerchant($this->merchant)
- ->orderBy('.createdAt', 'DESC');
-
- return $query->findOne();
- }
- }
|