for (final InstallmentBean each : installmentsToCreate) {
if (paymentPlan.isForPartialRegime()) {
if (each.isPenaltyAppliable()) {
new PartialRegimeInstallment((FullGratuityPaymentPlanForPartialRegime) paymentPlan, each.getAmount(),
each.getStartDate(), each.getEndDate(), each.getMontlyPenaltyPercentage(),
each.getWhenToStartApplyPenalty(), each.getMaxMonthsToApplyPenalty(), each.getEctsForAmount(),
new ArrayList<>(each.getExecutionSemesters()));
} else {
new PartialRegimeInstallment((FullGratuityPaymentPlanForPartialRegime) paymentPlan, each.getAmount(),
each.getStartDate(), each.getEndDate(), each.getEctsForAmount(), new ArrayList<>(
each.getExecutionSemesters()));
}
} else if (paymentPlan.isForFirstTimeInstitutionStudents() && each.isForFirstTimeInstitutionStudents()) {