Skip to content

Commit

Permalink
Check for the right events for gratuity reminder
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiofbsilva committed Sep 9, 2018
1 parent 3f1196f commit dd30642
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
import org.fenixedu.academic.domain.ExecutionYear;
import org.fenixedu.academic.domain.Person;
import org.fenixedu.academic.domain.accounting.Event;
import org.fenixedu.academic.domain.accounting.events.AdministrativeOfficeFeeAndInsuranceEvent;
import org.fenixedu.academic.domain.accounting.events.gratuity.GratuityEvent;
import org.fenixedu.academic.domain.accounting.events.AdministrativeOfficeFeeEvent;
import org.fenixedu.academic.domain.alumni.CerimonyInquiryPerson;
import org.fenixedu.academic.domain.person.RoleType;
import org.fenixedu.academic.domain.student.Student;
Expand Down Expand Up @@ -217,9 +216,9 @@ && hasGratuityOrAdministrativeOfficeFeeAndInsuranceDebtsFor(userView.getPerson()
public static boolean hasGratuityOrAdministrativeOfficeFeeAndInsuranceDebtsFor(Person person,
final ExecutionYear executionYear) {
return person.getAnnualEventsFor(executionYear).stream()
.filter(annualEvent -> annualEvent instanceof GratuityEvent || annualEvent instanceof AdministrativeOfficeFeeAndInsuranceEvent)
.filter(annualEvent -> annualEvent.isGratuity() || annualEvent.isInsuranceEvent() || annualEvent
.isAdministrativeOfficeAndInsuranceEvent() || annualEvent instanceof AdministrativeOfficeFeeEvent)
.anyMatch(Event::isOpen);

}

private boolean isTeacherAndHasInquiriesToRespond(User userView) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</div>

<div align="center">
<a href="${pageContext.request.contextPath}/student/payments.do?method=showEvents" class="btn btn-default" tabindex="2"><bean:message bundle="APPLICATION_RESOURCES" key="label.view.payments"/></a>
<a href="${pageContext.request.contextPath}/owner-accounting-events" class="btn btn-default" tabindex="2"><bean:message bundle="APPLICATION_RESOURCES" key="label.view.payments"/></a>
<a href="${pageContext.request.contextPath}/home.do" class="btn btn-default" tabindex="1"><bean:message bundle="APPLICATION_RESOURCES" key="label.proceed"/></a>
</div>
</div>
Expand Down

0 comments on commit dd30642

Please sign in to comment.