Skip to content

Commit

Permalink
Fix ShiftFreeLog shift date filter. ref #727. closes #943
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Aug 8, 2023
1 parent db02be0 commit 8e6c749
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AppBundle/Controller/ShiftFreeLogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ public function indexAction(Request $request)
->setParameter('created_at', $filter['created_at']->format('Y-m-d'));
}
if ($filter["shift_start_date"]) {
$qb = $qb->andWhere("DATE_FORMAT(sfl.start, '%Y-%m-%d') = :shift_start_date")
$qb = $qb->leftJoin('sfl.shift', 's')
->andWhere("DATE_FORMAT(s.start, '%Y-%m-%d') = :shift_start_date")
->setParameter('shift_start_date', $filter['shift_start_date']->format('Y-m-d'));
}
if ($filter["beneficiary"]) {
Expand Down

0 comments on commit 8e6c749

Please sign in to comment.