diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java index 55d8213fd02..95cdbe30d00 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java @@ -2304,6 +2304,29 @@ public void loanTransactionsTabCheck(DataTable table) { checkLoanTransactionTab(data, transactions, header, resourceId); } + @Then("Loan Transactions tab has the following new buy down fee amortization data:") + public void loanTransactionsTabCheckNewBuyDownFeeAmortization(DataTable table) { + PostLoansResponse loanCreateResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); + long loanId = loanCreateResponse.getLoanId(); + String resourceId = String.valueOf(loanId); + + List> expectedAmortization = testContext().get(TestContextKey.VERIFIED_LOAN_BUY_DOWN_FEE_AMORTIZATION); + if (expectedAmortization == null) { + expectedAmortization = new ArrayList<>(); + testContext().set(TestContextKey.VERIFIED_LOAN_BUY_DOWN_FEE_AMORTIZATION, expectedAmortization); + } + + List transactions = getBuyDownFeeAmortizationTransactions(loanId); + List> data = table.asLists(); + expectedAmortization.addAll(data.subList(1, data.size())); + List header = table.row(0); + + checkLoanTransactionTabRows(expectedAmortization, transactions, header, resourceId); + assertThat(transactions.size()) + .as(ErrorMessageHelper.nrOfLinesWrongInTransactionsTab(resourceId, transactions.size(), expectedAmortization.size())) + .isEqualTo(expectedAmortization.size()); + } + @Then("Loan Transactions tab has the following new accrual data:") public void loanTransactionsTabCheckNewAccruals(DataTable table) { PostLoansResponse loanCreateResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); @@ -2396,6 +2419,24 @@ public List getAccrualTransactions(Long loanId) { .filter(lt -> isLoanTransactionAccrual(lt) || isLoanTransactionAccrualAdjustment(lt)).toList(); } + public List getBuyDownFeeAmortizationTransactions(Long loanId) { + GetLoansLoanIdResponse loanDetailsResponse = ok(() -> fineractClient.loans().retrieveLoan(loanId, + Map.of("staffInSelectedOfficeOnly", "false", "associations", "transactions"))); + return loanDetailsResponse.getTransactions().stream() + .filter(lt -> isLoanTransactionBuyDownFeeAmortization(lt) || isLoanTransactionBuyDownFeeAmortizationAdjustment(lt)) + .toList(); + } + + private boolean isLoanTransactionBuyDownFeeAmortization(GetLoansLoanIdTransactions lt) { + assert lt.getType() != null; + return "Buy Down Fee Amortization".equalsIgnoreCase(lt.getType().getValue()); + } + + private boolean isLoanTransactionBuyDownFeeAmortizationAdjustment(GetLoansLoanIdTransactions lt) { + assert lt.getType() != null; + return "Buy Down Fee Amortization Adjustment".equalsIgnoreCase(lt.getType().getValue()); + } + public void checkLoanTransactionTabRows(List> data, List transactions, List header, String resourceId) { for (int i = 1; i < data.size(); i++) { diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java index 2b3f9be13ee..f4489f59eb9 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java @@ -309,6 +309,7 @@ public abstract class TestContextKey { public static final String ORIGINATOR_SECOND_CREATE_RESPONSE = "originatorSecondCreateResponse"; public static final String ORIGINATOR_SECOND_EXTERNAL_ID = "originatorSecondExternalId"; public static final String VERIFIED_LOAN_ACCRUALS = "VERIFIED_LOAN_ACCRUALS"; + public static final String VERIFIED_LOAN_BUY_DOWN_FEE_AMORTIZATION = "VERIFIED_LOAN_BUY_DOWN_FEE_AMORTIZATION"; public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INT_DAILY_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_FULL_TERM_TRANCHE_DOWNPAYMENT = "loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationDailyMultidisburseFullTermTrancheDownPayment"; public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INT_DAILY_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_FULL_TERM_TRANCHE_DOWNPAYMENT_AUTO = "loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationDailyMultidisburseFullTermTrancheDownPaymentAuto"; public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INT_DAILY_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_FULL_TERM_TRANCHE_DEFERRED_INCOME = "loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationDailyMultidisburseFullTermTrancheDeferredIncome"; diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanBuyDownFees.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanBuyDownFees.feature index 161024f8fe8..96df09f7488 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanBuyDownFees.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanBuyDownFees.feature @@ -3691,36 +3691,36 @@ Feature:Feature: Buy Down Fees | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | | 01 January 2024 | Buy Down Fee | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | - | 01 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 01 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 02 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | + | 02 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.044 | 0.0 | 0.0 | 0.0 | false | | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 03 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 03 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 04 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 04 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 05 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | + | 05 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.044 | 0.0 | 0.0 | 0.0 | false | | 06 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 06 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 06 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 07 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 07 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 08 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | + | 08 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.044 | 0.0 | 0.0 | 0.0 | false | | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 09 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 09 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 10 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 10 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 11 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | + | 11 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.044 | 0.0 | 0.0 | 0.0 | false | | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 12 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 12 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 13 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 13 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 14 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 14 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | + | 14 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.044 | 0.0 | 0.0 | 0.0 | false | | 15 January 2024 | Buy Down Fee Adjustment | 0.3 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 15 January 2024 | Buy Down Fee Amortization | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | + | 15 January 2024 | Buy Down Fee Amortization | 0.01 | 0.0 | 0.011 | 0.0 | 0.0 | 0.0 | false | And Loan Amortization Allocation Mapping for "BUY_DOWN_FEE" transaction created on "01 January 2024" contains the following data: | Date | Type | Amount | | 01 January 2024 | AM | 0.03 | @@ -3748,38 +3748,38 @@ Feature:Feature: Buy Down Fees | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | | 01 January 2024 | Buy Down Fee | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | - | 01 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 01 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 02 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | + | 02 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.044 | 0.0 | 0.0 | 0.0 | false | | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 03 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 03 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 04 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 04 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 05 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | + | 05 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.044 | 0.0 | 0.0 | 0.0 | false | | 06 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 06 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 06 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 07 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 07 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 08 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | + | 08 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.044 | 0.0 | 0.0 | 0.0 | false | | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 09 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 09 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 10 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 10 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 11 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | + | 11 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.044 | 0.0 | 0.0 | 0.0 | false | | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 12 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 12 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 13 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | + | 13 January 2024 | Buy Down Fee Amortization | 0.03 | 0.0 | 0.033 | 0.0 | 0.0 | 0.0 | false | | 14 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 14 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | + | 14 January 2024 | Buy Down Fee Amortization | 0.04 | 0.0 | 0.044 | 0.0 | 0.0 | 0.0 | false | | 15 January 2024 | Buy Down Fee Adjustment | 0.3 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 15 January 2024 | Buy Down Fee Amortization | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | + | 15 January 2024 | Buy Down Fee Amortization | 0.01 | 0.0 | 0.011 | 0.0 | 0.0 | 0.0 | false | | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | - | 16 January 2024 | Buy Down Fee Amortization | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | + | 16 January 2024 | Buy Down Fee Amortization | 0.02 | 0.0 | 0.022 | 0.0 | 0.0 | 0.0 | false | | 16 January 2024 | Charge-off | 100.38 | 100.0 | 0.38 | 0.0 | 0.0 | 0.0 | false | | 16 January 2024 | Buy Down Fee Amortization | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 | false | And Loan Amortization Allocation Mapping for "BUY_DOWN_FEE" transaction created on "01 January 2024" contains the following data: @@ -4078,3 +4078,88 @@ Feature:Feature: Buy Down Fees When Loan Pay-off is made on "16 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + + ## ISSUE: Buydown amortizes slower after waiver-reversal + @TestRailId:CXXXX + Scenario: Verify Buy Down Fee Amortization Works correctly after Buy Down Fee Adjustment Reversal + ##Create and disburse a loan for 3-month period with buydown fees enabled (2026/03/11). + When Admin sets the business date to "11 March 2026" + And Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_PROGRESSIVE_ADVANCED_PAYMENT_ALLOCATION_BUYDOWN_FEES | 11 March 2026 | 1500 | 9.99 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "11 March 2026" with "1500" amount and expected disbursement date on "11 March 2026" + And Admin successfully disburse the loan on "11 March 2026" with "1500" EUR transaction amount + Then Loan status will be "ACTIVE" + + ##Add 2 buydown fees transactions with the same amount (300 each). + When Admin adds buy down fee with "AUTOPAY" payment type to the loan on "11 March 2026" with "300" EUR transaction amount + When Admin adds buy down fee with "AUTOPAY" payment type to the loan on "11 March 2026" with "300" EUR transaction amount + + ##Run COB until 2026/04/11. + When Admin sets the business date to "12 March 2026" + Then Admin runs inline COB job for Loan + Then Loan Transactions tab has the following new buy down fee amortization data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 11 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "12 April 2026" + Then Admin runs inline COB job for Loan + Then Loan Transactions tab has the following new buy down fee amortization data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 12 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 16 March 2026 | Buy Down Fee Amortization | 6.54 | 0.0 | 6.54 | 0.0 | 0.0 | 0.0 | false | false | + | 17 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 18 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 19 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 20 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 21 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 22 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 23 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 24 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 25 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 26 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 27 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 28 March 2026 | Buy Down Fee Amortization | 6.54 | 0.0 | 6.54 | 0.0 | 0.0 | 0.0 | false | false | + | 29 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 30 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 31 March 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 02 April 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 03 April 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 04 April 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 05 April 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 06 April 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 07 April 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 08 April 2026 | Buy Down Fee Amortization | 6.54 | 0.0 | 6.54 | 0.0 | 0.0 | 0.0 | false | false | + | 09 April 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 10 April 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + | 11 April 2026 | Buy Down Fee Amortization | 6.52 | 0.0 | 6.52 | 0.0 | 0.0 | 0.0 | false | false | + + ##Waive the first buydown fees (2026/04/12). ( Buydown Fee Adjustment ) + Then Admin adds buy down fee adjustment with "AUTOPAY" payment type to the loan on "12 April 2026" with "300" EUR transaction amount + When Admin sets the business date to "13 April 2026" + + ##Run COB - This creates a buydown amortization adjustment (127.55) + Then Admin runs inline COB job for Loan + Then Loan Transactions tab has the following new buy down fee amortization data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 12 April 2026 | Buy Down Fee Amortization Adjustment | 101.09 | 0.0 | 101.09 | 0.0 | 0.0 | 0.0 | false | false | + + ##Reverse the waiver from Step 4 (2026/04/13) + When Customer undo "1"th "Buy Down Fee Adjustment" transaction made on "12 April 2026" + + ##ISSUE: Run COB - This creates a buydown amortization much lower than adjustment amount in step 5 (86.07) + When Admin sets the business date to "14 April 2026" + Then Admin runs inline COB job for Loan + Then Loan Transactions tab has the following new buy down fee amortization data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 13 April 2026 | Buy Down Fee Amortization | 114.13 | 0.0 | 114.13 | 0.0 | 0.0 | 0.0 | false | false | + + ##ISSUE: Run COB for following day as well - This creates amortization of 4.92, which is lower than the previous amount of 6.52 before waiver. + When Admin sets the business date to "12 June 2026" + Then Admin runs inline COB job for Loan