fix logic for employee checkout validation in AdminMonthlyOverviewRepository
This commit is contained in:
@@ -94,7 +94,7 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
|
||||
|
||||
|
||||
var workshopIds = workshopsWithContractingParty.Select(x => x.Workshop.id).ToList();
|
||||
|
||||
|
||||
|
||||
// پیدا کردن کارگاههایی که قبلاً برای این ماه/سال AdminMonthlyOverview دارند
|
||||
var adminMonthlyOverviewWorkshopIds = await _companyContext.AdminMonthlyOverviews
|
||||
@@ -382,7 +382,7 @@ public class AdminMonthlyOverviewRepository : RepositoryBase<long, AdminMonthlyO
|
||||
.Where(workshopId =>
|
||||
{
|
||||
var group = workingCheckoutGrouping.FirstOrDefault(x => x.Key == workshopId);
|
||||
return group == null || group.All(emp => contractSet.Contains((emp.WorkshopId, emp.EmployeeId)));
|
||||
return group == null || group.All(emp => checkoutSet.Contains((emp.WorkshopId, emp.EmployeeId)));
|
||||
})
|
||||
.ToList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user