Merge pull request #614 from mohitsinha/new-develop

Stop creating unnecessary overdue charge when amount is 0.
This commit is contained in:
Angel Cajas
2019-07-24 10:53:26 -06:00
committed by GitHub
5 changed files with 76 additions and 3 deletions
@@ -2490,6 +2490,9 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
final LoanCharge loanCharge = LoanCharge.createNewFromJson(loan, chargeDefinition, command, entry.getValue());
if (BigDecimal.ZERO.compareTo(loanCharge.amount()) == 0) {
continue;
}
LoanOverdueInstallmentCharge overdueInstallmentCharge = new LoanOverdueInstallmentCharge(loanCharge, installment,
entry.getKey());
loanCharge.updateOverdueInstallmentCharge(overdueInstallmentCharge);