public bool IsBasicSkillsLearner(ILearningDelivery delivery, ILARSLearningDelivery larsLearningDelivery) { var annualValues = _larsData.GetAnnualValuesFor(delivery.LearnAimRef); return(_dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, larsLearningDelivery.EffectiveFrom, larsLearningDelivery.EffectiveTo ?? DateTime.MaxValue) && annualValues.Any(IsBasicSkillsLearner)); }
public ILARSStandardFunding GetStandardFundingFor(int standardCode, DateTime startDate) { var standard = _larsData.GetStandardFor(standardCode); return(standard?.StandardsFunding .NullSafeWhere(sf => _dateTimeQueryService.IsDateBetween(startDate, sf.EffectiveFrom, sf.EffectiveTo ?? DateTime.MaxValue)) .OrderBy(x => x.EffectiveTo) // get the earliest closure first .FirstOrDefault()); }
public bool IsBasicSkillsLearner(ILearningDelivery delivery) { var larsLearningDelivery = _larsDataService.GetDeliveryFor(delivery.LearnAimRef); if (larsLearningDelivery == null) { return(true); } return(_dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, larsLearningDelivery.EffectiveFrom, larsLearningDelivery.EffectiveTo ?? DateTime.MaxValue) && _larsDataService.BasicSkillsTypeMatchForLearnAimRef(_basicSkillTypes, delivery.LearnAimRef)); }
public bool HasQualifyingStart(ILearningDelivery thisDelivery, DateTime?requiredStart) => !requiredStart.HasValue || _dateTimeQueryService.IsDateBetween(thisDelivery.LearnStartDate, requiredStart.Value, DateTime.MaxValue);
public bool HasQualifyingStart(ILearningDelivery theDelivery) => _dateTimeQueryService.IsDateBetween(theDelivery.LearnStartDate, FirstViableStart, DateTime.MaxValue);
public bool HasQualifyingStart(ILearningDelivery thisDelivery, IReadOnlyCollection <ILARSStandardValidity> allocations) => allocations.NullSafeAny(x => _dateTimeQueryService.IsDateBetween(thisDelivery.LearnStartDate, x.StartDate, DateTime.MaxValue));
public bool IsNotValid(ILearningDelivery delivery, ILearner learner) => !IsExcluded(delivery) && _fundModels.Contains(delivery.FundModel) && _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue) && InReceiptOfAnotherStateBenefit(delivery, learner) && HasDisqualifyingLearningCategory(delivery);
public bool IsNotValid(ILearningDelivery delivery) => !IsExcluded(delivery) && delivery.FundModel == FundModels.AdultSkills && _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue) && HasQualifyingNotionalNVQ(delivery);
public bool IsACandidate(ILearningDelivery delivery) => _dd07.IsApprenticeship(delivery.ProgTypeNullable) && delivery.AimType == AimTypes.ProgrammeAim && _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue);
public bool IsQualifyingPrimaryLearningAim(ILearningDelivery thisDelivery) => thisDelivery != null && _dateTimeQueryService.IsDateBetween(thisDelivery.LearnStartDate, DateTime.MinValue, OldCodeMonitoringThresholdDate) && thisDelivery.ProgTypeNullable == ProgTypes.Traineeship && thisDelivery.AimType == AimTypes.ProgrammeAim;
public bool HasQualifyingDates(ILearningDelivery delivery) => _dateTimeQueryService.IsDateBetween(delivery.OrigLearnStartDateNullable.Value, DateTime.MinValue, delivery.LearnStartDate, false);
public bool IsNotValid(ILearnerEmploymentStatus employmentStatus) => employmentStatus != null && _dateTimeQueryService.IsDateBetween(employmentStatus.DateEmpStatApp, FirstViableDate, DateTime.MaxValue) && IsQualifyingEmployment(employmentStatus) && HasDisqualifyingIndicator(employmentStatus);
public bool HasQualifyingStart(ILearningDelivery thisDelivery, IFcsContractAllocation allocation) => allocation != null && allocation.StartDate.HasValue && _dateTimeQueryService.IsDateBetween(thisDelivery.LearnStartDate, allocation.StartDate.Value, DateTime.MaxValue);
public bool IsNotValid(ILearningDelivery delivery) => _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue) && HasDisqualifyingVocationalAim(delivery);
public bool IsCurrent(ILARSFrameworkAim frameworkAim, DateTime candidateStart) => _dateTimeQueryService.IsDateBetween(candidateStart, DateTime.MinValue, frameworkAim.EndDate ?? DateTime.MaxValue, true);
public bool PassesRestrictions(ILearningDelivery delivery) => delivery.FundModel == FundModels.AdultSkills && _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue) && HasQualifyingNotionalNVQ(delivery);
public bool IsViableStart(ILearningDelivery delivery) => _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, LastViableDate);
public bool HasQualifyingStart(ILearningDelivery thisDelivery) => _dateTimeQueryService.IsDateBetween(thisDelivery.LearnStartDate, DateTime.MinValue, LastViableDate);
public bool IsRestrictionMatch(ILearningDelivery delivery) => delivery.ProgTypeNullable == ProgTypes.Traineeship && delivery.AimType == AimTypes.ProgrammeAim && _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, NewCodeMonitoringThresholdDate, DateTime.MaxValue);
public bool LARSExclusionCondition(ILARSLearningDelivery larsLearningDelivery, DateTime learnStartDate) { return(_dateTimeQueryService.IsDateBetween(learnStartDate, larsLearningDelivery.EffectiveFrom, larsLearningDelivery.EffectiveTo ?? DateTime.MaxValue) && _larsDataService.GetAnnualValuesFor(larsLearningDelivery.LearnAimRef).Any(la => _basicSkillTypes.Contains(la.BasicSkillsType))); }
public bool IsNotValid(ILearningDelivery delivery) => _dateTimeQueryService.IsDateBetween(delivery.LearnStartDate, FirstViableDate, DateTime.MaxValue) && HasKnownLDCSCode(delivery) && HasQualifyingPCTLDCSNull(delivery.LearningDeliveryHEEntity);