}
private InvocationResult verifyConditionsToCreateAdministrativeOfficeFeeAndInsuranceEvent(
final StudentCurricularPlan studentCurricularPlan, final ExecutionYear executionYear) {
final InvocationResult result = new InvocationResult().setSuccess(false);
final Registration registration = studentCurricularPlan.getRegistration();
if (verifyCommonConditionsToCreateGratuityAndAdministrativeOfficeEvents(executionYear, studentCurricularPlan,
registration)) {
if (!acceptedDegreeTypesForAdministrativeOfficeFeeAndInsuranceEvent.contains(studentCurricularPlan.getDegreeType())) {
result.addMessage(
LabelFormatter.APPLICATION_RESOURCES,
"error.accounting.events.AccountingEventsManager.cannot.create.administrativeoffice.fee.and.insurance.event.for.degree.type",
studentCurricularPlan.getDegree().getPresentationName());
return result;
}
result.setSuccess(true);
} else {
result.addMessage(
LabelFormatter.APPLICATION_RESOURCES,
"error.accounting.events.AccountingEventsManager.registration.for.student.does.not.respect.requirements.to.create.administrativeoffice.fee.and.insurance.event",
studentCurricularPlan.getRegistration().getStudent().getNumber().toString(), studentCurricularPlan
.getDegree().getPresentationName());
}