FINERACT-2354: [BE] chargeback handling with backdated re-age for last adjustment strategy with equal amortization re-aging behaviour

This commit is contained in:
Soma Sörös
2025-12-10 13:10:33 +01:00
committed by Adam Saghy
parent 1ad45759fd
commit fa5be3f5a5
6 changed files with 293 additions and 94 deletions
@@ -28,6 +28,7 @@ import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
@@ -518,8 +519,9 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
return this.installmentNumber.compareTo(o.installmentNumber);
}
public int compareToByDueDate(LoanRepaymentScheduleInstallment o) {
return this.dueDate.compareTo(o.dueDate);
public int compareToByFromDueDate(LoanRepaymentScheduleInstallment o) {
return Comparator.comparing(LoanRepaymentScheduleInstallment::getDueDate)
.thenComparing(LoanRepaymentScheduleInstallment::getFromDate).compare(this, o);
}
public boolean isPrincipalNotCompleted(final MonetaryCurrency currency) {