|
- <?php
-
- namespace common\logic\PointSale\PointSale;
-
- use common\logic\BaseService;
- use common\logic\Document\Invoice\Invoice;
- use common\logic\RepositoryInterface;
-
- class InvoiceRepository extends BaseService implements RepositoryInterface
- {
- public function getDefaultOptionsSearch(): array
- {
- return [
- 'with' => [],
- 'join_with' => ['user AS user_invoice', 'producer'],
- 'orderby' => 'date ASC',
- 'attribute_id_producer' => 'invoice.id_producer'
- ];
- }
-
- public function findOneInvoiceById(int $id): ?Invoice
- {
- return Invoice::searchOne(['id' => $id]);
- }
- }
|