calculateFullPaymentCodeEndDate(), this, entryDTO.getAmountToPay(), entryDTO.getAmountToPay(),
student.getPerson());
}
private InstallmentPaymentCode createInstallmentPaymentCode(final EntryWithInstallmentDTO entry, final Student student) {
AccountingEventPaymentCode accountingEventPaymentCode =
findEquivalentPaymentCodeInStudentCandidacy(entry, InstallmentPaymentCode.class, student);
if (accountingEventPaymentCode != null) {
accountingEventPaymentCode.setAccountingEvent(this);
return (InstallmentPaymentCode) accountingEventPaymentCode;
}
return InstallmentPaymentCode.create(PaymentCodeType.GRATUITY_FIRST_INSTALLMENT, new YearMonthDay(),
calculateInstallmentPaymentCodeEndDate(entry.getInstallment()), this, entry.getInstallment(),