// --------------------------------------------------------------------------- // called from Translator_AJAX public String filterJobDetail(String selectedJobPosition, String selectedSuffix) throws InstantiationException, org.openeai.config.EnterpriseConfigurationObjectException { m_position = selectedJobPosition; m_suffix = selectedSuffix; String retVal = new String("<p>Job Assignment record is not available for retroactive job change.</p>"); JobAssignment selectedJobAssignment = selectJobAssignment(m_filteredJobAssignments); if (selectedJobAssignment == null) { return retVal; } else { Vector allJobDetails = new Vector(); int howmanyJDs = selectedJobAssignment.getJobDetailLength(); logger.debug( "Translator_RetroJobChange:filterJobDetail, number of job changes for selected job assignment ==> " + howmanyJDs); // If there is no job detail, give error. if (howmanyJDs <= 0) { retVal = "<p>No Job Details record found for Historical Job Change.</p>"; } else { // The job details are listed in descending order of personnel change date. // We want to allow the user to change any job detail that have not yet been paid on. for (int i = 0; i < howmanyJDs; i++) { JobDetail jobDetail = selectedJobAssignment.getJobDetail(i); try { if (datesCompare( jobDetail.getEffectiveDate().toDate(), "after", selectedJobAssignment.getLastPaidDate()) || datesCompare( jobDetail.getEffectiveDate().toDate(), "equals", selectedJobAssignment.getBaseJobData().getStartDate())) { continue; } } catch (Exception e) { continue; } allJobDetails.add(jobDetail); } retVal = setTableSorterJD(allJobDetails); } // If there were no job details selected, give error. if (allJobDetails.size() <= 0) { retVal = "<p>No Job Details records found for Historical Job Change.</p>"; } } return retVal; }