Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- <?php
-
- namespace Lc\CaracoleBundle\Repository\File;
-
- use App\Entity\Address\Address;
- 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();
- }
-
- public function getByBuyerAddress(Address $buyerAddress)
- {
- $query = $this->query->create();
-
- $query
- ->filterByBuyerAddress($buyerAddress);
-
- return $query->find();
- }
-
- }
|