fix: rework document and disposition workflow
This commit is contained in:
@@ -225,13 +225,21 @@ class DispositionRepository extends ServiceEntityRepository
|
||||
return $qb
|
||||
->innerJoin('disposition.assignment', 'assignment')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->where($qb->expr()->orX(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->isNotNull('assignment.dateTo'),
|
||||
$qb->expr()->lte('assignment.dateTo', ':dateTo')
|
||||
),
|
||||
$qb->expr()->lte('destination.dateTo', ':dateTo')
|
||||
->where($qb->expr()->andX(
|
||||
$qb->expr()->in('disposition.status', ':status'),
|
||||
$qb->expr()->orX(
|
||||
$qb->expr()->andX(
|
||||
$qb->expr()->isNotNull('assignment.dateTo'),
|
||||
$qb->expr()->lte('assignment.dateTo', ':dateTo')
|
||||
),
|
||||
$qb->expr()->lte('destination.dateTo', ':dateTo')
|
||||
)
|
||||
))
|
||||
->setParameter('status', [
|
||||
Disposition::STATUS_NEW,
|
||||
Disposition::STATUS_CHECKING_CONTRACT,
|
||||
Disposition::STATUS_CONFIRMED,
|
||||
])
|
||||
->setParameter('dateTo', new \DateTimeImmutable())
|
||||
->getQuery()
|
||||
->getResult()
|
||||
|
||||
Reference in New Issue
Block a user