Merge branch 'master' into Feature/authorize/program-manager

This commit is contained in:
2025-12-07 18:22:56 +03:30
2 changed files with 7 additions and 6 deletions

View File

@@ -446,7 +446,7 @@ public class RollCallApplication : IRollCallApplication
return operation.Failed("کارمند در بازه انتخاب شده مرخصی ساعتی دارد");
}
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate.Value.Date >= y.StartDateGr.Date && x.EndDate.Value.Date <= y.EndDateGr.Date)))
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
@@ -486,7 +486,8 @@ public class RollCallApplication : IRollCallApplication
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate.Value.Date >= y.StartDateGr.Date
&& x.EndDate.Value.Date <= y.EndDateGr.Date)))
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
@@ -630,7 +631,7 @@ public class RollCallApplication : IRollCallApplication
return operation.Failed("کارمند در بازه انتخاب شده مرخصی ساعتی دارد");
}
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate.Value.Date >= y.StartDateGr.Date && x.EndDate.Value.Date <= y.EndDateGr.Date)))
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
@@ -662,7 +663,7 @@ public class RollCallApplication : IRollCallApplication
&& (y.StartDate.Value.Date <= x.ContractEndGr.Date))))
return operation.Failed("برای بازه های وارد شده فیش حقوقی ثبت شده است");
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate >= y.StartDateGr && x.EndDate <= y.EndDateGr)))
if (newRollCallDates == null || !newRollCallDates.All(x => employeeStatuses.Any(y => x.StartDate.Value.Date >= y.StartDateGr.Date && x.EndDate.Value.Date <= y.EndDateGr.Date)))
return operation.Failed("کارمند در بازه وارد شده غیر فعال است");
var currentDayRollCall = employeeRollCalls.FirstOrDefault(x => x.EndDate == null);

View File

@@ -2397,7 +2397,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
selectedPlan.TotalPayment = res.Monthly.TotalAmount;
selectedPlan.Obligation = res.Monthly.Obligation;
selectedPlan.OneMonthPaymentDiscounted = res.Monthly.PaymentAmount;
selectedPlan.OneMonthPaymentDiscounted = res.Monthly.OneMonthAmount;
selectedPlan.DailyCompenseation = (res.Monthly.OneMonthAmount.MoneyToDouble() * 0.10).ToMoney();
}
else
@@ -2422,7 +2422,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
};
selectedPlan.TotalPayment = res.OneTime.TotalAmount;
selectedPlan.Obligation = res.OneTime.Obligation;
selectedPlan.OneMonthPaymentDiscounted = res.OneTime.PaymentAmount;
selectedPlan.OneMonthPaymentDiscounted = res.OneTime.OneMonthAmount;
selectedPlan.DailyCompenseation = (res.OneTime.OneMonthAmount.MoneyToDouble() * 0.10).ToMoney();
}