mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
SocialWorkRepository: on search by accompanying period, enlarge the dateranges for take into account work with same endDate / startDate
Close https://gitlab.com/Chill-Projet/chill-bundles/-/issues/144
This commit is contained in:
parent
74e25e706e
commit
981be7b363
@ -122,7 +122,7 @@ final class AccompanyingPeriodWorkRepository implements ObjectRepository
|
|||||||
. ")";
|
. ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql .= " AND daterange(:after::date, :before::date) && daterange(w.startDate, w.endDate)";
|
$sql .= " AND daterange(:after::date, :before::date) && daterange(w.startDate, w.endDate, '[]')";
|
||||||
|
|
||||||
// if the start and end date were inversed, we inverse the order to avoid an error
|
// if the start and end date were inversed, we inverse the order to avoid an error
|
||||||
if (null !== ($filters['after'] ?? null) && null !== ($filters['before']) && $filters['after'] > $filters['before']) {
|
if (null !== ($filters['after'] ?? null) && null !== ($filters['before']) && $filters['after'] > $filters['before']) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user