diff --git a/api/src/main/java/ca/bc/gov/educ/api/grad/report/service/CommonService.java b/api/src/main/java/ca/bc/gov/educ/api/grad/report/service/CommonService.java index c7d87d13..8f95c688 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/grad/report/service/CommonService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/grad/report/service/CommonService.java @@ -745,7 +745,7 @@ private synchronized List getNextPageStudentsFromGradStud String paperType = e.getPaperType(); String certificateTypeCode = e.getCertificateTypeCode(); //either transcript or certificate codes ReportGradStudentData s = getReportGradStudentDataByGraduationStudentRecordIdFromList(e.getGraduationStudentRecordId(), studentsInBatch); - if(s != null && "CUR".equalsIgnoreCase(s.getStudentStatus())) { + if(s != null) { ReportGradStudentData dataResult = SerializationUtils.clone(s); dataResult.setPaperType(paperType); if ("YED4".equalsIgnoreCase(paperType)) { @@ -753,7 +753,12 @@ private synchronized List getNextPageStudentsFromGradStud } else { dataResult.setCertificateTypeCode(certificateTypeCode); } - result.add(dataResult); + if("YED4".equalsIgnoreCase(paperType) && "CUR".equalsIgnoreCase(s.getStudentStatus())) { + result.add(dataResult); + } + if (!"YED4".equalsIgnoreCase(paperType)) { + result.add(dataResult); + } } } return result;