setAmount(installment.getAmount());
setStartDate(installment.getStartDate());
setEndDate(installment.getEndDate());
if (installment instanceof InstallmentWithMonthlyPenalty) {
InstallmentWithMonthlyPenalty installmentWithPenalty = (InstallmentWithMonthlyPenalty) installment;
setMaxMonthsToApplyPenalty(installmentWithPenalty.getMaxMonthsToApplyPenalty());
if (!(installment instanceof InstallmentForFirstTimeStudents)) {
setWhenToStartApplyPenalty(installmentWithPenalty.getWhenStartToApplyPenalty());
}
setMontlyPenaltyPercentage(installmentWithPenalty.getPenaltyPercentage());
}
if (installment instanceof PartialRegimeInstallment) {
PartialRegimeInstallment partialInstallment = (PartialRegimeInstallment) installment;