FINERACT-2148: Process monetary transaction after zero interest charge-off.
This commit is contained in:
committed by
Adam Saghy
parent
23850a1b73
commit
faaf44d91a
+4
-3
@@ -1175,6 +1175,7 @@ public class AdvancedPaymentScheduleTransactionProcessor extends AbstractLoanRep
|
||||
if (LoanChargeOffBehaviour.ZERO_INTEREST.equals(loanTransaction.getLoan().getLoanProductRelatedDetail().getChargeOffBehaviour())
|
||||
&& !loanTransaction.isReversed()) {
|
||||
handleZeroInterestChargeOff(loanTransaction, progressiveTransactionCtx);
|
||||
progressiveTransactionCtx.setChargedOff(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1583,7 +1584,7 @@ public class AdvancedPaymentScheduleTransactionProcessor extends AbstractLoanRep
|
||||
transactionMappings, loanTransaction, oldestPastDueInstallment, currency);
|
||||
Loan loan = loanTransaction.getLoan();
|
||||
if (transactionCtx instanceof ProgressiveTransactionCtx ctx && loan.isInterestBearing()
|
||||
&& loan.getLoanProductRelatedDetail().isInterestRecalculationEnabled()) {
|
||||
&& loan.getLoanProductRelatedDetail().isInterestRecalculationEnabled() && !ctx.isChargedOff()) {
|
||||
paidPortion = handlingPaymentAllocationForInterestBearingProgressiveLoan(loanTransaction,
|
||||
transactionAmountUnprocessed, balances, paymentAllocationType, oldestPastDueInstallment, ctx,
|
||||
loanTransactionToRepaymentScheduleMapping, oldestPastDueInstallmentCharges);
|
||||
@@ -1605,7 +1606,7 @@ public class AdvancedPaymentScheduleTransactionProcessor extends AbstractLoanRep
|
||||
transactionMappings, loanTransaction, dueInstallment, currency);
|
||||
Loan loan = loanTransaction.getLoan();
|
||||
if (transactionCtx instanceof ProgressiveTransactionCtx ctx && loan.isInterestBearing()
|
||||
&& loan.getLoanProductRelatedDetail().isInterestRecalculationEnabled()) {
|
||||
&& loan.getLoanProductRelatedDetail().isInterestRecalculationEnabled() && !ctx.isChargedOff()) {
|
||||
paidPortion = handlingPaymentAllocationForInterestBearingProgressiveLoan(loanTransaction,
|
||||
transactionAmountUnprocessed, balances, paymentAllocationType, dueInstallment, ctx,
|
||||
loanTransactionToRepaymentScheduleMapping, dueInstallmentCharges);
|
||||
@@ -1636,7 +1637,7 @@ public class AdvancedPaymentScheduleTransactionProcessor extends AbstractLoanRep
|
||||
|
||||
Loan loan = loanTransaction.getLoan();
|
||||
if (transactionCtx instanceof ProgressiveTransactionCtx ctx && loan.isInterestBearing()
|
||||
&& loan.getLoanProductRelatedDetail().isInterestRecalculationEnabled()) {
|
||||
&& loan.getLoanProductRelatedDetail().isInterestRecalculationEnabled() && !ctx.isChargedOff()) {
|
||||
paidPortion = handlingPaymentAllocationForInterestBearingProgressiveLoan(loanTransaction, evenPortion,
|
||||
balances, paymentAllocationType, inAdvanceInstallment, ctx,
|
||||
loanTransactionToRepaymentScheduleMapping, inAdvanceInstallmentCharges);
|
||||
|
||||
+2
@@ -43,6 +43,8 @@ public class ProgressiveTransactionCtx extends TransactionCtx {
|
||||
private List<LoanTransaction> alreadyProcessedTransactions = new ArrayList<>();
|
||||
@Setter
|
||||
private Money sumOfInterestRefundAmount;
|
||||
@Setter
|
||||
private boolean isChargedOff = false;
|
||||
|
||||
public ProgressiveTransactionCtx(MonetaryCurrency currency, List<LoanRepaymentScheduleInstallment> installments,
|
||||
Set<LoanCharge> charges, MoneyHolder overpaymentHolder, ChangedTransactionDetail changedTransactionDetail,
|
||||
|
||||
Reference in New Issue
Block a user