Skip to content

Commit

Permalink
Changed field name in filter by closed deals
Browse files Browse the repository at this point in the history
  • Loading branch information
simba77 committed Dec 5, 2023
1 parent 64c99ee commit a348103
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Repository/DealRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,12 @@ public function getClosedDealsForUserByFilter(User $user, ?DealsFilterRequestDTO

if ($filter) {
if (! empty($filter->startDate)) {
$builder->andWhere('d.updatedAt >= :updated_at')
->setParameter('updated_at', Carbon::createFromFormat('d.m.Y', $filter->startDate)->setTime(0, 0));
$builder->andWhere('d.closingDate >= :closing_date_start')
->setParameter('closing_date_start', Carbon::createFromFormat('d.m.Y', $filter->startDate)->setTime(0, 0));
}
if (! empty($filter->endDate)) {
$builder->andWhere('d.updatedAt <= :updated_at')
->setParameter('updated_at', Carbon::createFromFormat('d.m.Y', $filter->endDate)->setTime(23, 59, 59));
$builder->andWhere('d.closingDate <= :closing_date_end')
->setParameter('closing_date_end', Carbon::createFromFormat('d.m.Y', $filter->endDate)->setTime(23, 59, 59));
}
}

Expand Down

0 comments on commit a348103

Please sign in to comment.