/// <summary> /// Determines whether [is not valid] [the specified delivery]. /// </summary> /// <param name="delivery">The delivery.</param> /// <returns> /// <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>. /// </returns> public bool IsNotValid(ILearningDelivery delivery) { var eligibilities = GetEligibilityItemsFor(delivery); return(_check.HasQualifyingStart(delivery, FirstViableDate) && eligibilities.Any(x => !string.IsNullOrEmpty(x.Code)) && !HasQualifyingEligibility(delivery, GetONSPostcodes(delivery), eligibilities)); }
/// <summary> /// Determines whether [is not valid] [the specified delivery]. /// </summary> /// <param name="delivery">The delivery.</param> /// <param name="learner">The learner.</param> /// <returns> /// <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>. /// </returns> public bool IsNotValid(ILearningDelivery delivery, ILearner learner) => !IsExcluded(delivery) && _check.HasQualifyingFunding(delivery, TypeOfFunding.AdultSkills, TypeOfFunding.OtherAdult, TypeOfFunding.EuropeanSocialFund) && _check.HasQualifyingStart(delivery, FirstViableDate) && InReceiptOfAnotherStateBenefit(delivery, learner) && HasDisqualifyingLearningCategory(delivery);
/// <summary> /// Determines whether [is qualifying primary learning aim] [this delivery]. /// </summary> /// <param name="thisDelivery">this delivery.</param> /// <returns> /// <c>true</c> if [is qualifying primary learning aim] [this delivery]; otherwise, <c>false</c>. /// </returns> public bool IsQualifyingPrimaryLearningAim(ILearningDelivery thisDelivery) => It.Has(thisDelivery) && _check.HasQualifyingStart(thisDelivery, DateTime.MinValue, OldCodeMonitoringThresholdDate) && _check.IsTraineeship(thisDelivery) && _check.InAProgramme(thisDelivery);
/// <summary> /// Determines whether [is not valid] [the specified delivery]. /// </summary> /// <param name="delivery">The delivery.</param> /// <returns> /// <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>. /// </returns> public bool IsNotValid(ILearningDelivery delivery) => _check.HasQualifyingStart(delivery, FirstViableDate) && HasDisqualifyingVocationalAim(delivery);
/// <summary> /// Determines whether the specified delivery is a candidate. /// </summary> /// <param name="delivery">The delivery.</param> /// <returns> /// <c>true</c> if the specified delivery is a candidate; otherwise, <c>false</c>. /// </returns> public bool IsACandidate(ILearningDelivery delivery) => _check.InApprenticeship(delivery) && _check.InAProgramme(delivery) && _check.HasQualifyingStart(delivery, FirstViableDate);
/// <summary> /// Returns true if ... is valid. /// </summary> /// <param name="delivery">The delivery.</param> /// <returns> /// <c>true</c> if the specified delivery is valid; otherwise, <c>false</c>. /// </returns> public bool PassesRestrictions(ILearningDelivery delivery) => _check.HasQualifyingFunding(delivery, TypeOfFunding.AdultSkills) && _check.HasQualifyingStart(delivery, FirstViableDate);
/// <summary> /// Determines whether [has qualifying start] [the specified this delivery]. /// </summary> /// <param name="thisDelivery">this delivery.</param> /// <param name="allocations">The allocations.</param> /// <returns> /// <c>true</c> if [has qualifying start] [the specified this delivery]; otherwise, <c>false</c>. /// </returns> public bool HasQualifyingStart(ILearningDelivery thisDelivery, IReadOnlyCollection <ILARSStandardValidity> allocations) => allocations.SafeAny(x => _check.HasQualifyingStart(thisDelivery, x.StartDate));
/// <summary> /// Determines whether [has qualifying start] [this delivery]. /// </summary> /// <param name="thisDelivery">this delivery.</param> /// <returns> /// <c>true</c> if [has qualifying start] [this delivery]; otherwise, <c>false</c>. /// </returns> public bool HasQualifyingStart(ILearningDelivery thisDelivery) => _check.HasQualifyingStart(thisDelivery, DateTime.MinValue, LastViableDate);
/// <summary> /// Determines whether [is not valid] [the specified delivery]. /// </summary> /// <param name="delivery">The delivery.</param> /// <returns> /// <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>. /// </returns> public bool IsNotValid(ILearningDelivery delivery) => _check.HasQualifyingStart(delivery, FirstViableDate) && HasKnownLDCSCode(delivery) && HasQualifyingPCTLDCSNull(delivery.LearningDeliveryHEEntity);
/// <summary> /// Determines whether [is restriction match] [the specified delivery]. /// </summary> /// <param name="delivery">The delivery.</param> /// <returns> /// <c>true</c> if [is restriction match] [the specified delivery]; otherwise, <c>false</c>. /// </returns> public bool IsRestrictionMatch(ILearningDelivery delivery) => _check.IsTraineeship(delivery) && _check.InAProgramme(delivery) && _check.HasQualifyingStart(delivery, NewCodeMonitoringThresholdDate);
/// <summary> /// Determines whether [is not valid] [the specified employment status]. /// </summary> /// <param name="employmentStatus">The employment status.</param> /// <returns> /// <c>true</c> if [is not valid] [the specified employment status]; otherwise, <c>false</c>. /// </returns> public bool IsNotValid(ILearnerEmploymentStatus employmentStatus) => _check.HasQualifyingStart(employmentStatus, FirstViableDate) && IsQualifyingEmployment(employmentStatus) && HasDisqualifyingIndicator(employmentStatus);
/// <summary> /// Determines whether [has qualifying start] [the specified this delivery]. /// </summary> /// <param name="thisDelivery">this delivery.</param> /// <param name="allocation">The allocation.</param> /// <returns> /// <c>true</c> if [has qualifying start] [the specified this delivery]; otherwise, <c>false</c>. /// </returns> public bool HasQualifyingStart(ILearningDelivery thisDelivery, IFcsContractAllocation allocation) => It.Has(allocation) && It.Has(allocation.StartDate) && _check.HasQualifyingStart(thisDelivery, allocation.StartDate.Value);
/// <summary> /// Determines whether [has qualifying start] [the specified this delivery]. /// </summary> /// <param name="thisDelivery">this delivery.</param> /// <param name="requiredStart">required start.</param> /// <returns> /// <c>true</c> if [has qualifying start] [the specified this delivery]; otherwise, <c>false</c>. /// </returns> public bool HasQualifyingStart(ILearningDelivery thisDelivery, DateTime?requiredStart) => It.IsEmpty(requiredStart) || _check.HasQualifyingStart(thisDelivery, requiredStart.Value);
/// <summary> /// Determines whether [is not valid] [the specified delivery]. /// </summary> /// <param name="delivery">The delivery.</param> /// <returns> /// <c>true</c> if [is not valid] [the specified delivery]; otherwise, <c>false</c>. /// </returns> public bool IsNotValid(ILearningDelivery delivery) => !IsExcluded(delivery) && _check.HasQualifyingFunding(delivery, TypeOfFunding.AdultSkills) && _check.HasQualifyingStart(delivery, FirstViableDate) && !HasQualifyingNotionalNVQ(delivery);
/// <summary> /// Determines whether [has qualifying start] [this delivery]. /// </summary> /// <param name="thisDelivery">this delivery.</param> /// <returns> /// <c>true</c> if [has qualifying start] [this delivery]; otherwise, <c>false</c>. /// </returns> public bool HasQualifyingStart(ILearningDelivery thisDelivery) => _check.HasQualifyingStart(thisDelivery, FirstViableDate, LastViableDate);