| @Emi |
| Feature: EMI calculation and repayment schedule checks for interest bearing loans - Part2 |
| |
| @TestRailId:C3237 |
| Scenario: Verify interest recalculation in case of overdue installments: UC12 - 1st installment paid on due date, 2nd installment overdue, interest recalculation: same as repayment period, till rest frequency date |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_SARP_TILL_REST_FREQUENCY_DATE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- 1st installment paid on due date --- |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| # --- 2nd installment overdue --- |
| When Admin sets the business date to "10 March 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 17.01 | 0.0 | 0.0 | 85.14 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 09 March 2024 | Accrual | 1.2 | 0.0 | 1.2 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3238 |
| Scenario: Verify interest recalculation in case of overdue installments: UC13 - 1st installment paid on due date, 2nd installment overdue with partial late repayment, interest recalculation: daily, till preclose |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- 1st installment paid on due date --- |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| # --- 2nd installment paid partially and late --- |
| When Admin sets the business date to "05 March 2024" |
| And Customer makes "AUTOPAY" repayment on "05 March 2024" with 10 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 10.0 | 0.0 | 10.0 | 7.01 | |
| | 3 | 31 | 01 April 2024 | | 50.44 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.72 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.91 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.91 | 0.1 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.06 | 0.0 | 0.0 | 102.06 | 27.01 | 0.0 | 10.0 | 75.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 05 March 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 73.57 | false | false | |
| # --- 2nd installment overdue --- |
| When Admin sets the business date to "10 March 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 10.0 | 0.0 | 10.0 | 7.01 | |
| | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.41 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.73 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.92 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.92 | 0.1 | 0.0 | 0.0 | 17.02 | 0.0 | 0.0 | 0.0 | 17.02 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.07 | 0.0 | 0.0 | 102.07 | 27.01 | 0.0 | 10.0 | 75.06 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 05 March 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 73.57 | false | false | |
| | 09 March 2024 | Accrual | 1.19 | 0.0 | 1.19 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3239 |
| Scenario: Verify interest recalculation in case of overdue installments: UC14 - 1st installment paid on due date, 2nd installment overdue with partial late repayment, interest recalculation: daily, till rest frequency date |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_REST_FREQUENCY_DATE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- 1st installment paid on due date --- |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| # --- 2nd installment paid partially and late --- |
| When Admin sets the business date to "05 March 2024" |
| And Customer makes "AUTOPAY" repayment on "05 March 2024" with 10 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 10.0 | 0.0 | 10.0 | 7.01 | |
| | 3 | 31 | 01 April 2024 | | 50.44 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.72 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.91 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.91 | 0.1 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.06 | 0.0 | 0.0 | 102.06 | 27.01 | 0.0 | 10.0 | 75.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 05 March 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 73.57 | false | false | |
| # --- 2nd installment overdue --- |
| When Admin sets the business date to "10 March 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 10.0 | 0.0 | 10.0 | 7.01 | |
| | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.41 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.73 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.92 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.92 | 0.1 | 0.0 | 0.0 | 17.02 | 0.0 | 0.0 | 0.0 | 17.02 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.07 | 0.0 | 0.0 | 102.07 | 27.01 | 0.0 | 10.0 | 75.06 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 05 March 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 73.57 | false | false | |
| | 09 March 2024 | Accrual | 1.19 | 0.0 | 1.19 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3240 |
| Scenario: Verify interest recalculation in case of overdue installments: UC15 - 1st installment paid on due date, 2nd installment overdue, interest recalculation: same as repayment period, till preclose |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_SARP_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- 1st installment paid on due date --- |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| # --- 2nd installment paid partially and late --- |
| When Admin sets the business date to "05 March 2024" |
| And Customer makes "AUTOPAY" repayment on "05 March 2024" with 10 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 10.0 | 0.0 | 10.0 | 7.01 | |
| | 3 | 31 | 01 April 2024 | | 50.44 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.72 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.91 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.91 | 0.1 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.06 | 0.0 | 0.0 | 102.06 | 27.01 | 0.0 | 10.0 | 75.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 05 March 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 73.57 | false | false | |
| # --- 2nd installment overdue --- |
| When Admin sets the business date to "10 March 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 10.0 | 0.0 | 10.0 | 7.01 | |
| | 3 | 31 | 01 April 2024 | | 50.45 | 16.6 | 0.41 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.73 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.92 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.92 | 0.1 | 0.0 | 0.0 | 17.02 | 0.0 | 0.0 | 0.0 | 17.02 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.07 | 0.0 | 0.0 | 102.07 | 27.01 | 0.0 | 10.0 | 75.06 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 05 March 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 73.57 | false | false | |
| | 09 March 2024 | Accrual | 1.19 | 0.0 | 1.19 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3241 |
| Scenario: Verify interest recalculation in case of overdue installments: UC16 - 1st installment paid on due date, 2nd installment overdue, interest recalculation: same as repayment period, till rest frequency date |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_SARP_TILL_REST_FREQUENCY_DATE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- 1st installment paid on due date --- |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| # --- 2nd installment paid partially and late --- |
| When Admin sets the business date to "05 March 2024" |
| And Customer makes "AUTOPAY" repayment on "05 March 2024" with 10 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 10.0 | 0.0 | 10.0 | 7.01 | |
| | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 27.01 | 0.0 | 10.0 | 75.14 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 05 March 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 73.57 | false | false | |
| # --- 2nd installment overdue --- |
| When Admin sets the business date to "10 March 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 10.0 | 0.0 | 10.0 | 7.01 | |
| | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 27.01 | 0.0 | 10.0 | 75.14 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 05 March 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 73.57 | false | false | |
| | 09 March 2024 | Accrual | 1.2 | 0.0 | 1.2 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3244 |
| Scenario: Verify support of interest rate calculation with frequency Whole term configured for progressive loan |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_WHOLE_TERM | 01 January 2024 | 100 | 4 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 75.37 | 24.63 | 1.0 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 2 | 29 | 01 March 2024 | | 50.49 | 24.88 | 0.75 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 3 | 31 | 01 April 2024 | | 25.36 | 25.13 | 0.5 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 25.36 | 0.25 | 0.0 | 0.0 | 25.61 | 0.0 | 0.0 | 0.0 | 25.61 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 2.50 | 0.0 | 0.0 | 102.50 | 0.0 | 0.0 | 0.0 | 102.50 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | |
| Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: |
| | Type | Account code | Account name | Debit | Credit | |
| | ASSET | 112601 | Loans Receivable | 100.0 | | |
| | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | |
| # -- create other progressive loan with 12% interest rate and frequency PerYear to check that data should match for both loans |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 12 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 75.37 | 24.63 | 1.0 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 2 | 29 | 01 March 2024 | | 50.49 | 24.88 | 0.75 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 3 | 31 | 01 April 2024 | | 25.36 | 25.13 | 0.5 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 25.36 | 0.25 | 0.0 | 0.0 | 25.61 | 0.0 | 0.0 | 0.0 | 25.61 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 2.50 | 0.0 | 0.0 | 102.50 | 0.0 | 0.0 | 0.0 | 102.50 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | |
| Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: |
| | Type | Account code | Account name | Debit | Credit | |
| | ASSET | 112601 | Loans Receivable | 100.0 | | |
| | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | |
| |
| @TestRailId:C3287 |
| Scenario: Verify support of interest rate calculation with frequency Whole term configured for progressive loan on loan account level |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin creates a fully customized loan with interestRateFrequencyType and 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 | interestRateFrequencyType | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 4 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | WHOLE_TERM | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 75.37 | 24.63 | 1.0 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 2 | 29 | 01 March 2024 | | 50.49 | 24.88 | 0.75 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 3 | 31 | 01 April 2024 | | 25.36 | 25.13 | 0.5 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 25.36 | 0.25 | 0.0 | 0.0 | 25.61 | 0.0 | 0.0 | 0.0 | 25.61 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 2.50 | 0.0 | 0.0 | 102.50 | 0.0 | 0.0 | 0.0 | 102.50 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | |
| Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: |
| | Type | Account code | Account name | Debit | Credit | |
| | ASSET | 112601 | Loans Receivable | 100.0 | | |
| | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | |
| # -- create other progressive loan with 12% interest rate and frequency PerYear to check that data should match for both loans |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 12 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 75.37 | 24.63 | 1.0 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 2 | 29 | 01 March 2024 | | 50.49 | 24.88 | 0.75 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 3 | 31 | 01 April 2024 | | 25.36 | 25.13 | 0.5 | 0.0 | 0.0 | 25.63 | 0.0 | 0.0 | 0.0 | 25.63 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 25.36 | 0.25 | 0.0 | 0.0 | 25.61 | 0.0 | 0.0 | 0.0 | 25.61 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 2.50 | 0.0 | 0.0 | 102.50 | 0.0 | 0.0 | 0.0 | 102.50 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | |
| Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries: |
| | Type | Account code | Account name | Debit | Credit | |
| | ASSET | 112601 | Loans Receivable | 100.0 | | |
| | LIABILITY | 145023 | Suspense/Clearing account | | 100.0 | |
| |
| @TestRailId:C3245 |
| Scenario: Verify Interest recalculation - daily for overdue loan - UC1: 360/30, pre-close on overdue loan, preClosureInterestCalculationStrategy = till pre-close date |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Fully repaid between 1st and 2nd installment, 1st installment is overdue --- |
| When Admin sets the business date to "15 February 2024" |
| And Customer makes "AUTOPAY" repayment on "15 February 2024" with 100.86 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 17.01 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 15 February 2024 | 66.84 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 15 February 2024 | 49.83 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 15 February 2024 | 32.82 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 15 February 2024 | 15.81 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 15 February 2024 | 0.0 | 15.81 | 0.0 | 0.0 | 0.0 | 15.81 | 15.81 | 15.81 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 0.86 | 0.0 | 0.0 | 100.86 | 100.86 | 83.85 | 17.01 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 February 2024 | Repayment | 100.86 | 100.0 | 0.86 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 February 2024 | Accrual | 0.86 | 0.0 | 0.86 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan's all installments have obligations met |
| |
| @TestRailId:C3246 |
| Scenario: Verify Interest recalculation - daily for overdue loan - UC2: 360/30, pre-close on overdue loan, preClosureInterestCalculationStrategy = till rest frequency date |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_REST_FREQUENCY_DATE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Fully repaid between 1st and 2nd installment, 1st installment is overdue --- |
| When Admin sets the business date to "15 February 2024" |
| And Customer makes "AUTOPAY" repayment on "15 February 2024" with 101.16 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 17.01 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 15 February 2024 | 67.14 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 15 February 2024 | 50.13 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 15 February 2024 | 33.12 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 15 February 2024 | 16.11 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 15 February 2024 | 0.0 | 16.11 | 0.0 | 0.0 | 0.0 | 16.11 | 16.11 | 16.11 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.16 | 0.0 | 0.0 | 101.16 | 101.16 | 84.15 | 17.01 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 February 2024 | Repayment | 101.16 | 100.0 | 1.16 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 February 2024 | Accrual | 1.16 | 0.0 | 1.16 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan's all installments have obligations met |
| |
| @TestRailId:C3248 |
| Scenario: Verify interest recalculation - late repayment, adjust NEXT installment - UC1: 360/30, daily, lesser then EMI amount is paid |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- lesser than emi amount is paid --- |
| When Admin sets the business date to "15 February 2024" |
| When Admin runs inline COB job for Loan |
| And Customer makes "AUTOPAY" repayment on "15 February 2024" with 15 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 15.0 | 0.0 | 15.0 | 2.01 | |
| | 2 | 29 | 01 March 2024 | | 67.09 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.47 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.75 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.94 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 15.0 | 0.0 | 15.0 | 87.09 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 14 February 2024 | Accrual | 0.84 | 0.0 | 0.84 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 February 2024 | Repayment | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 85.0 | false | false | |
| |
| @TestRailId:C3249 |
| Scenario: Verify interest recalculation - late repayment, adjust NEXT installment - UC2: 360/30, daily, EMI amount is paid |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- emi amount is paid --- |
| When Admin sets the business date to "15 February 2024" |
| When Admin runs inline COB job for Loan |
| And Customer makes "AUTOPAY" repayment on "15 February 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 17.01 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.09 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.47 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.75 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.94 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.94 | 0.1 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 17.01 | 85.08 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 14 February 2024 | Accrual | 0.84 | 0.0 | 0.84 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| |
| @TestRailId:C3250 |
| Scenario: Verify interest recalculation - late repayment, adjust NEXT installment - UC2: 360/30, daily, excess then EMI amount is paid |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- excess than emi amount is paid --- |
| When Admin sets the business date to "15 February 2024" |
| When Admin runs inline COB job for Loan |
| And Customer makes "AUTOPAY" repayment on "15 February 2024" with 34.02 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 17.01 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 15 February 2024 | 66.84 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | | 50.42 | 16.42 | 0.59 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.7 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.89 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.89 | 0.1 | 0.0 | 0.0 | 16.99 | 0.0 | 0.0 | 0.0 | 16.99 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.04 | 0.0 | 0.0 | 102.04 | 34.02 | 17.01 | 17.01 | 68.02 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 February 2024 | Repayment | 34.02 | 33.16 | 0.86 | 0.0 | 0.0 | 66.84 | false | false | |
| | 14 February 2024 | Accrual | 0.84 | 0.0 | 0.84 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3267 |
| Scenario: Verify interest recalculation - late repayment, adjust LAST installment - UC2: 360/30, daily, excess EMI amount is paid |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- lesser than emi amount is paid --- |
| When Admin sets the business date to "01 February 2024" |
| When Admin runs inline COB job for Loan |
| When Admin sets the business date to "15 February 2024" |
| When Admin runs inline COB job for Loan |
| And Customer makes "AUTOPAY" repayment on "15 February 2024" with 34.02 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 17.01 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.04 | 16.53 | 0.48 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.32 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.5 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 17.01 | 16.49 | 0.1 | 0.0 | 0.0 | 16.59 | 0.0 | 0.0 | 0.0 | 16.59 | |
| | 6 | 30 | 01 July 2024 | 15 February 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.00 | 1.64 | 0.0 | 0.0 | 101.64 | 34.02 | 17.01 | 17.01 | 67.62 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 February 2024 | Repayment | 34.02 | 33.44 | 0.58 | 0.0 | 0.0 | 66.56 | false | false | |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| |
| @TestRailId:C3251 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust NEXT installment - UC1: 360/30, early repayment with amount less then due interest |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 0.20 EUR - NO interest recalculation, because we did not paid any outstanding principal portion --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 0.2 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.2 | 0.2 | 0.0 | 16.81 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.2 | 0.2 | 0.0 | 101.85 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 0.2 | 0.0 | 0.2 | 0.0 | 0.0 | 100.0 | false | false | |
| |
| @TestRailId:C3252 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust NEXT installment - UC2: 360/30, early repayment with amount 1 cent more then due interest |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 0.27 EUR, only 0.01 EUR goes for principal --> interest recalculation kicks, but effect cannot be seen --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 0.27 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.27 | 0.27 | 0.0 | 16.74 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.27 | 0.27 | 0.0 | 101.78 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 0.27 | 0.01 | 0.26 | 0.0 | 0.0 | 99.99 | false | false | |
| |
| @TestRailId:C3253 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust NEXT installment - UC3: 360/30, early repayment with less than EMI amount |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 15.0 EUR --> interest recalculation kicks, there is enough room for remaining interest --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 15 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.53 | 16.47 | 0.54 | 0.0 | 0.0 | 17.01 | 15.0 | 15.0 | 0.0 | 2.01 | |
| | 2 | 29 | 01 March 2024 | | 67.01 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.39 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.67 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.86 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.86 | 0.1 | 0.0 | 0.0 | 16.96 | 0.0 | 0.0 | 0.0 | 16.96 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.01 | 0.0 | 0.0 | 102.01 | 15.0 | 15.0 | 0.0 | 87.01 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 15.0 | 14.74 | 0.26 | 0.0 | 0.0 | 85.26 | false | false | |
| |
| @TestRailId:C3254 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust NEXT installment - UC4: 360/30, early repayment with only 1 cent less than EMI amount |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 17.0 EUR --> interest recalculation kicks, there is not enough room for remaining interest, moving to next period --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.0 | 17.0 | 0.0 | 0.01 | |
| | 2 | 29 | 01 March 2024 | | 67.0 | 16.25 | 0.76 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.0 | 17.0 | 0.0 | 85.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 17.0 | 16.74 | 0.26 | 0.0 | 0.0 | 83.26 | false | false | |
| |
| @TestRailId:C3255 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust NEXT installment - UC5: 360/30, multiple early repayments for the same installment |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 15.0 EUR --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 15 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| # --- Early repayment with 2.01 EUR --- |
| When Admin sets the business date to "20 January 2024" |
| And Customer makes "AUTOPAY" repayment on "20 January 2024" with 2.01 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 20 January 2024 | 83.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.0 | 16.33 | 0.68 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.01 | 17.01 | 0.0 | 84.99 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 15.0 | 14.74 | 0.26 | 0.0 | 0.0 | 85.26 | false | false | |
| | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 18 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 20 January 2024 | Repayment | 2.01 | 1.93 | 0.08 | 0.0 | 0.0 | 83.33 | false | false | |
| |
| @TestRailId:C3256 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust NEXT installment - UC6: 360/30, early repayment with exact EMI amount |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 17.01 EUR --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.0 | 16.25 | 0.76 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.01 | 17.01 | 0.0 | 84.99 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | |
| |
| @TestRailId:C3257 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust NEXT installment - UC7: 360/30, early repayment with twice than EMI amount |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 34.02 EUR --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 34.02 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 15 January 2024 | 66.24 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | | 50.23 | 16.01 | 1.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.51 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.7 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.7 | 0.1 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.85 | 0.0 | 0.0 | 101.85 | 34.02 | 34.02 | 0.0 | 67.83 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 34.02 | 33.76 | 0.26 | 0.0 | 0.0 | 66.24 | false | false | |
| |
| @TestRailId:C3258 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust NEXT installment - UC8: 360/30, preclose after early repayment |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 17.01 EUR --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| # --- Preclose with 83.33 EUR --- |
| When Admin sets the business date to "20 January 2024" |
| And Customer makes "AUTOPAY" repayment on "20 January 2024" with 83.33 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 20 January 2024 | 66.32 | 16.93 | 0.08 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 20 January 2024 | 49.31 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 20 January 2024 | 32.3 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 20 January 2024 | 15.29 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 20 January 2024 | 0.0 | 15.29 | 0.0 | 0.0 | 0.0 | 15.29 | 15.29 | 15.29 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 0.34 | 0.0 | 0.0 | 100.34 | 100.34 | 100.34 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | |
| | 20 January 2024 | Repayment | 83.33 | 83.25 | 0.08 | 0.0 | 0.0 | 0.0 | false | false | |
| | 20 January 2024 | Accrual | 0.1 | 0.0 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3259 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust NEXT installment - UC9: 360/30, interest modification after early repayment |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE_PMT_ALLOC_1 | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 17.01 EUR --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| # --- Interest rate changed to 4% --- |
| When Admin sets the business date to "20 January 2024" |
| When Admin creates and approves Loan reschedule with the following data: |
| | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | |
| | 21 January 2024 | 20 January 2024 | | | | | 4 | |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 66.86 | 16.39 | 0.47 | 0.0 | 0.0 | 16.86 | 0.0 | 0.0 | 0.0 | 16.86 | |
| | 3 | 31 | 01 April 2024 | | 50.22 | 16.64 | 0.22 | 0.0 | 0.0 | 16.86 | 0.0 | 0.0 | 0.0 | 16.86 | |
| | 4 | 30 | 01 May 2024 | | 33.53 | 16.69 | 0.17 | 0.0 | 0.0 | 16.86 | 0.0 | 0.0 | 0.0 | 16.86 | |
| | 5 | 31 | 01 June 2024 | | 16.78 | 16.75 | 0.11 | 0.0 | 0.0 | 16.86 | 0.0 | 0.0 | 0.0 | 16.86 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.78 | 0.06 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 17.01 | 0.0 | 84.28 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | |
| | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 17 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "25 January 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | |
| | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 17 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 20 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 21 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 22 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 24 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3269 |
| Scenario: UC1 - Single disbursement, full refund within first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount |
| When Admin sets the business date to "22 January 2024" |
| When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 1000 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 750.54 | 249.46 | 5.68 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 22 January 2024 | 495.4 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 22 January 2024 | 240.26 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 22 January 2024 | 0.0 | 240.26 | 0.0 | 0.0 | 0.0 | 240.26 | 240.26 | 240.26 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 5.68 | 0.0 | 0.0 | 1005.68 | 1005.68 | 1005.68 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Merchant Issued Refund | 1000.0 | 994.32 | 5.68 | 0.0 | 0.0 | 5.68 | false | false | |
| | 22 January 2024 | Interest Refund | 5.68 | 5.68 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 22 January 2024 | Accrual | 5.68 | 0.0 | 5.68 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3270 |
| Scenario: UC2 - Single disbursement, full refund after first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 255.14 EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 255.14 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 504.02 | 249.23 | 5.91 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 3 | 31 | 01 April 2024 | | 253.11 | 250.91 | 4.23 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 253.11 | 2.05 | 0.0 | 0.0 | 255.16 | 0.0 | 0.0 | 0.0 | 255.16 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 20.58 | 0.0 | 0.0 | 1020.58 | 255.14 | 0.0 | 0.0 | 765.44 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 255.14 | 246.75 | 8.39 | 0.0 | 0.0 | 753.25 | false | false | |
| When Admin sets the business date to "09 February 2024" |
| When Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "09 February 2024" with 1000 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 255.14 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 09 February 2024 | 499.74 | 253.51 | 1.63 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 09 February 2024 | 244.6 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 09 February 2024 | 0.0 | 244.6 | 0.0 | 0.0 | 0.0 | 244.6 | 244.6 | 244.6 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 10.02 | 0.0 | 0.0 | 1010.02 | 1010.02 | 754.88 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 255.14 | 246.75 | 8.39 | 0.0 | 0.0 | 753.25 | false | false | |
| | 09 February 2024 | Payout Refund | 1000.0 | 753.25 | 1.63 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 February 2024 | Interest Refund | 10.02 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 February 2024 | Accrual | 10.02 | 0.0 | 10.02 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "10 February 2024" |
| When Admin makes Credit Balance Refund transaction on "10 February 2024" with 255.14 EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 255.14 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 09 February 2024 | 499.74 | 253.51 | 1.63 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 09 February 2024 | 244.6 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 09 February 2024 | 0.0 | 244.6 | 0.0 | 0.0 | 0.0 | 244.6 | 244.6 | 244.6 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 10.02 | 0.0 | 0.0 | 1010.02 | 1010.02 | 754.88 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 255.14 | 246.75 | 8.39 | 0.0 | 0.0 | 753.25 | false | false | |
| | 09 February 2024 | Payout Refund | 1000.0 | 753.25 | 1.63 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 February 2024 | Interest Refund | 10.02 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 February 2024 | Accrual | 10.02 | 0.0 | 10.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 February 2024 | Credit Balance Refund | 255.14 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3271 |
| Scenario: UC3 - Multi disbursements, same day, full refund within first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "750" EUR transaction amount |
| When Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount |
| When Admin sets the business date to "22 January 2024" |
| When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 1000 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 750.54 | 249.46 | 5.68 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 22 January 2024 | 495.4 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 22 January 2024 | 240.26 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 22 January 2024 | 0.0 | 240.26 | 0.0 | 0.0 | 0.0 | 240.26 | 240.26 | 240.26 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 5.68 | 0.0 | 0.0 | 1005.68 | 1005.68 | 1005.68 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | false | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Merchant Issued Refund | 1000.0 | 994.32 | 5.68 | 0.0 | 0.0 | 5.68 | false | false | |
| | 22 January 2024 | Interest Refund | 5.68 | 5.68 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 22 January 2024 | Accrual | 5.68 | 0.0 | 5.68 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3272 |
| Scenario: UC4 - Multi disbursements, different days, full refund within first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount |
| When Admin sets the business date to "04 January 2024" |
| When Admin successfully disburse the loan on "04 January 2024" with "750" EUR transaction amount |
| When Admin sets the business date to "22 January 2024" |
| When Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 1000 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 04 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 750.08 | 249.92 | 5.07 | 0.0 | 0.0 | 254.99 | 254.99 | 254.99 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 22 January 2024 | 495.09 | 254.99 | 0.0 | 0.0 | 0.0 | 254.99 | 254.99 | 254.99 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 22 January 2024 | 240.1 | 254.99 | 0.0 | 0.0 | 0.0 | 254.99 | 254.99 | 254.99 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 22 January 2024 | 0.0 | 240.1 | 0.0 | 0.0 | 0.0 | 240.1 | 240.1 | 240.1 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 5.07 | 0.0 | 0.0 | 1005.07 | 1005.07 | 1005.07 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 04 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Payout Refund | 1000.0 | 994.93 | 5.07 | 0.0 | 0.0 | 5.07 | false | false | |
| | 22 January 2024 | Interest Refund | 5.07 | 5.07 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 22 January 2024 | Accrual | 5.07 | 0.0 | 5.07 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3273 |
| Scenario: UC5 - Multi disbursements, different days, full refund after first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount |
| When Admin sets the business date to "07 January 2024" |
| When Admin successfully disburse the loan on "07 January 2024" with "500" EUR transaction amount |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 255.14 EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 07 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 752.63 | 247.37 | 7.57 | 0.0 | 0.0 | 254.94 | 254.94 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 503.59 | 249.04 | 5.9 | 0.0 | 0.0 | 254.94 | 0.2 | 0.2 | 0.0 | 254.74 | |
| | 3 | 31 | 01 April 2024 | | 252.87 | 250.72 | 4.22 | 0.0 | 0.0 | 254.94 | 0.0 | 0.0 | 0.0 | 254.94 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 252.87 | 2.05 | 0.0 | 0.0 | 254.92 | 0.0 | 0.0 | 0.0 | 254.92 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 19.74 | 0.0 | 0.0 | 1019.74 | 255.14 | 0.2 | 0.0 | 764.6 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 07 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 255.14 | 247.57 | 7.57 | 0.0 | 0.0 | 752.43 | false | false | |
| When Admin sets the business date to "09 February 2024" |
| When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "09 February 2024" with 1000 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 07 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 752.63 | 247.37 | 7.57 | 0.0 | 0.0 | 254.94 | 254.94 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 09 February 2024 | 499.32 | 253.31 | 1.63 | 0.0 | 0.0 | 254.94 | 254.94 | 254.94 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 09 February 2024 | 244.38 | 254.94 | 0.0 | 0.0 | 0.0 | 254.94 | 254.94 | 254.94 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 09 February 2024 | 0.0 | 244.38 | 0.0 | 0.0 | 0.0 | 244.38 | 244.38 | 244.38 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 9.2 | 0.0 | 0.0 | 1009.2 | 1009.2 | 754.26 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 07 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 255.14 | 247.57 | 7.57 | 0.0 | 0.0 | 752.43 | false | false | |
| | 09 February 2024 | Merchant Issued Refund | 1000.0 | 752.43 | 1.63 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 February 2024 | Interest Refund | 9.2 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 February 2024 | Accrual | 9.2 | 0.0 | 9.2 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "10 February 2024" |
| When Admin makes Credit Balance Refund transaction on "10 February 2024" with 255.14 EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 07 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 752.63 | 247.37 | 7.57 | 0.0 | 0.0 | 254.94 | 254.94 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 09 February 2024 | 499.32 | 253.31 | 1.63 | 0.0 | 0.0 | 254.94 | 254.94 | 254.94 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 09 February 2024 | 244.38 | 254.94 | 0.0 | 0.0 | 0.0 | 254.94 | 254.94 | 254.94 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 09 February 2024 | 0.0 | 244.38 | 0.0 | 0.0 | 0.0 | 244.38 | 244.38 | 244.38 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 9.2 | 0.0 | 0.0 | 1009.2 | 1009.2 | 754.26 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 07 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 255.14 | 247.57 | 7.57 | 0.0 | 0.0 | 752.43 | false | false | |
| | 09 February 2024 | Merchant Issued Refund | 1000.0 | 752.43 | 1.63 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 February 2024 | Interest Refund | 9.2 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 February 2024 | Accrual | 9.2 | 0.0 | 9.2 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 February 2024 | Credit Balance Refund | 255.14 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3277 |
| Scenario: UC6 - Single disbursement, partial refund within first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 2 | 29 | 01 March 2024 | | 504.02 | 249.23 | 5.91 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 3 | 31 | 01 April 2024 | | 253.11 | 250.91 | 4.23 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 253.11 | 2.05 | 0.0 | 0.0 | 255.16 | 0.0 | 0.0 | 0.0 | 255.16 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 20.58 | 0.0 | 0.0 | 1020.58 | 0.0 | 0.0 | 0.0 | 1020.58 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| When Admin sets the business date to "14 February 2024" |
| When Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "14 February 2024" with 500 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 14 February 2024 | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 255.14 | 0.0 | 255.14 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 498.11 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | 250.82 | 250.82 | 0.0 | 4.32 | |
| | 3 | 31 | 01 April 2024 | | 252.84 | 245.27 | 9.87 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 252.84 | 2.05 | 0.0 | 0.0 | 254.89 | 0.0 | 0.0 | 0.0 | 254.89 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 20.31 | 0.0 | 0.0 | 1020.31 | 505.96 | 250.82 | 255.14 | 514.35 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 14 February 2024 | Payout Refund | 500.0 | 491.61 | 8.39 | 0.0 | 0.0 | 508.39 | false | false | |
| | 14 February 2024 | Interest Refund | 5.96 | 5.96 | 0.0 | 0.0 | 0.0 | 502.43 | false | false | |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 4.33 EUR transaction amount |
| When Admin sets the business date to "01 April 2024" |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 255.14 EUR transaction amount |
| When Admin sets the business date to "01 May 2024" |
| And Customer makes "AUTOPAY" repayment on "01 May 2024" with 254.88 EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 14 February 2024 | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 255.14 | 0.0 | 255.14 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 01 March 2024 | 498.11 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | 255.14 | 250.82 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 252.84 | 245.27 | 9.87 | 0.0 | 0.0 | 255.14 | 255.14 | 0.01 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 0.0 | 252.84 | 2.05 | 0.0 | 0.0 | 254.89 | 254.89 | 0.01 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 20.31 | 0.0 | 0.0 | 1020.31 | 1020.31 | 250.84 | 255.14 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 14 February 2024 | Payout Refund | 500.0 | 491.61 | 8.39 | 0.0 | 0.0 | 508.39 | false | false | |
| | 14 February 2024 | Interest Refund | 5.96 | 5.96 | 0.0 | 0.0 | 0.0 | 502.43 | false | false | |
| | 01 March 2024 | Repayment | 4.33 | 4.33 | 0.0 | 0.0 | 0.0 | 498.1 | false | false | |
| | 01 April 2024 | Repayment | 255.14 | 245.27 | 9.87 | 0.0 | 0.0 | 252.83 | false | false | |
| | 01 May 2024 | Repayment | 254.88 | 252.83 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 May 2024 | Accrual | 20.31 | 0.0 | 20.31 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3278 |
| Scenario: UC7 - Single disbursement, partial refund after first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount |
| When Admin sets the business date to "01 February 2024" |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 2 | 29 | 01 March 2024 | | 504.02 | 249.23 | 5.91 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 3 | 31 | 01 April 2024 | | 253.11 | 250.91 | 4.23 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 253.11 | 2.05 | 0.0 | 0.0 | 255.16 | 0.0 | 0.0 | 0.0 | 255.16 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 20.58 | 0.0 | 0.0 | 1020.58 | 0.0 | 0.0 | 0.0 | 1020.58 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 255.14 EUR transaction amount |
| When Admin sets the business date to "09 February 2024" |
| When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "09 February 2024" with 500 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 255.14 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 09 February 2024 | 499.74 | 253.51 | 1.63 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | | 248.11 | 251.63 | 3.51 | 0.0 | 0.0 | 255.14 | 250.15 | 250.15 | 0.0 | 4.99 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 248.11 | 2.01 | 0.0 | 0.0 | 250.12 | 0.0 | 0.0 | 0.0 | 250.12 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 15.54 | 0.0 | 0.0 | 1015.54 | 760.43 | 505.29 | 0.0 | 255.11 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 255.14 | 246.75 | 8.39 | 0.0 | 0.0 | 753.25 | false | false | |
| | 09 February 2024 | Merchant Issued Refund | 500.0 | 498.37 | 1.63 | 0.0 | 0.0 | 254.88 | false | false | |
| | 09 February 2024 | Interest Refund | 5.29 | 5.29 | 0.0 | 0.0 | 0.0 | 249.59 | false | false | |
| When Admin sets the business date to "01 March 2024" |
| When Admin sets the business date to "01 April 2024" |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 4.99 EUR transaction amount |
| When Admin sets the business date to "01 May 2024" |
| And Customer makes "AUTOPAY" repayment on "01 May 2024" with 250.12 EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 255.14 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 09 February 2024 | 499.74 | 253.51 | 1.63 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 248.11 | 251.63 | 3.51 | 0.0 | 0.0 | 255.14 | 255.14 | 250.15 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 0.0 | 248.11 | 2.01 | 0.0 | 0.0 | 250.12 | 250.12 | 0.0 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 15.54 | 0.0 | 0.0 | 1015.54 | 1015.54 | 505.29 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 255.14 | 246.75 | 8.39 | 0.0 | 0.0 | 753.25 | false | false | |
| | 09 February 2024 | Merchant Issued Refund | 500.0 | 498.37 | 1.63 | 0.0 | 0.0 | 254.88 | false | false | |
| | 09 February 2024 | Interest Refund | 5.29 | 5.29 | 0.0 | 0.0 | 0.0 | 249.59 | false | false | |
| | 01 April 2024 | Repayment | 4.99 | 1.48 | 3.51 | 0.0 | 0.0 | 248.11 | false | false | |
| | 01 May 2024 | Repayment | 250.12 | 248.11 | 2.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 May 2024 | Accrual | 15.54 | 0.0 | 15.54 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3279 |
| Scenario: UC8 - Multi disbursements, same days, partial refund within first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount |
| When Admin successfully disburse the loan on "01 January 2024" with "750" EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 2 | 29 | 01 March 2024 | | 504.02 | 249.23 | 5.91 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 3 | 31 | 01 April 2024 | | 253.11 | 250.91 | 4.23 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 253.11 | 2.05 | 0.0 | 0.0 | 255.16 | 0.0 | 0.0 | 0.0 | 255.16 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 20.58 | 0.0 | 0.0 | 1020.58 | 0.0 | 0.0 | 0.0 | 1020.58 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 01 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| When Admin sets the business date to "22 January 2024" |
| When Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 500 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 750.54 | 249.46 | 5.68 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 500.7 | 249.84 | 5.3 | 0.0 | 0.0 | 255.14 | 247.7 | 247.7 | 0.0 | 7.44 | |
| | 3 | 31 | 01 April 2024 | | 249.76 | 250.94 | 4.2 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 249.76 | 2.03 | 0.0 | 0.0 | 251.79 | 0.0 | 0.0 | 0.0 | 251.79 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 17.21 | 0.0 | 0.0 | 1017.21 | 502.84 | 502.84 | 0.0 | 514.37 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 01 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Payout Refund | 500.0 | 494.32 | 5.68 | 0.0 | 0.0 | 505.68 | false | false | |
| | 22 January 2024 | Interest Refund | 2.84 | 2.84 | 0.0 | 0.0 | 0.0 | 502.84 | false | false | |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 7.46 EUR transaction amount |
| When Admin sets the business date to "01 April 2024" |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 255.15 EUR transaction amount |
| When Admin sets the business date to "01 May 2024" |
| And Customer makes "AUTOPAY" repayment on "01 May 2024" with 251.76 EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 750.54 | 249.46 | 5.68 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 01 March 2024 | 500.7 | 249.84 | 5.3 | 0.0 | 0.0 | 255.14 | 255.14 | 247.7 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 249.76 | 250.94 | 4.2 | 0.0 | 0.0 | 255.14 | 255.14 | 0.02 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 0.0 | 249.76 | 2.03 | 0.0 | 0.0 | 251.79 | 251.79 | 0.03 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 17.21 | 0.0 | 0.0 | 1017.21 | 1017.21 | 502.89 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 01 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Payout Refund | 500.0 | 494.32 | 5.68 | 0.0 | 0.0 | 505.68 | false | false | |
| | 22 January 2024 | Interest Refund | 2.84 | 2.84 | 0.0 | 0.0 | 0.0 | 502.84 | false | false | |
| | 01 March 2024 | Repayment | 7.46 | 2.16 | 5.3 | 0.0 | 0.0 | 500.68 | false | false | |
| | 01 April 2024 | Repayment | 255.15 | 250.95 | 4.2 | 0.0 | 0.0 | 249.73 | false | false | |
| | 01 May 2024 | Repayment | 251.76 | 249.73 | 2.03 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 May 2024 | Accrual | 17.21 | 0.0 | 17.21 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3280 |
| Scenario: UC9 - Multi disbursements, different days, partial refund within first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount |
| When Admin sets the business date to "07 January 2024" |
| When Admin successfully disburse the loan on "07 January 2024" with "750" EUR transaction amount |
| When Admin sets the business date to "22 January 2024" |
| When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 500 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 07 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 749.63 | 250.37 | 4.46 | 0.0 | 0.0 | 254.83 | 254.83 | 254.83 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 500.1 | 249.53 | 5.3 | 0.0 | 0.0 | 254.83 | 247.6 | 247.6 | 0.0 | 7.23 | |
| | 3 | 31 | 01 April 2024 | | 249.46 | 250.64 | 4.19 | 0.0 | 0.0 | 254.83 | 0.0 | 0.0 | 0.0 | 254.83 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 249.46 | 2.02 | 0.0 | 0.0 | 251.48 | 0.0 | 0.0 | 0.0 | 251.48 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 15.97 | 0.0 | 0.0 | 1015.97 | 502.43 | 502.43 | 0.0 | 513.54 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 07 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Merchant Issued Refund | 500.0 | 495.54 | 4.46 | 0.0 | 0.0 | 504.46 | false | false | |
| | 22 January 2024 | Interest Refund | 2.43 | 2.43 | 0.0 | 0.0 | 0.0 | 502.03 | false | false | |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 7.24 EUR transaction amount |
| When Admin sets the business date to "01 April 2024" |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 254.84 EUR transaction amount |
| When Admin sets the business date to "01 May 2024" |
| And Customer makes "AUTOPAY" repayment on "01 May 2024" with 251.46 EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 07 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 749.63 | 250.37 | 4.46 | 0.0 | 0.0 | 254.83 | 254.83 | 254.83 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 01 March 2024 | 500.1 | 249.53 | 5.3 | 0.0 | 0.0 | 254.83 | 254.83 | 247.6 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 249.46 | 250.64 | 4.19 | 0.0 | 0.0 | 254.83 | 254.83 | 0.01 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 0.0 | 249.46 | 2.02 | 0.0 | 0.0 | 251.48 | 251.48 | 0.02 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 15.97 | 0.0 | 0.0 | 1015.97 | 1015.97 | 502.46 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 07 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Merchant Issued Refund | 500.0 | 495.54 | 4.46 | 0.0 | 0.0 | 504.46 | false | false | |
| | 22 January 2024 | Interest Refund | 2.43 | 2.43 | 0.0 | 0.0 | 0.0 | 502.03 | false | false | |
| | 01 March 2024 | Repayment | 7.24 | 1.94 | 5.3 | 0.0 | 0.0 | 500.09 | false | false | |
| | 01 April 2024 | Repayment | 254.84 | 250.65 | 4.19 | 0.0 | 0.0 | 249.44 | false | false | |
| | 01 May 2024 | Repayment | 251.46 | 249.44 | 2.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 May 2024 | Accrual | 15.97 | 0.0 | 15.97 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3281 |
| Scenario: UC10 - Multi disbursements, different days, partial refund after all installments are paid |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount |
| When Admin sets the business date to "07 January 2024" |
| When Admin successfully disburse the loan on "07 January 2024" with "750" EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 07 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 752.34 | 247.66 | 7.17 | 0.0 | 0.0 | 254.83 | 0.0 | 0.0 | 0.0 | 254.83 | |
| | 2 | 29 | 01 March 2024 | | 503.41 | 248.93 | 5.9 | 0.0 | 0.0 | 254.83 | 0.0 | 0.0 | 0.0 | 254.83 | |
| | 3 | 31 | 01 April 2024 | | 252.8 | 250.61 | 4.22 | 0.0 | 0.0 | 254.83 | 0.0 | 0.0 | 0.0 | 254.83 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 252.8 | 2.05 | 0.0 | 0.0 | 254.85 | 0.0 | 0.0 | 0.0 | 254.85 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 19.34 | 0.0 | 0.0 | 1019.34 | 0.0 | 0.0 | 0.0 | 1019.34 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 07 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 254.83 EUR transaction amount |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 254.83 EUR transaction amount |
| When Admin sets the business date to "01 April 2024" |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 254.83 EUR transaction amount |
| When Admin sets the business date to "01 May 2024" |
| And Customer makes "AUTOPAY" repayment on "01 May 2024" with 254.85 EUR transaction amount |
| When Admin sets the business date to "10 May 2024" |
| When Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "10 May 2024" with 500 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 07 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 752.34 | 247.66 | 7.17 | 0.0 | 0.0 | 254.83 | 254.83 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 01 March 2024 | 503.41 | 248.93 | 5.9 | 0.0 | 0.0 | 254.83 | 254.83 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 252.8 | 250.61 | 4.22 | 0.0 | 0.0 | 254.83 | 254.83 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 0.0 | 252.8 | 2.05 | 0.0 | 0.0 | 254.85 | 254.85 | 0.0 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 19.34 | 0.0 | 0.0 | 1019.34 | 1019.34 | 0.0 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 07 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 254.83 | 247.66 | 7.17 | 0.0 | 0.0 | 752.34 | false | false | |
| | 01 March 2024 | Repayment | 254.83 | 248.93 | 5.9 | 0.0 | 0.0 | 503.41 | false | false | |
| | 01 April 2024 | Repayment | 254.83 | 250.61 | 4.22 | 0.0 | 0.0 | 252.8 | false | false | |
| | 01 May 2024 | Repayment | 254.85 | 252.8 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 May 2024 | Accrual | 19.34 | 0.0 | 19.34 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 May 2024 | Payout Refund | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 May 2024 | Interest Refund | 14.01 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "11 May 2024" |
| When Admin makes Credit Balance Refund transaction on "11 May 2024" with 514.01 EUR transaction amount |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 07 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 752.34 | 247.66 | 7.17 | 0.0 | 0.0 | 254.83 | 254.83 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 01 March 2024 | 503.41 | 248.93 | 5.9 | 0.0 | 0.0 | 254.83 | 254.83 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 252.8 | 250.61 | 4.22 | 0.0 | 0.0 | 254.83 | 254.83 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 0.0 | 252.8 | 2.05 | 0.0 | 0.0 | 254.85 | 254.85 | 0.0 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 19.34 | 0.0 | 0.0 | 1019.34 | 1019.34 | 0.0 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 07 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 254.83 | 247.66 | 7.17 | 0.0 | 0.0 | 752.34 | false | false | |
| | 01 March 2024 | Repayment | 254.83 | 248.93 | 5.9 | 0.0 | 0.0 | 503.41 | false | false | |
| | 01 April 2024 | Repayment | 254.83 | 250.61 | 4.22 | 0.0 | 0.0 | 252.8 | false | false | |
| | 01 May 2024 | Repayment | 254.85 | 252.8 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 May 2024 | Accrual | 19.34 | 0.0 | 19.34 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 May 2024 | Payout Refund | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 May 2024 | Interest Refund | 14.01 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 May 2024 | Credit Balance Refund | 514.01 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3304 |
| Scenario: UC11 - Single disbursement, multiple partial refund within first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount |
| When Admin sets the business date to "14 January 2024" |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 753.25 | 246.75 | 8.39 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 2 | 29 | 01 March 2024 | | 504.02 | 249.23 | 5.91 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 3 | 31 | 01 April 2024 | | 253.11 | 250.91 | 4.23 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 253.11 | 2.05 | 0.0 | 0.0 | 255.16 | 0.0 | 0.0 | 0.0 | 255.16 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 20.58 | 0.0 | 0.0 | 1020.58 | 0.0 | 0.0 | 0.0 | 1020.58 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "14 January 2024" with 500 EUR transaction amount and system-generated Idempotency key |
| When Admin sets the business date to "22 January 2024" |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 14 January 2024 | 748.38 | 251.62 | 3.52 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 499.62 | 248.76 | 6.38 | 0.0 | 0.0 | 255.14 | 246.62 | 246.62 | 0.0 | 8.52 | |
| | 3 | 31 | 01 April 2024 | | 248.67 | 250.95 | 4.19 | 0.0 | 0.0 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 248.67 | 2.02 | 0.0 | 0.0 | 250.69 | 0.0 | 0.0 | 0.0 | 250.69 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 16.11 | 0.0 | 0.0 | 1016.11 | 501.76 | 501.76 | 0.0 | 514.35 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 14 January 2024 | Merchant Issued Refund | 500.0 | 496.48 | 3.52 | 0.0 | 0.0 | 503.52 | false | false | |
| | 14 January 2024 | Interest Refund | 1.76 | 1.76 | 0.0 | 0.0 | 0.0 | 501.76 | false | false | |
| When Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 500 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 4 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 14 January 2024 | 748.38 | 251.62 | 3.52 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 22 January 2024 | 494.32 | 254.06 | 1.08 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 22 January 2024 | 239.18 | 255.14 | 0.0 | 0.0 | 0.0 | 255.14 | 255.14 | 255.14 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 22 January 2024 | 0.0 | 239.18 | 0.0 | 0.0 | 0.0 | 239.18 | 239.18 | 239.18 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 4.6 | 0.0 | 0.0 | 1004.6 | 1004.6 | 1004.6 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 14 January 2024 | Merchant Issued Refund | 500.0 | 496.48 | 3.52 | 0.0 | 0.0 | 503.52 | false | false | |
| | 14 January 2024 | Interest Refund | 1.76 | 1.76 | 0.0 | 0.0 | 0.0 | 501.76 | false | false | |
| | 22 January 2024 | Payout Refund | 500.0 | 498.92 | 1.08 | 0.0 | 0.0 | 2.84 | false | false | |
| | 22 January 2024 | Interest Refund | 2.84 | 2.84 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 22 January 2024 | Accrual | 4.6 | 0.0 | 4.6 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3305 |
| Scenario: UC12 - Single disbursement, multiple partial refund after first installment period |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 836.9 | 163.1 | 8.39 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 2 | 29 | 01 March 2024 | | 671.97 | 164.93 | 6.56 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 3 | 31 | 01 April 2024 | | 506.11 | 165.86 | 5.63 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 4 | 30 | 01 May 2024 | | 338.73 | 167.38 | 4.11 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 5 | 31 | 01 June 2024 | | 170.08 | 168.65 | 2.84 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 170.08 | 1.38 | 0.0 | 0.0 | 171.46 | 0.0 | 0.0 | 0.0 | 171.46 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 28.91 | 0.0 | 0.0 | 1028.91 | 0.0 | 0.0 | 0.0 | 1028.91 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 171.49 EUR transaction amount |
| When Admin sets the business date to "09 February 2024" |
| When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "09 February 2024" with 500 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.9 | 163.1 | 8.39 | 0.0 | 0.0 | 171.49 | 171.49 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 09 February 2024 | 667.22 | 169.68 | 1.81 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 09 February 2024 | 495.73 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | | 331.64 | 164.09 | 7.4 | 0.0 | 0.0 | 171.49 | 162.31 | 162.31 | 0.0 | 9.18 | |
| | 5 | 31 | 01 June 2024 | | 162.93 | 168.71 | 2.78 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 162.93 | 1.32 | 0.0 | 0.0 | 164.25 | 0.0 | 0.0 | 0.0 | 164.25 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 21.7 | 0.0 | 0.0 | 1021.7 | 676.78 | 505.29 | 0.0 | 344.92 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 171.49 | 163.1 | 8.39 | 0.0 | 0.0 | 836.9 | false | false | |
| | 09 February 2024 | Merchant Issued Refund | 500.0 | 498.19 | 1.81 | 0.0 | 0.0 | 338.71 | false | false | |
| | 09 February 2024 | Interest Refund | 5.29 | 5.29 | 0.0 | 0.0 | 0.0 | 333.42 | false | false | |
| When Admin sets the business date to "25 February 2024" |
| When Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "25 February 2024" with 250 EUR transaction amount and system-generated Idempotency key |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 81.24 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.9 | 163.1 | 8.39 | 0.0 | 0.0 | 171.49 | 171.49 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 09 February 2024 | 667.22 | 169.68 | 1.81 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 09 February 2024 | 495.73 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 25 February 2024 | 325.68 | 170.05 | 1.44 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 25 February 2024 | 154.19 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 01 March 2024 | 0.0 | 154.19 | 0.11 | 0.0 | 0.0 | 154.3 | 154.3 | 154.3 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 11.75 | 0.0 | 0.0 | 1011.75 | 1011.75 | 840.26 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 171.49 | 163.1 | 8.39 | 0.0 | 0.0 | 836.9 | false | false | |
| | 09 February 2024 | Merchant Issued Refund | 500.0 | 498.19 | 1.81 | 0.0 | 0.0 | 338.71 | false | false | |
| | 09 February 2024 | Interest Refund | 5.29 | 5.29 | 0.0 | 0.0 | 0.0 | 333.42 | false | false | |
| | 25 February 2024 | Payout Refund | 250.0 | 248.56 | 1.44 | 0.0 | 0.0 | 84.86 | false | false | |
| | 25 February 2024 | Interest Refund | 3.73 | 3.73 | 0.0 | 0.0 | 0.0 | 81.13 | false | false | |
| | 01 March 2024 | Repayment | 81.24 | 81.13 | 0.11 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 March 2024 | Accrual | 11.75 | 0.0 | 11.75 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3306 |
| Scenario: UC13 - Multi disbursements, same days, multiple partial refund within first installment period |
| When Admin sets the business date to "01 January 2024" |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| And Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount |
| And Admin successfully disburse the loan on "01 January 2024" with "750" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 836.9 | 163.1 | 8.39 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 2 | 29 | 01 March 2024 | | 671.97 | 164.93 | 6.56 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 3 | 31 | 01 April 2024 | | 506.11 | 165.86 | 5.63 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 4 | 30 | 01 May 2024 | | 338.73 | 167.38 | 4.11 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 5 | 31 | 01 June 2024 | | 170.08 | 168.65 | 2.84 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 170.08 | 1.38 | 0.0 | 0.0 | 171.46 | 0.0 | 0.0 | 0.0 | 171.46 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 28.91 | 0.0 | 0.0 | 1028.91 | 0.0 | 0.0 | 0.0 | 1028.91 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 01 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| When Admin sets the business date to "22 January 2024" |
| And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 500 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 834.19 | 165.81 | 5.68 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 22 January 2024 | 662.7 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | | 500.73 | 161.97 | 9.52 | 0.0 | 0.0 | 171.49 | 159.86 | 159.86 | 0.0 | 11.63 | |
| | 4 | 30 | 01 May 2024 | | 333.3 | 167.43 | 4.06 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 5 | 31 | 01 June 2024 | | 164.6 | 168.7 | 2.79 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 164.6 | 1.34 | 0.0 | 0.0 | 165.94 | 0.0 | 0.0 | 0.0 | 165.94 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 23.39 | 0.0 | 0.0 | 1023.39 | 502.84 | 502.84 | 0.0 | 520.55 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 01 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Merchant Issued Refund | 500.0 | 494.32 | 5.68 | 0.0 | 0.0 | 505.68 | false | false | |
| | 22 January 2024 | Interest Refund | 2.84 | 2.84 | 0.0 | 0.0 | 0.0 | 502.84 | false | false | |
| When Admin sets the business date to "26 January 2024" |
| And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "26 January 2024" with 400 EUR transaction amount and system-generated Idempotency key |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 100.85 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 750.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 834.19 | 165.81 | 5.68 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 22 January 2024 | 662.7 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 26 January 2024 | 491.75 | 170.95 | 0.54 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 26 January 2024 | 320.26 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 26 January 2024 | 148.77 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 01 February 2024 | 0.0 | 148.77 | 0.17 | 0.0 | 0.0 | 148.94 | 148.94 | 148.94 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 6.39 | 0.0 | 0.0 | 1006.39 | 1006.39 | 1006.39 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 01 January 2024 | Disbursement | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Merchant Issued Refund | 500.0 | 494.32 | 5.68 | 0.0 | 0.0 | 505.68 | false | false | |
| | 22 January 2024 | Interest Refund | 2.84 | 2.84 | 0.0 | 0.0 | 0.0 | 502.84 | false | false | |
| | 26 January 2024 | Payout Refund | 400.0 | 399.46 | 0.54 | 0.0 | 0.0 | 103.38 | false | false | |
| | 26 January 2024 | Interest Refund | 2.7 | 2.7 | 0.0 | 0.0 | 0.0 | 100.68 | false | false | |
| | 01 February 2024 | Repayment | 100.85 | 100.68 | 0.17 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 February 2024 | Accrual | 6.39 | 0.0 | 6.39 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3307 |
| Scenario: UC14 - Multi disbursements, different days, multiple partial refunds within first installment period |
| When Admin sets the business date to "01 January 2024" |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| And Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount |
| And Admin successfully disburse the loan on "01 January 2024" with "250" EUR transaction amount |
| When Admin sets the business date to "05 January 2024" |
| And Admin successfully disburse the loan on "05 January 2024" with "500" EUR transaction amount |
| When Admin sets the business date to "22 January 2024" |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 2 | 29 | 01 March 2024 | | 671.62 | 164.83 | 6.56 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 3 | 31 | 01 April 2024 | | 505.86 | 165.76 | 5.63 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 4 | 30 | 01 May 2024 | | 338.57 | 167.29 | 4.1 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 5 | 31 | 01 June 2024 | | 170.02 | 168.55 | 2.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 170.02 | 1.38 | 0.0 | 0.0 | 171.4 | 0.0 | 0.0 | 0.0 | 171.4 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 28.35 | 0.0 | 0.0 | 1028.35 | 0.0 | 0.0 | 0.0 | 1028.35 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "22 January 2024" with 250 EUR transaction amount and system-generated Idempotency key |
| When Admin sets the business date to "26 January 2024" |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 833.75 | 166.25 | 5.14 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 670.31 | 163.44 | 7.95 | 0.0 | 0.0 | 171.39 | 80.03 | 80.03 | 0.0 | 91.36 | |
| | 3 | 31 | 01 April 2024 | | 504.54 | 165.77 | 5.62 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 4 | 30 | 01 May 2024 | | 337.24 | 167.3 | 4.09 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 5 | 31 | 01 June 2024 | | 168.68 | 168.56 | 2.83 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 168.68 | 1.37 | 0.0 | 0.0 | 170.05 | 0.0 | 0.0 | 0.0 | 170.05 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 27.0 | 0.0 | 0.0 | 1027.0 | 251.42 | 251.42 | 0.0 | 775.58 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Payout Refund | 250.0 | 244.86 | 5.14 | 0.0 | 0.0 | 755.14 | false | false | |
| | 22 January 2024 | Interest Refund | 1.42 | 1.42 | 0.0 | 0.0 | 0.0 | 753.72 | false | false | |
| And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "26 January 2024" with 400 EUR transaction amount and system-generated Idempotency key |
| When Admin sets the business date to "01 February 2024" |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 833.75 | 166.25 | 5.14 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 26 January 2024 | 663.17 | 170.58 | 0.81 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 26 January 2024 | 491.78 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | | 329.54 | 162.24 | 9.15 | 0.0 | 0.0 | 171.39 | 139.79 | 139.79 | 0.0 | 31.6 | |
| | 5 | 31 | 01 June 2024 | | 160.91 | 168.63 | 2.76 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 160.91 | 1.31 | 0.0 | 0.0 | 162.22 | 0.0 | 0.0 | 0.0 | 162.22 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 19.17 | 0.0 | 0.0 | 1019.17 | 653.96 | 653.96 | 0.0 | 365.21 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Payout Refund | 250.0 | 244.86 | 5.14 | 0.0 | 0.0 | 755.14 | false | false | |
| | 22 January 2024 | Interest Refund | 1.42 | 1.42 | 0.0 | 0.0 | 0.0 | 753.72 | false | false | |
| | 26 January 2024 | Merchant Issued Refund | 400.0 | 399.19 | 0.81 | 0.0 | 0.0 | 354.53 | false | false | |
| | 26 January 2024 | Interest Refund | 2.54 | 2.54 | 0.0 | 0.0 | 0.0 | 351.99 | false | false | |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 31.60 EUR transaction amount |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 171.39 EUR transaction amount |
| When Admin sets the business date to "01 April 2024" |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 153.38 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 22 January 2024 | 833.75 | 166.25 | 5.14 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 26 January 2024 | 663.17 | 170.58 | 0.81 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 26 January 2024 | 491.78 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 February 2024 | 320.97 | 170.81 | 0.58 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 March 2024 | 152.1 | 168.87 | 2.52 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 01 April 2024 | 0.0 | 152.1 | 1.28 | 0.0 | 0.0 | 153.38 | 153.38 | 153.38 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 10.33 | 0.0 | 0.0 | 1010.33 | 1010.33 | 1010.33 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 01 January 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2024 | Payout Refund | 250.0 | 244.86 | 5.14 | 0.0 | 0.0 | 755.14 | false | false | |
| | 22 January 2024 | Interest Refund | 1.42 | 1.42 | 0.0 | 0.0 | 0.0 | 753.72 | false | false | |
| | 26 January 2024 | Merchant Issued Refund | 400.0 | 399.19 | 0.81 | 0.0 | 0.0 | 354.53 | false | false | |
| | 26 January 2024 | Interest Refund | 2.54 | 2.54 | 0.0 | 0.0 | 0.0 | 351.99 | false | false | |
| | 01 February 2024 | Repayment | 31.6 | 31.02 | 0.58 | 0.0 | 0.0 | 320.97 | false | false | |
| | 01 March 2024 | Repayment | 171.39 | 168.87 | 2.52 | 0.0 | 0.0 | 152.1 | false | false | |
| | 01 April 2024 | Repayment | 153.38 | 152.1 | 1.28 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 April 2024 | Accrual | 10.33 | 0.0 | 10.33 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3308 |
| Scenario: UC15 - Multi disbursements, different days, multiple partial refunds after first installment period |
| When Admin sets the business date to "01 January 2024" |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| And Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount |
| When Admin sets the business date to "05 January 2024" |
| And Admin successfully disburse the loan on "05 January 2024" with "500" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 2 | 29 | 01 March 2024 | | 671.62 | 164.83 | 6.56 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 3 | 31 | 01 April 2024 | | 505.86 | 165.76 | 5.63 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 4 | 30 | 01 May 2024 | | 338.57 | 167.29 | 4.1 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 5 | 31 | 01 June 2024 | | 170.02 | 168.55 | 2.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 170.02 | 1.38 | 0.0 | 0.0 | 171.4 | 0.0 | 0.0 | 0.0 | 171.4 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 28.35 | 0.0 | 0.0 | 1028.35 | 0.0 | 0.0 | 0.0 | 1028.35 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 171.39 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 671.62 | 164.83 | 6.56 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 3 | 31 | 01 April 2024 | | 505.86 | 165.76 | 5.63 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 4 | 30 | 01 May 2024 | | 338.57 | 167.29 | 4.1 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 5 | 31 | 01 June 2024 | | 170.02 | 168.55 | 2.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 170.02 | 1.38 | 0.0 | 0.0 | 171.4 | 0.0 | 0.0 | 0.0 | 171.4 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 28.35 | 0.0 | 0.0 | 1028.35 | 171.39 | 0.0 | 0.0 | 856.96 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | |
| When Admin sets the business date to "13 February 2024" |
| And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "13 February 2024" with 250 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | | 504.0 | 163.78 | 7.61 | 0.0 | 0.0 | 171.39 | 81.52 | 81.52 | 0.0 | 89.87 | |
| | 4 | 30 | 01 May 2024 | | 336.7 | 167.3 | 4.09 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 5 | 31 | 01 June 2024 | | 168.13 | 168.57 | 2.82 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 168.13 | 1.36 | 0.0 | 0.0 | 169.49 | 0.0 | 0.0 | 0.0 | 169.49 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 26.44 | 0.0 | 0.0 | 1026.44 | 424.3 | 252.91 | 0.0 | 602.14 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | |
| | 13 February 2024 | Payout Refund | 250.0 | 247.28 | 2.72 | 0.0 | 0.0 | 589.17 | false | false | |
| | 13 February 2024 | Interest Refund | 2.91 | 2.91 | 0.0 | 0.0 | 0.0 | 586.26 | false | false | |
| When Admin sets the business date to "24 February 2024" |
| And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "24 February 2024" with 400 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 24 February 2024 | 498.13 | 169.65 | 1.74 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 24 February 2024 | 326.74 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | | 160.19 | 166.55 | 4.84 | 0.0 | 0.0 | 171.39 | 144.44 | 144.44 | 0.0 | 26.95 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 160.19 | 1.3 | 0.0 | 0.0 | 161.49 | 0.0 | 0.0 | 0.0 | 161.49 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 18.44 | 0.0 | 0.0 | 1018.44 | 830.0 | 658.61 | 0.0 | 188.44 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | |
| | 13 February 2024 | Payout Refund | 250.0 | 247.28 | 2.72 | 0.0 | 0.0 | 589.17 | false | false | |
| | 13 February 2024 | Interest Refund | 2.91 | 2.91 | 0.0 | 0.0 | 0.0 | 586.26 | false | false | |
| | 24 February 2024 | Merchant Issued Refund | 400.0 | 398.26 | 1.74 | 0.0 | 0.0 | 188.0 | false | false | |
| | 24 February 2024 | Interest Refund | 5.7 | 5.7 | 0.0 | 0.0 | 0.0 | 182.3 | false | false | |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 26.95 EUR transaction amount |
| When Admin sets the business date to "01 April 2024" |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 156.96 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 24 February 2024 | 498.13 | 169.65 | 1.74 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 24 February 2024 | 326.74 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 March 2024 | 155.65 | 171.09 | 0.3 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 01 April 2024 | 0.0 | 155.65 | 1.31 | 0.0 | 0.0 | 156.96 | 156.96 | 156.96 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 13.91 | 0.0 | 0.0 | 1013.91 | 1013.91 | 842.52 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | |
| | 13 February 2024 | Payout Refund | 250.0 | 247.28 | 2.72 | 0.0 | 0.0 | 589.17 | false | false | |
| | 13 February 2024 | Interest Refund | 2.91 | 2.91 | 0.0 | 0.0 | 0.0 | 586.26 | false | false | |
| | 24 February 2024 | Merchant Issued Refund | 400.0 | 398.26 | 1.74 | 0.0 | 0.0 | 188.0 | false | false | |
| | 24 February 2024 | Interest Refund | 5.7 | 5.7 | 0.0 | 0.0 | 0.0 | 182.3 | false | false | |
| | 01 March 2024 | Repayment | 26.95 | 26.65 | 0.3 | 0.0 | 0.0 | 155.65 | false | false | |
| | 01 April 2024 | Repayment | 156.96 | 155.65 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 April 2024 | Accrual | 13.91 | 0.0 | 13.91 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3309 |
| Scenario: UC16 - Multi disbursements, different days, multiple partial refunds crossing multiple installment periods |
| When Admin sets the business date to "01 January 2024" |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| And Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount |
| When Admin sets the business date to "05 January 2024" |
| And Admin successfully disburse the loan on "05 January 2024" with "500" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 2 | 29 | 01 March 2024 | | 671.62 | 164.83 | 6.56 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 3 | 31 | 01 April 2024 | | 505.86 | 165.76 | 5.63 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 4 | 30 | 01 May 2024 | | 338.57 | 167.29 | 4.1 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 5 | 31 | 01 June 2024 | | 170.02 | 168.55 | 2.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 170.02 | 1.38 | 0.0 | 0.0 | 171.4 | 0.0 | 0.0 | 0.0 | 171.4 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 28.35 | 0.0 | 0.0 | 1028.35 | 0.0 | 0.0 | 0.0 | 1028.35 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 171.39 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 671.62 | 164.83 | 6.56 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 3 | 31 | 01 April 2024 | | 505.86 | 165.76 | 5.63 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 4 | 30 | 01 May 2024 | | 338.57 | 167.29 | 4.1 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 5 | 31 | 01 June 2024 | | 170.02 | 168.55 | 2.84 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 170.02 | 1.38 | 0.0 | 0.0 | 171.4 | 0.0 | 0.0 | 0.0 | 171.4 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 28.35 | 0.0 | 0.0 | 1028.35 | 171.39 | 0.0 | 0.0 | 856.96 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | |
| When Admin sets the business date to "13 February 2024" |
| And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "13 February 2024" with 400 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 13 February 2024 | 496.39 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | | 334.16 | 162.23 | 9.16 | 0.0 | 0.0 | 171.39 | 61.88 | 61.88 | 0.0 | 109.51 | |
| | 5 | 31 | 01 June 2024 | | 165.57 | 168.59 | 2.8 | 0.0 | 0.0 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 165.57 | 1.34 | 0.0 | 0.0 | 166.91 | 0.0 | 0.0 | 0.0 | 166.91 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 23.86 | 0.0 | 0.0 | 1023.86 | 576.05 | 404.66 | 0.0 | 447.81 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | |
| | 13 February 2024 | Merchant Issued Refund | 400.0 | 397.28 | 2.72 | 0.0 | 0.0 | 439.17 | false | false | |
| | 13 February 2024 | Interest Refund | 4.66 | 4.66 | 0.0 | 0.0 | 0.0 | 434.51 | false | false | |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 109.62 EUR transaction amount |
| When Admin sets the business date to "01 April 2024" |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 171.39 EUR transaction amount |
| When Admin sets the business date to "06 April 2024" |
| And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "06 April 2024" with 400 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 13 February 2024 | 496.39 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 March 2024 | 326.99 | 169.4 | 1.99 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 April 2024 | 158.34 | 168.65 | 2.74 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 06 April 2024 | 0.0 | 158.34 | 0.21 | 0.0 | 0.0 | 158.55 | 158.55 | 158.55 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 15.5 | 0.0 | 0.0 | 1015.5 | 1015.5 | 844.11 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | |
| | 13 February 2024 | Merchant Issued Refund | 400.0 | 397.28 | 2.72 | 0.0 | 0.0 | 439.17 | false | false | |
| | 13 February 2024 | Interest Refund | 4.66 | 4.66 | 0.0 | 0.0 | 0.0 | 434.51 | false | false | |
| | 01 March 2024 | Repayment | 109.62 | 107.63 | 1.99 | 0.0 | 0.0 | 326.88 | false | false | |
| | 01 April 2024 | Repayment | 171.39 | 168.65 | 2.74 | 0.0 | 0.0 | 158.23 | false | false | |
| | 06 April 2024 | Payout Refund | 400.0 | 158.23 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 April 2024 | Interest Refund | 9.14 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 April 2024 | Accrual | 15.5 | 0.0 | 15.5 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "07 April 2024" |
| When Admin makes Credit Balance Refund transaction on "07 April 2024" with 250.7 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | | | 05 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 836.45 | 163.55 | 7.84 | 0.0 | 0.0 | 171.39 | 171.39 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 13 February 2024 | 667.78 | 168.67 | 2.72 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 13 February 2024 | 496.39 | 171.39 | 0.0 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 March 2024 | 326.99 | 169.4 | 1.99 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 April 2024 | 158.34 | 168.65 | 2.74 | 0.0 | 0.0 | 171.39 | 171.39 | 171.39 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 06 April 2024 | 0.0 | 158.34 | 0.21 | 0.0 | 0.0 | 158.55 | 158.55 | 158.55 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 15.5 | 0.0 | 0.0 | 1015.5 | 1015.5 | 844.11 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | false | |
| | 05 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 01 February 2024 | Repayment | 171.39 | 163.55 | 7.84 | 0.0 | 0.0 | 836.45 | false | false | |
| | 13 February 2024 | Merchant Issued Refund | 400.0 | 397.28 | 2.72 | 0.0 | 0.0 | 439.17 | false | false | |
| | 13 February 2024 | Interest Refund | 4.66 | 4.66 | 0.0 | 0.0 | 0.0 | 434.51 | false | false | |
| | 01 March 2024 | Repayment | 109.62 | 107.63 | 1.99 | 0.0 | 0.0 | 326.88 | false | false | |
| | 01 April 2024 | Repayment | 171.39 | 168.65 | 2.74 | 0.0 | 0.0 | 158.23 | false | false | |
| | 06 April 2024 | Payout Refund | 400.0 | 158.23 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 April 2024 | Interest Refund | 9.14 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 April 2024 | Accrual | 15.5 | 0.0 | 15.5 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 April 2024 | Credit Balance Refund | 250.7 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3310 |
| Scenario: UC17 - Single disbursement, multiple partial refund within first installment period, one time payment prior to refund |
| When Admin sets the business date to "01 January 2024" |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2024 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" |
| And Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount |
| When Admin sets the business date to "12 January 2024" |
| And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "12 January 2024" with 400 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 12 January 2024 | 831.49 | 168.51 | 2.98 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 12 January 2024 | 660.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | | 501.53 | 158.47 | 13.02 | 0.0 | 0.0 | 171.49 | 58.21 | 58.21 | 0.0 | 113.28 | |
| | 4 | 30 | 01 May 2024 | | 334.11 | 167.42 | 4.07 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 5 | 31 | 01 June 2024 | | 165.42 | 168.69 | 2.8 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 165.42 | 1.34 | 0.0 | 0.0 | 166.76 | 0.0 | 0.0 | 0.0 | 166.76 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 24.21 | 0.0 | 0.0 | 1024.21 | 401.19 | 401.19 | 0.0 | 623.02 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 12 January 2024 | Payout Refund | 400.0 | 397.02 | 2.98 | 0.0 | 0.0 | 602.98 | false | false | |
| | 12 January 2024 | Interest Refund | 1.19 | 1.19 | 0.0 | 0.0 | 0.0 | 601.79 | false | false | |
| When Admin sets the business date to "17 January 2024" |
| And Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "17 January 2024" with 150 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 12 January 2024 | 831.49 | 168.51 | 2.98 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 12 January 2024 | 660.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 17 January 2024 | 489.32 | 170.68 | 0.81 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | | 330.67 | 158.65 | 12.84 | 0.0 | 0.0 | 171.49 | 37.37 | 37.37 | 0.0 | 134.12 | |
| | 5 | 31 | 01 June 2024 | | 161.95 | 168.72 | 2.77 | 0.0 | 0.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 161.95 | 1.31 | 0.0 | 0.0 | 163.26 | 0.0 | 0.0 | 0.0 | 163.26 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 20.71 | 0.0 | 0.0 | 1020.71 | 551.84 | 551.84 | 0.0 | 468.87 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 12 January 2024 | Payout Refund | 400.0 | 397.02 | 2.98 | 0.0 | 0.0 | 602.98 | false | false | |
| | 12 January 2024 | Interest Refund | 1.19 | 1.19 | 0.0 | 0.0 | 0.0 | 601.79 | false | false | |
| | 17 January 2024 | Merchant Issued Refund | 150.0 | 149.19 | 0.81 | 0.0 | 0.0 | 452.6 | false | false | |
| | 17 January 2024 | Interest Refund | 0.65 | 0.65 | 0.0 | 0.0 | 0.0 | 451.95 | false | false | |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 134.11 EUR transaction amount |
| When Admin sets the business date to "08 February 2024" |
| And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "01 February 2024" with 250 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 12 January 2024 | 831.49 | 168.51 | 2.98 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 12 January 2024 | 660.0 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 17 January 2024 | 489.32 | 170.68 | 0.81 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 February 2024 | 319.66 | 169.66 | 1.83 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 February 2024 | 148.17 | 171.49 | 0.0 | 0.0 | 0.0 | 171.49 | 171.49 | 171.49 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 148.17 | 2.77 | 0.0 | 0.0 | 150.94 | 80.6 | 80.6 | 0.0 | 70.34 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 8.39 | 0.0 | 0.0 | 1008.39 | 938.05 | 938.05 | 0.0 | 70.34 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 12 January 2024 | Payout Refund | 400.0 | 397.02 | 2.98 | 0.0 | 0.0 | 602.98 | false | false | |
| | 12 January 2024 | Interest Refund | 1.19 | 1.19 | 0.0 | 0.0 | 0.0 | 601.79 | false | false | |
| | 17 January 2024 | Merchant Issued Refund | 150.0 | 149.19 | 0.81 | 0.0 | 0.0 | 452.6 | false | false | |
| | 17 January 2024 | Interest Refund | 0.65 | 0.65 | 0.0 | 0.0 | 0.0 | 451.95 | false | false | |
| | 01 February 2024 | Repayment | 134.11 | 132.29 | 1.82 | 0.0 | 0.0 | 319.66 | false | false | |
| | 01 February 2024 | Payout Refund | 250.0 | 249.99 | 0.01 | 0.0 | 0.0 | 69.67 | false | false | |
| | 01 February 2024 | Interest Refund | 2.1 | 2.1 | 0.0 | 0.0 | 0.0 | 67.57 | false | false | |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 68.1 EUR transaction amount |
| Then Loan status will be "CLOSED_OBLIGATIONS_MET" |
| |
| @TestRailId:C3288 |
| Scenario: Verify the recalculated EMI after interest rate change on the repayment schedule |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| When Admin sets the business date to "15 January 2024" |
| When Admin runs inline COB job for Loan |
| When Admin sets the business date to "01 February 2024" |
| When Admin runs inline COB job for Loan |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 33.91 EUR transaction amount |
| When Admin creates and approves Loan reschedule with the following data: |
| | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | |
| | 02 February 2024 | 01 February 2024 | | | | | 4 | |
| When Admin runs inline COB job for Loan |
| When Admin sets the business date to "02 February 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 66.56 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 16.9 | 16.9 | 0.0 | 0.11 | |
| | 3 | 31 | 01 April 2024 | | 50.17 | 16.39 | 0.44 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | |
| | 4 | 30 | 01 May 2024 | | 33.51 | 16.66 | 0.17 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | |
| | 5 | 31 | 01 June 2024 | | 16.79 | 16.72 | 0.11 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.79 | 0.06 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.36 | 0.0 | 0.0 | 101.36 | 33.91 | 16.9 | 0.0 | 67.45 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 20 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 22 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 23 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 25 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 26 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 28 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 February 2024 | Repayment | 33.91 | 33.33 | 0.58 | 0.0 | 0.0 | 66.67 | false | false | |
| | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3289 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC1: 360/30, early repayment with amount less then emi amount |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 15 EUR on 15 Jan --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 15 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.53 | 16.47 | 0.54 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 66.92 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.21 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.41 | 16.8 | 0.21 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.51 | 16.9 | 0.11 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.51 | 0.01 | 0.0 | 0.0 | 16.52 | 15.0 | 15.0 | 0.0 | 1.52 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 15 | 15 | 0.0 | 86.57 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 15.0 | 15.0 | 0.0 | 0.0 | 0.0 | 85.0 | false | false | |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| |
| @TestRailId:C3290 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC2: 360/30, early repayment emi amount paid |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 17.01 EUR on 15 Jan --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 17.01 | 0.0 | 84.49 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| |
| @TestRailId:C3291 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC3: 360/30, early repayment with excess emi amount paid |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 34.02 EUR on 15 Jan --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 34.02 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.46 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 66.74 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 49.92 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 34.02 | 15.9 | 0.09 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | |
| | 5 | 31 | 01 June 2024 | 15 January 2024 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.04 | 0.0 | 0.0 | 101.04 | 34.02 | 34.02 | 0.0 | 67.02 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 34.02 | 34.02 | 0.0 | 0.0 | 0.0 | 65.98 | false | false | |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| |
| @TestRailId:C3292 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC4: 360/30, pre-closure after early payment |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 17.01 EUR on 15 Jan --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| # --- schedule allocation before pre-closure --- |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 17.01 | 0.0 | 84.49 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | |
| # --- Early repayment with 83.07 EUR on 20 Jan --- |
| When Admin sets the business date to "20 January 2024" |
| And Customer makes "AUTOPAY" repayment on "20 January 2024" with 83.33 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| # --- schedule allocation after pre-closure --- |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 20 January 2024 | 85.05 | 14.95 | 0.34 | 0.0 | 0.0 | 15.29 | 15.29 | 15.29 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 20 January 2024 | 68.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 20 January 2024 | 51.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 20 January 2024 | 34.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 20 January 2024 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 0.34 | 0.0 | 0.0 | 100.34 | 100.34 | 100.34 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | |
| | 20 January 2024 | Repayment | 83.33 | 82.99 | 0.34 | 0.0 | 0.0 | 0.0 | false | false | |
| | 20 January 2024 | Accrual | 0.1 | 0.0 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| |
| @TestRailId:C3312 |
| Scenario: Verify Interest recalculation - EARLY repayment, adjust LAST installment - UC5: 360/30, interest modification after early payment |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- Early repayment with 17.01 EUR on 15 Jan --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 17.01 | 0.0 | 84.49 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | |
| # --- interest change to 0.04(4%) on 20 Jan --- |
| When Admin sets the business date to "20 January 2024" |
| When Admin creates and approves Loan reschedule with the following data: |
| | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | |
| | 21 January 2024 | 20 January 2024 | | | | | 4 | |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.65 | 16.35 | 0.45 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | |
| | 2 | 29 | 01 March 2024 | | 67.07 | 16.58 | 0.22 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | |
| | 3 | 31 | 01 April 2024 | | 50.44 | 16.63 | 0.17 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | |
| | 4 | 30 | 01 May 2024 | | 33.75 | 16.69 | 0.11 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | |
| | 5 | 31 | 01 June 2024 | | 17.01 | 16.74 | 0.06 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.01 | 0.0 | 0.0 | 101.01 | 17.01 | 17.01 | 0.0 | 84.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 02 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 07 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 08 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 09 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 12 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 13 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | |
| | 15 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 17 January 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| | 18 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| |
| @TestRailId:C3297 |
| Scenario: Verify the Loan reschedule - Interest modification - UC1: Interest modification after early payment with Adjustment to NEXT installment |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- 1st installment paid on due date --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.0 | 16.25 | 0.76 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.01 | 17.01 | 0.0 | 84.99 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | |
| # --- Loan reschedule: Interest rate modification between two installments --- |
| When Admin sets the business date to "19 January 2024" |
| When Admin creates and approves Loan reschedule with the following data: |
| | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | |
| | 20 January 2024 | 19 January 2024 | | | | | 4 | |
| When Admin runs inline COB job for Loan |
| When Admin sets the business date to "20 January 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 66.86 | 16.39 | 0.46 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | |
| | 3 | 31 | 01 April 2024 | | 50.23 | 16.63 | 0.22 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | |
| | 4 | 30 | 01 May 2024 | | 33.55 | 16.68 | 0.17 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | |
| | 5 | 31 | 01 June 2024 | | 16.81 | 16.74 | 0.11 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.06 | 0.0 | 0.0 | 16.87 | 0.0 | 0.0 | 0.0 | 16.87 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.28 | 0.0 | 0.0 | 101.28 | 17.01 | 17.01 | 0.0 | 84.27 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | |
| | 18 January 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | |
| | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3298 |
| Scenario: Verify the Loan reschedule - Interest modification - UC2: Interest modification after early partial payment with Adjustment to NEXT installment |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- 1st installment paid on due date --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.0 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.24 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 17.0 | 17.0 | 0.0 | 0.01 | |
| | 2 | 29 | 01 March 2024 | | 67.0 | 16.24 | 0.77 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.0 | 17.0 | 0.0 | 85.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 January 2024 | Repayment | 17.0 | 16.75 | 0.25 | 0.0 | 0.0 | 83.25 | false | false | |
| # --- Loan reschedule: Interest rate modification between two installments --- |
| When Admin sets the business date to "19 January 2024" |
| When Admin creates and approves Loan reschedule with the following data: |
| | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | |
| | 20 January 2024 | 19 January 2024 | | | | | 4 | |
| When Admin runs inline COB job for Loan |
| When Admin sets the business date to "20 January 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.24 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 17.0 | 17.0 | 0.0 | 0.01 | |
| | 2 | 29 | 01 March 2024 | | 66.86 | 16.38 | 0.47 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | |
| | 3 | 31 | 01 April 2024 | | 50.23 | 16.63 | 0.22 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | |
| | 4 | 30 | 01 May 2024 | | 33.55 | 16.68 | 0.17 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | |
| | 5 | 31 | 01 June 2024 | | 16.81 | 16.74 | 0.11 | 0.0 | 0.0 | 16.85 | 0.0 | 0.0 | 0.0 | 16.85 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.06 | 0.0 | 0.0 | 16.87 | 0.0 | 0.0 | 0.0 | 16.87 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.28 | 0.0 | 0.0 | 101.28 | 17.0 | 17.0 | 0.0 | 84.28 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 January 2024 | Repayment | 17.0 | 16.75 | 0.25 | 0.0 | 0.0 | 83.25 | false | false | |
| | 18 January 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | |
| | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3311 |
| Scenario: Verify the Loan reschedule - Interest modification - UC2: Interest modification after early partial payment with Adjustment to LAST installment |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- 1st installment paid on due date --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 66.9 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.18 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.36 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 17.01 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 17.01 | 0.0 | 84.49 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | |
| # --- Loan reschedule: Interest rate modification between two installments --- |
| When Admin sets the business date to "19 January 2024" |
| When Admin creates and approves Loan reschedule with the following data: |
| | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | |
| | 20 January 2024 | 19 January 2024 | | | | | 4 | |
| When Admin runs inline COB job for Loan |
| When Admin sets the business date to "20 January 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.64 | 16.36 | 0.44 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | |
| | 2 | 29 | 01 March 2024 | | 67.06 | 16.58 | 0.22 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.63 | 0.17 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | |
| | 4 | 30 | 01 May 2024 | | 33.74 | 16.69 | 0.11 | 0.0 | 0.0 | 16.8 | 0.0 | 0.0 | 0.0 | 16.8 | |
| | 5 | 31 | 01 June 2024 | | 17.01 | 16.73 | 0.06 | 0.0 | 0.0 | 16.79 | 0.0 | 0.0 | 0.0 | 16.79 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.0 | 0.0 | 0.0 | 101.0 | 17.01 | 17.01 | 0.0 | 83.99 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | false | |
| | 18 January 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | |
| | 19 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| |
| @TestRailId:C3299 |
| Scenario: Verify the Loan reschedule - Interest modification - UC2: Interest modification after first installment with Adjustment to NEXT installment |
| When Admin sets the business date to "01 January 2024" |
| When Admin creates a client with random data |
| When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| When 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_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" |
| When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| # --- 1st installment paid on due date --- |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.0 | 16.25 | 0.76 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.01 | 17.01 | 0.0 | 84.99 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | |
| # --- Loan reschedule: Interest rate modification on Feb 15 --- |
| When Admin sets the business date to "15 February 2024" |
| When Admin creates and approves Loan reschedule with the following data: |
| | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | |
| | 16 February 2024 | 15 February 2024 | | | | | 4 | |
| When Admin runs inline COB job for Loan |
| When Admin sets the business date to "16 February 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan Repayment schedule has 6 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 | |
| | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 15 January 2024 | 83.25 | 16.75 | 0.26 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.01 | 16.24 | 0.65 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | |
| | 3 | 31 | 01 April 2024 | | 50.34 | 16.67 | 0.22 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | |
| | 4 | 30 | 01 May 2024 | | 33.62 | 16.72 | 0.17 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | |
| | 5 | 31 | 01 June 2024 | | 16.84 | 16.78 | 0.11 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.84 | 0.06 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 1.47 | 0.0 | 0.0 | 101.47 | 17.01 | 17.01 | 0.0 | 84.46 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | |
| | 15 January 2024 | Repayment | 17.01 | 16.75 | 0.26 | 0.0 | 0.0 | 83.25 | false | false | |
| | 14 February 2024 | Accrual | 0.75 | 0.0 | 0.75 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3301 |
| Scenario: UC18-1 - In case of backdated repayment the Interest Refund transaction needs to be recalculated |
| # using 2021 for the test since as per UC - non-leap year with 365 days should be used |
| When Admin sets the business date to "01 January 2021" |
| When Admin creates a client with random data |
| When 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_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 01 January 2021 | 1000 | 9.9 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS | 1 | MONTHS | 1 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 January 2021" with "1000" amount and expected disbursement date on "01 January 2021" |
| When Admin successfully disburse the loan on "01 January 2021" with "1000" EUR transaction amount |
| When Admin sets the business date to "22 January 2021" |
| When Customer makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "22 January 2021" with 1000 EUR transaction amount and system-generated Idempotency key |
| Then Loan Repayment schedule has 1 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 | |
| | | | 01 January 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2021 | 22 January 2021 | 0.0 | 1000.0 | 5.7 | 0.0 | 0.0 | 1005.7 | 1005.7 | 1005.7 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 5.7 | 0.0 | 0.0 | 1005.7 | 1005.7 | 1005.7 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 22 January 2021 | Merchant Issued Refund | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 22 January 2021 | Interest Refund | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | |
| | 22 January 2021 | Accrual | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | |
| And Customer makes "AUTOPAY" repayment on "10 January 2021" with 85.63 EUR transaction amount |
| Then Loan Repayment schedule has 1 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 | |
| | | | 01 January 2021 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2021 | 22 January 2021 | 0.0 | 1000.0 | 5.42 | 0.0 | 0.0 | 1005.42 | 1005.42 | 1005.42 | 0.0 | 0.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 5.42 | 0.0 | 0.0 | 1005.42 | 1005.42 | 1005.42 | 0.0 | 0.0 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 January 2021 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | false | |
| | 10 January 2021 | Repayment | 85.63 | 85.63 | 0.0 | 0.0 | 0.0 | 914.37 | false | false | |
| | 22 January 2021 | Accrual | 5.7 | 0.0 | 5.7 | 0.0 | 0.0 | 0.0 | false | false | |
| | 22 January 2021 | Merchant Issued Refund | 1000.0 | 914.37 | 5.42 | 0.0 | 0.0 | 0.0 | false | true | |
| | 22 January 2021 | Interest Refund | 5.42 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | true | |
| | 22 January 2021 | Accrual Adjustment | 0.28 | 0.0 | 0.28 | 0.0 | 0.0 | 0.0 | false | false | |
| |