Skip to content

Commit

Permalink
Merge pull request #526 from SkillsFundingAgency/CON-399-stop-date-ru…
Browse files Browse the repository at this point in the history
…le-changes

CON-399-stop-date-rule-changes
  • Loading branch information
Ashley-Bass authored Jul 3, 2019
2 parents 9ff0993 + 524d764 commit ae4fa37
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,14 @@ private void ValidateChangeDateForStop(DateTime dateOfChange, Apprenticeship app
if ( dateOfChange.Date < apprenticeship.StartDate.Value.Date)
throw new ValidationException("Invalid Date of Change. Date cannot be before the training start date.");

if ( apprenticeship.PaymentStatus != PaymentStatus.PendingApproval &&
_academicYearValidator.Validate(dateOfChange.Date) == AcademicYearValidationResult.NotWithinFundingPeriod)
if (apprenticeship.PaymentStatus != PaymentStatus.Withdrawn)
{
throw new ValidationException("Invalid Date of Change. Date cannot be before the academic year start date.");
}


if (apprenticeship.PaymentStatus != PaymentStatus.PendingApproval &&
_academicYearValidator.Validate(dateOfChange.Date) == AcademicYearValidationResult.NotWithinFundingPeriod)
{
throw new ValidationException("Invalid Date of Change. Date cannot be before the academic year start date.");
}
}
}
}

Expand Down

0 comments on commit ae4fa37

Please sign in to comment.