if (person.getTeacher() != null && !person.getTeacher().isMonitor(ExecutionPeriod.readActualExecutionPeriod())) { return person.getTeacher().getTeacherNumber(); }
    public Integer getMostSignificantNumber() {        if (getParty().isPerson()) {            Person person = (Person) getParty();            if (person.getTeacher() != null                    && !person.getTeacher().isMonitor(ExecutionPeriod.readActualExecutionPeriod())) {                return person.getTeacher().getTeacherNumber();            }            if (person.getEmployee() != null && person.getEmployee().getCurrentWorkingContract() != null                    && person.getTeacher() == null) {                return person.getEmployee().getEmployeeNumber();            }            if (person.getStudent() != null) {                DegreeType degreeType = person.getStudent().getMostSignificantDegreeType();                Collection<Registration> registrations = person.getStudent()                        .getRegistrationsByDegreeType(degreeType);                for (Registration registration : registrations) {                    StudentCurricularPlan scp = registration.getActiveStudentCurricularPlan();                    if (scp != null) {                        return person.getStudent().getNumber();                    }                }            }            if (person.getGrantOwner() != null && person.getGrantOwner().hasCurrentContract()) {                return person.getGrantOwner().getNumber();            }        }        return 0;    }