Esempio n. 1
0
 public LoanRepaymentScheduleInstallment fetchRepaymentInstallment(final Money trasferedAmount) {
   for (final LoanInstallmentCharge loanChargePerInstallment : this.loanInstallmentCharge) {
     if (loanChargePerInstallment.isPending()
         && trasferedAmount
             .getAmount()
             .equals(
                 loanChargePerInstallment
                     .getAmountThroughChargePayment(trasferedAmount.getCurrency())
                     .getAmount())) {
       return loanChargePerInstallment.getRepaymentInstallment();
     }
   }
   return null;
 }
Esempio n. 2
0
 public LoanInstallmentCharge getUnpaidInstallmentLoanCharge() {
   LoanInstallmentCharge unpaidChargePerInstallment = null;
   for (final LoanInstallmentCharge loanChargePerInstallment : this.loanInstallmentCharge) {
     if (loanChargePerInstallment.isPending()
         && (unpaidChargePerInstallment == null
             || unpaidChargePerInstallment
                 .getRepaymentInstallment()
                 .getDueDate()
                 .isAfter(loanChargePerInstallment.getRepaymentInstallment().getDueDate()))) {
       unpaidChargePerInstallment = loanChargePerInstallment;
     }
   }
   return unpaidChargePerInstallment;
 }