Merge pull request #614 from mohitsinha/new-develop
Stop creating unnecessary overdue charge when amount is 0.
This commit is contained in:
+3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user