Add Reward To checkout Completed

This commit is contained in:
gozareshgir
2026-01-24 18:57:53 +03:30
parent 69f4819bf6
commit c97ea5356f
7 changed files with 15 additions and 4 deletions

View File

@@ -5202,7 +5202,7 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
public List<RewardViewModel> RewardForCheckout(long employeeId, long workshopId, DateTime checkoutEnd,
DateTime checkoutStart)
{
return _context.Rewards.Where(x =>
var result = _context.Rewards.Where(x =>
x.WorkshopId == workshopId && x.EmployeeId == employeeId && x.GrantDate <= checkoutEnd &&
x.GrantDate >= checkoutStart).Select(x => new RewardViewModel
{
@@ -5215,6 +5215,8 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
IsActive = x.IsActive,
Id = x.id
}).ToList();
return result;
}
private List<FineViewModel> FinesForCheckout(long employeeId, long workshopId, DateTime contractStart,