FINERACT-2181: Fix fully paid check on EmiModel
This commit is contained in:
+2
@@ -108,6 +108,8 @@ final class LoanTransactionsApiResourceSwagger {
|
||||
public List<GetLoanProductsChargeOffReasonOptions> chargeOffReasonOptions;
|
||||
|
||||
public List<GetPaymentTypeOptions> paymentTypeOptions;
|
||||
@Schema(example = "200.000000")
|
||||
public Double netDisbursalAmount;
|
||||
}
|
||||
|
||||
public static final class GetLoanCurrency {
|
||||
|
||||
+6
-1
@@ -30,6 +30,7 @@ import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -1025,7 +1026,7 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
|
||||
}
|
||||
|
||||
public void copyFrom(final LoanRepaymentScheduleInstallment installment) {
|
||||
if (getId().equals(installment.getId())) {
|
||||
if (nonNullAndEqual(getId(), installment.getId())) {
|
||||
return;
|
||||
}
|
||||
// Reset balances
|
||||
@@ -1149,4 +1150,8 @@ public class LoanRepaymentScheduleInstallment extends AbstractAuditableWithUTCDa
|
||||
}
|
||||
setLoanTransactionToRepaymentScheduleMappings(retainedTransactionRepaymentScheduleMapping);
|
||||
}
|
||||
|
||||
private static boolean nonNullAndEqual(Object a, Object b) {
|
||||
return a != null && b != null && Objects.equals(a, b);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user