FINERACT-2281: fix unrecognized interest handling when first period is unpaid

This commit is contained in:
mark.vituska
2025-06-18 10:53:30 +02:00
committed by Adam Saghy
parent 4d56a4f230
commit 5649aa3ded
4 changed files with 373 additions and 73 deletions
@@ -6195,7 +6195,7 @@ Feature: LoanAccrualActivity
Then Loan Repayment schedule has 12 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 21 March 2025 | | 242.46 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 31 | 21 April 2025 | | 218.82 | 123.64 | 0.77 | 0.0 | 0.0 | 124.41 | 83.64 | 83.64 | 0.0 | 40.77 |
| 1 | 31 | 21 April 2025 | | 218.82 | 123.64 | 0.84 | 0.0 | 0.0 | 124.48 | 83.64 | 83.64 | 0.0 | 40.84 |
| 2 | 30 | 21 May 2025 | 21 March 2025 | 195.18 | 23.64 | 0.0 | 0.0 | 0.0 | 23.64 | 23.64 | 23.64 | 0.0 | 0.0 |
| 3 | 31 | 21 June 2025 | 21 March 2025 | 171.54 | 23.64 | 0.0 | 0.0 | 0.0 | 23.64 | 23.64 | 23.64 | 0.0 | 0.0 |
| 4 | 30 | 21 July 2025 | 21 March 2025 | 147.9 | 23.64 | 0.0 | 0.0 | 0.0 | 23.64 | 23.64 | 23.64 | 0.0 | 0.0 |
@@ -6209,7 +6209,7 @@ Feature: LoanAccrualActivity
| 12 | 28 | 21 March 2026 | 21 March 2025 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
And Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 342.46 | 0.77 | 0.0 | 0.0 | 343.23 | 302.46 | 302.46 | 0.0 | 40.77 |
| 342.46 | 0.84 | 0.0 | 0.0 | 343.3 | 302.46 | 302.46 | 0.0 | 40.84 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
@@ -6759,11 +6759,11 @@ Feature: LoanAccrualActivity
When Admin sets the business date to "29 April 2025"
And Admin runs inline COB job for Loan
And Customer makes "AUTOPAY" repayment on "29 April 2025" with 100 EUR transaction amount
Then Loan has 1.93 outstanding amount
Then Loan has 2.6 outstanding amount
Then Loan Repayment schedule has 12 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 21 March 2025 | | 242.46 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 31 | 21 April 2025 | | 222.26 | 120.2 | 1.93 | 0.0 | 0.0 | 122.13 |120.2 | 20.2 | 100.0| 1.93 |
| 1 | 31 | 21 April 2025 | | 222.26 | 120.2 | 2.6 | 0.0 | 0.0 | 122.8 |120.2 | 20.2 | 100.0| 2.6 |
| 2 | 30 | 21 May 2025 | 21 March 2025 | 202.06 | 20.2 | 0.0 | 0.0 | 0.0 | 20.2 | 20.2 | 20.2 | 0.0 | 0.0 |
| 3 | 31 | 21 June 2025 | 21 March 2025 | 181.86 | 20.2 | 0.0 | 0.0 | 0.0 | 20.2 | 20.2 | 20.2 | 0.0 | 0.0 |
| 4 | 30 | 21 July 2025 | 21 March 2025 | 161.66 | 20.2 | 0.0 | 0.0 | 0.0 | 20.2 | 20.2 | 20.2 | 0.0 | 0.0 |
@@ -6777,7 +6777,7 @@ Feature: LoanAccrualActivity
| 12 | 28 | 21 March 2026 | 21 March 2025 | 0.0 | 20.26 | 0.0 | 0.0 | 0.0 | 20.26 | 20.26 | 20.26 | 0.0 | 0.0 |
And Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 342.46 | 1.93 | 0.0 | 0.0 | 344.39 | 342.46 | 242.46 | 100.0 | 1.93 |
| 342.46 | 2.6 | 0.0 | 0.0 | 345.06 | 342.46 | 242.46 | 100.0 | 2.6 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
@@ -6798,13 +6798,13 @@ Feature: LoanAccrualActivity
Then Credit Balance Refund transaction on active loan "29 April 2025" with 100 EUR transaction amount will result an error
When Admin sets the business date to "06 May 2025"
And Admin runs inline COB job for Loan
And Customer makes "AUTOPAY" repayment on "06 May 2025" with 1.93 EUR transaction amount
And Customer makes "AUTOPAY" repayment on "06 May 2025" with 2.6 EUR transaction amount
Then Loan status will be "CLOSED_OBLIGATIONS_MET"
Then Loan has 0 outstanding amount
Then Loan Repayment schedule has 12 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 21 March 2025 | | 242.46 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 31 | 21 April 2025 | 06 May 2025 | 222.26 | 120.2 | 1.93 | 0.0 | 0.0 | 122.13 |122.13 | 20.2 | 101.93 | 0.0 |
| 1 | 31 | 21 April 2025 | 06 May 2025 | 222.26 | 120.2 | 2.6 | 0.0 | 0.0 | 122.8 |122.8 | 20.2 | 102.6 | 0.0 |
| 2 | 30 | 21 May 2025 | 21 March 2025 | 202.06 | 20.2 | 0.0 | 0.0 | 0.0 | 20.2 | 20.2 | 20.2 | 0.0 | 0.0 |
| 3 | 31 | 21 June 2025 | 21 March 2025 | 181.86 | 20.2 | 0.0 | 0.0 | 0.0 | 20.2 | 20.2 | 20.2 | 0.0 | 0.0 |
| 4 | 30 | 21 July 2025 | 21 March 2025 | 161.66 | 20.2 | 0.0 | 0.0 | 0.0 | 20.2 | 20.2 | 20.2 | 0.0 | 0.0 |
@@ -6818,7 +6818,7 @@ Feature: LoanAccrualActivity
| 12 | 28 | 21 March 2026 | 21 March 2025 | 0.0 | 20.26 | 0.0 | 0.0 | 0.0 | 20.26 | 20.26 | 20.26 | 0.0 | 0.0 |
And Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 342.46 | 1.93 | 0.0 | 0.0 | 344.39 | 344.39 | 242.46 | 101.93 | 0.0 |
| 342.46 | 2.6 | 0.0 | 0.0 | 345.06 | 345.06 | 242.46 | 102.6 | 0.0 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
@@ -6836,8 +6836,7 @@ Feature: LoanAccrualActivity
| 28 April 2025 | Accrual | 0.08 | 0.0 | 0.08 | 0.0 | 0.0 | 0.0 | false | false |
| 29 April 2025 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false |
| 29 April 2025 | Accrual | 0.09 | 0.0 | 0.09 | 0.0 | 0.0 | 0.0 | false | false |
| 06 May 2025 | Repayment | 1.93 | 0.0 | 1.93 | 0.0 | 0.0 | 0.0 | false | false |
| 06 May 2025 | Accrual Adjustment | 0.67 | 0.0 | 0.67 | 0.0 | 0.0 | 0.0 | false | false |
| 06 May 2025 | Repayment | 2.6 | 0.0 | 2.6 | 0.0 | 0.0 | 0.0 | false | false |
# - CBR on closed loan is forbidden - #
Then Credit Balance Refund transaction on active loan "06 May 2025" with 100 EUR transaction amount will result an error
@@ -7157,4 +7156,223 @@ Feature: LoanAccrualActivity
| 07 May 2025 | Accrual | 0.05 | 0.0 | 0.05 | 0.0 | 0.0 | 0.0 | false | false |
| 07 May 2025 | Accrual Activity | 1.18 | 0.0 | 1.18 | 0.0 | 0.0 | 0.0 | false | false |
# - CBR on closed loan is forbidden - #
Then Credit Balance Refund transaction on active loan "07 May 2025" with 72.35 EUR transaction amount will result an error
Then Credit Balance Refund transaction on active loan "07 May 2025" with 72.35 EUR transaction amount will result an error
@TestRailId:C3736
Scenario: Verify that interest is calculated after last unpaid period in case of reversed repayment made before MIR and CBR for progressive loan with downpayment
When Admin sets the business date to "21 March 2025"
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_ADV_PYMNT_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE_DOWNPAYMENT | 21 March 2025 | 242.46 | 29.99 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 12 | MONTHS | 1 | MONTHS | 12 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
And Admin successfully approves the loan on "21 March 2025" with "242.46" amount and expected disbursement date on "21 March 2025"
And Admin successfully disburse the loan on "21 March 2025" with "242.46" EUR transaction amount
Then Loan Repayment schedule has 13 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 21 March 2025 | | 242.46 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 21 March 2025 | | 181.84 | 60.62 | 0.0 | 0.0 | 0.0 | 60.62 | 0.0 | 0.0 | 0.0 | 60.62 |
| 2 | 31 | 21 April 2025 | | 168.65 | 13.19 | 4.54 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 3 | 30 | 21 May 2025 | | 155.13 | 13.52 | 4.21 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 4 | 31 | 21 June 2025 | | 141.28 | 13.85 | 3.88 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 5 | 30 | 21 July 2025 | | 127.08 | 14.2 | 3.53 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 6 | 31 | 21 August 2025 | | 112.53 | 14.55 | 3.18 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 7 | 31 | 21 September 2025 | | 97.61 | 14.92 | 2.81 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 8 | 30 | 21 October 2025 | | 82.32 | 15.29 | 2.44 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 9 | 31 | 21 November 2025 | | 66.65 | 15.67 | 2.06 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 10 | 30 | 21 December 2025 | | 50.59 | 16.06 | 1.67 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 11 | 31 | 21 January 2026 | | 34.12 | 16.47 | 1.26 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 12 | 31 | 21 February 2026 | | 17.24 | 16.88 | 0.85 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 |
| 13 | 28 | 21 March 2026 | | 0.0 | 17.24 | 0.43 | 0.0 | 0.0 | 17.67 | 0.0 | 0.0 | 0.0 | 17.67 |
And Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 242.46 | 30.86 | 0.0 | 0.0 | 273.32 | 0.0 | 0.0 | 0.0 | 273.32 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
And Customer makes "AUTOPAY" repayment on "21 March 2025" with 100 EUR transaction amount
And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "21 March 2025" with 242.46 EUR transaction amount and system-generated Idempotency key
Then Loan status will be "OVERPAID"
Then Loan has 100 overpaid amount
Then Loan Repayment schedule has 13 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 21 March 2025 | | 242.46 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 21 March 2025 | 21 March 2025 | 181.84 | 60.62 | 0.0 | 0.0 | 0.0 | 60.62 | 60.62 | 0.0 | 0.0 | 0.0 |
| 2 | 31 | 21 April 2025 | 21 March 2025 | 164.11 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 3 | 30 | 21 May 2025 | 21 March 2025 | 146.38 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 4 | 31 | 21 June 2025 | 21 March 2025 | 128.65 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 5 | 30 | 21 July 2025 | 21 March 2025 | 110.92 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 6 | 31 | 21 August 2025 | 21 March 2025 | 93.19 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 7 | 31 | 21 September 2025 | 21 March 2025 | 75.46 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 8 | 30 | 21 October 2025 | 21 March 2025 | 57.73 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 9 | 31 | 21 November 2025 | 21 March 2025 | 40.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 10 | 30 | 21 December 2025 | 21 March 2025 | 22.27 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 11 | 31 | 21 January 2026 | 21 March 2025 | 4.54 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 12 | 31 | 21 February 2026 | 21 March 2025 | 0.0 | 4.54 | 0.0 | 0.0 | 0.0 | 4.54 | 4.54 | 4.54 | 0.0 | 0.0 |
| 13 | 28 | 21 March 2026 | 21 March 2025 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
And Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 242.46 | 0.0 | 0.0 | 0.0 | 242.46 | 242.46 | 181.84 | 0.0 | 0.0 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
| 21 March 2025 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 142.46 | false | false |
| 21 March 2025 | Merchant Issued Refund | 242.46 | 142.46 | 0.0 | 0.0 | 0.0 | 0.0 | false | false |
When Admin sets the business date to "28 March 2025"
And Admin runs inline COB job for Loan
When Admin makes Credit Balance Refund transaction on "28 March 2025" with 100 EUR transaction amount
Then Loan status will be "CLOSED_OBLIGATIONS_MET"
Then Loan has 0 outstanding amount
Then Loan Repayment schedule has 13 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 21 March 2025 | | 242.46 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 21 March 2025 | 21 March 2025 | 181.84 | 60.62 | 0.0 | 0.0 | 0.0 | 60.62 | 60.62 | 0.0 | 0.0 | 0.0 |
| 2 | 31 | 21 April 2025 | 21 March 2025 | 164.11 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 3 | 30 | 21 May 2025 | 21 March 2025 | 146.38 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 4 | 31 | 21 June 2025 | 21 March 2025 | 128.65 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 5 | 30 | 21 July 2025 | 21 March 2025 | 110.92 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 6 | 31 | 21 August 2025 | 21 March 2025 | 93.19 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 7 | 31 | 21 September 2025 | 21 March 2025 | 75.46 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 8 | 30 | 21 October 2025 | 21 March 2025 | 57.73 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 9 | 31 | 21 November 2025 | 21 March 2025 | 40.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 10 | 30 | 21 December 2025 | 21 March 2025 | 22.27 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 11 | 31 | 21 January 2026 | 21 March 2025 | 4.54 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | 17.73 | 17.73 | 0.0 | 0.0 |
| 12 | 31 | 21 February 2026 | 21 March 2025 | 0.0 | 4.54 | 0.0 | 0.0 | 0.0 | 4.54 | 4.54 | 4.54 | 0.0 | 0.0 |
| 13 | 28 | 21 March 2026 | 21 March 2025 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
And Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 242.46 | 0.0 | 0.0 | 0.0 | 242.46 | 242.46 | 181.84 | 0.0 | 0.0 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
| 21 March 2025 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 142.46 | false | false |
| 21 March 2025 | Merchant Issued Refund | 242.46 | 142.46 | 0.0 | 0.0 | 0.0 | 0.0 | false | false |
| 28 March 2025 | Credit Balance Refund | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false |
When Admin sets the business date to "02 April 2025"
And Admin runs inline COB job for Loan
When Customer undo "1"th "Repayment" transaction made on "21 March 2025"
Then Loan Repayment schedule has 13 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 21 March 2025 | | 242.46 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 21 March 2025 | 21 March 2025 | 181.84 | 60.62 | 0.0 | 0.0 | 0.0 | 60.62 | 60.62 | 0.0 | 0.0 | 0.0 |
| 2 | 31 | 21 April 2025 | | 166.69 | 115.15 | 1.93 | 0.0 | 0.0 | 117.08 | 15.15 | 15.15 | 0.0 | 101.93 |
| 3 | 30 | 21 May 2025 | 21 March 2025 | 151.54 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 4 | 31 | 21 June 2025 | 21 March 2025 | 136.39 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 5 | 30 | 21 July 2025 | 21 March 2025 | 121.24 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 6 | 31 | 21 August 2025 | 21 March 2025 | 106.09 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 7 | 31 | 21 September 2025 | 21 March 2025 | 90.94 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 8 | 30 | 21 October 2025 | 21 March 2025 | 75.79 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 9 | 31 | 21 November 2025 | 21 March 2025 | 60.64 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 10 | 30 | 21 December 2025 | 21 March 2025 | 45.49 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 11 | 31 | 21 January 2026 | 21 March 2025 | 30.34 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 12 | 31 | 21 February 2026 | 21 March 2025 | 15.19 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 13 | 28 | 21 March 2026 | 21 March 2025 | 0.0 | 15.19 | 0.0 | 0.0 | 0.0 | 15.19 | 15.19 | 15.19 | 0.0 | 0.0 |
And Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 342.46 | 1.93 | 0.0 | 0.0 | 344.39 | 242.46 | 181.84 | 0.0 | 101.93 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
| 21 March 2025 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 142.46 | true | false |
| 21 March 2025 | Merchant Issued Refund | 242.46 | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | false | true |
| 28 March 2025 | Credit Balance Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | true |
When Admin sets the business date to "21 April 2025"
And Admin runs inline COB job for Loan
Then Loan Repayment schedule has 13 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 21 March 2025 | | 242.46 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 21 March 2025 | 21 March 2025 | 181.84 | 60.62 | 0.0 | 0.0 | 0.0 | 60.62 | 60.62 | 0.0 | 0.0 | 0.0 |
| 2 | 31 | 21 April 2025 | | 166.69 | 115.15 | 1.93 | 0.0 | 0.0 | 117.08 | 15.15 | 15.15 | 0.0 | 101.93 |
| 3 | 30 | 21 May 2025 | 21 March 2025 | 151.54 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 4 | 31 | 21 June 2025 | 21 March 2025 | 136.39 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 5 | 30 | 21 July 2025 | 21 March 2025 | 121.24 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 6 | 31 | 21 August 2025 | 21 March 2025 | 106.09 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 7 | 31 | 21 September 2025 | 21 March 2025 | 90.94 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 8 | 30 | 21 October 2025 | 21 March 2025 | 75.79 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 9 | 31 | 21 November 2025 | 21 March 2025 | 60.64 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 10 | 30 | 21 December 2025 | 21 March 2025 | 45.49 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 11 | 31 | 21 January 2026 | 21 March 2025 | 30.34 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 12 | 31 | 21 February 2026 | 21 March 2025 | 15.19 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 13 | 28 | 21 March 2026 | 21 March 2025 | 0.0 | 15.19 | 0.0 | 0.0 | 0.0 | 15.19 | 15.19 | 15.19 | 0.0 | 0.0 |
And Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 342.46 | 1.93 | 0.0 | 0.0 | 344.39 | 242.46 | 181.84 | 0.0 | 101.93 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
| 21 March 2025 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 142.46 | true | false |
| 21 March 2025 | Merchant Issued Refund | 242.46 | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | false | true |
| 28 March 2025 | Credit Balance Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | true |
| 20 April 2025 | Accrual | 1.85 | 0.0 | 1.85 | 0.0 | 0.0 | 0.0 | false | false |
When Admin sets the business date to "22 April 2025"
And Admin runs inline COB job for Loan
Then Loan Repayment schedule has 13 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 21 March 2025 | | 242.46 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 21 March 2025 | 21 March 2025 | 181.84 | 60.62 | 0.0 | 0.0 | 0.0 | 60.62 | 60.62 | 0.0 | 0.0 | 0.0 |
| 2 | 31 | 21 April 2025 | | 166.69 | 115.15 | 2.01 | 0.0 | 0.0 | 117.16 | 15.15 | 15.15 | 0.0 | 102.01 |
| 3 | 30 | 21 May 2025 | 21 March 2025 | 151.54 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 4 | 31 | 21 June 2025 | 21 March 2025 | 136.39 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 5 | 30 | 21 July 2025 | 21 March 2025 | 121.24 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 6 | 31 | 21 August 2025 | 21 March 2025 | 106.09 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 7 | 31 | 21 September 2025 | 21 March 2025 | 90.94 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 8 | 30 | 21 October 2025 | 21 March 2025 | 75.79 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 9 | 31 | 21 November 2025 | 21 March 2025 | 60.64 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 10 | 30 | 21 December 2025 | 21 March 2025 | 45.49 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 11 | 31 | 21 January 2026 | 21 March 2025 | 30.34 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 12 | 31 | 21 February 2026 | 21 March 2025 | 15.19 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 13 | 28 | 21 March 2026 | 21 March 2025 | 0.0 | 15.19 | 0.0 | 0.0 | 0.0 | 15.19 | 15.19 | 15.19 | 0.0 | 0.0 |
And Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 342.46 | 2.01 | 0.0 | 0.0 | 344.47 | 242.46 | 181.84 | 0.0 | 102.01 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
| 21 March 2025 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 142.46 | true | false |
| 21 March 2025 | Merchant Issued Refund | 242.46 | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | false | true |
| 28 March 2025 | Credit Balance Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | true |
| 20 April 2025 | Accrual | 1.85 | 0.0 | 1.85 | 0.0 | 0.0 | 0.0 | false | false |
| 21 April 2025 | Accrual | 0.08 | 0.0 | 0.08 | 0.0 | 0.0 | 0.0 | false | false |
When Admin sets the business date to "23 April 2025"
And Admin runs inline COB job for Loan
Then Loan Repayment schedule has 13 periods, with the following data for periods:
| Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| | | 21 March 2025 | | 242.46 | | | 0.0 | | 0.0 | 0.0 | | | |
| 1 | 0 | 21 March 2025 | 21 March 2025 | 181.84 | 60.62 | 0.0 | 0.0 | 0.0 | 60.62 | 60.62 | 0.0 | 0.0 | 0.0 |
| 2 | 31 | 21 April 2025 | | 166.69 | 115.15 | 2.1 | 0.0 | 0.0 | 117.25 | 15.15 | 15.15 | 0.0 | 102.1 |
| 3 | 30 | 21 May 2025 | 21 March 2025 | 151.54 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 4 | 31 | 21 June 2025 | 21 March 2025 | 136.39 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 5 | 30 | 21 July 2025 | 21 March 2025 | 121.24 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 6 | 31 | 21 August 2025 | 21 March 2025 | 106.09 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 7 | 31 | 21 September 2025 | 21 March 2025 | 90.94 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 8 | 30 | 21 October 2025 | 21 March 2025 | 75.79 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 9 | 31 | 21 November 2025 | 21 March 2025 | 60.64 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 10 | 30 | 21 December 2025 | 21 March 2025 | 45.49 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 11 | 31 | 21 January 2026 | 21 March 2025 | 30.34 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 12 | 31 | 21 February 2026 | 21 March 2025 | 15.19 | 15.15 | 0.0 | 0.0 | 0.0 | 15.15 | 15.15 | 15.15 | 0.0 | 0.0 |
| 13 | 28 | 21 March 2026 | 21 March 2025 | 0.0 | 15.19 | 0.0 | 0.0 | 0.0 | 15.19 | 15.19 | 15.19 | 0.0 | 0.0 |
And Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 342.46 | 2.1 | 0.0 | 0.0 | 344.56 | 242.46 | 181.84 | 0.0 | 102.1 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
| 21 March 2025 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 142.46 | true | false |
| 21 March 2025 | Merchant Issued Refund | 242.46 | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | false | true |
| 28 March 2025 | Credit Balance Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | true |
| 20 April 2025 | Accrual | 1.85 | 0.0 | 1.85 | 0.0 | 0.0 | 0.0 | false | false |
| 21 April 2025 | Accrual | 0.08 | 0.0 | 0.08 | 0.0 | 0.0 | 0.0 | false | false |
| 22 April 2025 | Accrual | 0.08 | 0.0 | 0.08 | 0.0 | 0.0 | 0.0 | false | false |
And Customer makes "AUTOPAY" repayment on "23 April 2025" with 102.1 EUR transaction amount
Then Loan status will be "CLOSED_OBLIGATIONS_MET"
Then Loan has 0 outstanding amount
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 21 March 2025 | Disbursement | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | 242.46 | false | false |
| 21 March 2025 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 142.46 | true | false |
| 21 March 2025 | Merchant Issued Refund | 242.46 | 242.46 | 0.0 | 0.0 | 0.0 | 0.0 | false | true |
| 28 March 2025 | Credit Balance Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | true |
| 20 April 2025 | Accrual | 1.85 | 0.0 | 1.85 | 0.0 | 0.0 | 0.0 | false | false |
| 21 April 2025 | Accrual | 0.08 | 0.0 | 0.08 | 0.0 | 0.0 | 0.0 | false | false |
| 22 April 2025 | Accrual | 0.08 | 0.0 | 0.08 | 0.0 | 0.0 | 0.0 | false | false |
| 23 April 2025 | Repayment | 102.1 | 100.0 | 2.1 | 0.0 | 0.0 | 0.0 | false | false |
| 23 April 2025 | Accrual | 0.09 | 0.0 | 0.09 | 0.0 | 0.0 | 0.0 | false | false |