Fix attendances module

This commit is contained in:
Kheireddine Mehdi
2024-12-12 14:28:54 +01:00
parent 8b42ed6c24
commit f70bf3341b

View File

@@ -319,7 +319,7 @@ public class DailyReportServiceImpl implements DailyReportService {
if (dailyReport.getAbsence() == null) {
Absence absence = Beans.get(AbsenceRepository.class)
.all()
.filter("self.employee = :employee and self.startDate <= :reportDate and self.endDate >= :reportDate and (archived = false or archived is null)")
.filter("self.employee = :employee and self.startDate <= :reportDate and self.endDate >= :reportDate and (self.archived = false or self.archived is null)")
.bind("employee", employee)
.bind("reportDate",reportDate) // Changed from absenceStartDate and absenceEndDate to reportDate
.fetchOne();