}
private AccountingTransaction internalProcessInstallment(User user, Account fromAccount, Account toAccount,
EntryDTO entryDTO, GratuityEventWithPaymentPlan event, AccountingTransactionDetailDTO transactionDetail) {
final EntryWithInstallmentDTO entryWithInstallmentDTO = (EntryWithInstallmentDTO) entryDTO;
if (!transactionDetail.isSibsTransactionDetail()) {
checkIfCanAddAmountForInstallment(entryWithInstallmentDTO, transactionDetail.getWhenRegistered(), event);
}
event.changeInstallmentPaymentCodeState(entryWithInstallmentDTO.getInstallment(),
event.getPaymentCodeStateFor(transactionDetail.getPaymentMode()));
return makeAccountingTransactionForInstallment(user, event, fromAccount, toAccount, getEntryType(),
entryDTO.getAmountToPay(), (entryWithInstallmentDTO).getInstallment(), transactionDetail);