Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | public function getLatestStockMovementIdOnAReport(ReportConfigurationInterface $reportConfiguration = null): int |
||
19 | { |
||
20 | $qb = $this->createQueryBuilder('r'); |
||
21 | $qb->select('MAX(s.id)') |
||
22 | ->join('r.stockMovements', 's') |
||
23 | ; |
||
24 | |||
25 | if (null !== $reportConfiguration) { |
||
26 | $qb->andWhere('r.reportConfiguration = :reportConfiguration') |
||
27 | ->setParameter('reportConfiguration', $reportConfiguration) |
||
28 | ; |
||
29 | } |
||
30 | |||
31 | return (int) $qb->getQuery()->getSingleScalarResult(); |
||
32 | } |
||
44 |