mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
[person search] fix bug when using birhtdateafter and birthdate before on advanced search
This commit is contained in:
parent
e99b14b870
commit
54a4b48174
@ -11,7 +11,7 @@ and this project adheres to
|
|||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
<!-- write down unreleased development here -->
|
<!-- write down unreleased development here -->
|
||||||
|
* [person search] fix bug when using birthdate after and birthdate before
|
||||||
|
|
||||||
## Test releases
|
## Test releases
|
||||||
|
|
||||||
|
@ -180,14 +180,14 @@ final class PersonACLAwareRepository implements PersonACLAwareRepositoryInterfac
|
|||||||
|
|
||||||
if (null !== $birthdateBefore) {
|
if (null !== $birthdateBefore) {
|
||||||
$query->andWhereClause(
|
$query->andWhereClause(
|
||||||
'p.birthdate < ?::date',
|
'person.birthdate <= ?::date',
|
||||||
[$birthdateBefore->format('Y-m-d')]
|
[$birthdateBefore->format('Y-m-d')]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $birthdateAfter) {
|
if (null !== $birthdateAfter) {
|
||||||
$query->andWhereClause(
|
$query->andWhereClause(
|
||||||
'p.birthdate > ?::date',
|
'person.birthdate >= ?::date',
|
||||||
[$birthdateAfter->format('Y-m-d')]
|
[$birthdateAfter->format('Y-m-d')]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user