From c5c79a96293511c352d5ccd67c9476cceb89a1a5 Mon Sep 17 00:00:00 2001 From: SamSys Date: Sat, 19 Apr 2025 20:34:16 +0330 Subject: [PATCH] report bug fixed --- CompanyManagment.EFCore/Repository/ReportRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CompanyManagment.EFCore/Repository/ReportRepository.cs b/CompanyManagment.EFCore/Repository/ReportRepository.cs index ee61b69f..adfb2a3e 100644 --- a/CompanyManagment.EFCore/Repository/ReportRepository.cs +++ b/CompanyManagment.EFCore/Repository/ReportRepository.cs @@ -1605,7 +1605,7 @@ public class ReportRepository : IReportRepository x.StartWorkDate <= nextMonthEnd && x.LeftWorkDate > nextMonthStart); var allContractLeftworkEmployeeIds = allContractLeftworks.Select(x => x.EmployeeId).ToList(); var allContractCreated = _context.Contracts - .Where(x => allContractLeftworkEmployeeIds.Contains(x.EmployeeId)) + .Where(x => allContractLeftworkEmployeeIds.Contains(x.EmployeeId) && x.WorkshopIds == workshopId) .Where(x => x.ContarctStart.Date <= nextMonthEnd.Date && x.ContractEnd.Date > nextMonthStart.Date && x.IsActiveString == "true"); var allContractCreatedEmoployeeIds = allContractCreated.Select(x => x.EmployeeId).ToList(); @@ -1737,7 +1737,7 @@ public class ReportRepository : IReportRepository x.StartWorkDate <= currentMonthEnd && x.LeftWorkDate > currentMonthStart); var allContractLeftworkEmployeeIds = allContractLeftworks.Select(x => x.EmployeeId).ToList(); var allContractCreated = _context.CheckoutSet - .Where(x => allContractLeftworkEmployeeIds.Contains(x.EmployeeId)) + .Where(x => allContractLeftworkEmployeeIds.Contains(x.EmployeeId) && x.WorkshopId == workshopId) .Where(x => x.ContractStart.Date <= currentMonthEnd.Date && x.ContractEnd.Date > currentMonthStart.Date && x.IsActiveString == "true"); var allContractCreatedEmoployeeIds = allContractCreated.Select(x => x.EmployeeId).ToList();