FINERACT-2355: Fix charge off and loan charge for zero installments
This commit is contained in:
committed by
Adam Saghy
parent
7378aea0b2
commit
33c74abeb7
+4
@@ -914,6 +914,10 @@ public class LoanTransaction extends AbstractAuditableWithUTCDateTimeCustom<Long
|
||||
retainMappings.add(newMapping);
|
||||
}
|
||||
}
|
||||
|
||||
if (retainMappings != null) {
|
||||
retainMappings.removeIf(LoanTransactionToRepaymentScheduleMapping::isZeroAmount);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateLoanChargePaidMappings(final Collection<LoanChargePaidBy> updatedMappings) {
|
||||
|
||||
+4
@@ -141,4 +141,8 @@ public class LoanTransactionToRepaymentScheduleMapping extends AbstractPersistab
|
||||
return Money.of(currency, this.penaltyChargesPortion);
|
||||
}
|
||||
|
||||
public boolean isZeroAmount() {
|
||||
return this.amount == null || this.amount.compareTo(BigDecimal.ZERO) == 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user