| @ChargeOffFeature |
| Feature: Charge-off - Part2 |
| |
| @TestRailId:C3315 @AdvancedPaymentAllocation |
| Scenario: Verify charge-off handling and accounting validation with interesting bearing products - from the time of charge off no more disbursement is allowed |
| 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_MULTIDISBURSE | 01 January 2024 | 1500 | 26 | 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 "1500" 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 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | |
| | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | |
| | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 54.75 | 0.0 | 0.0 | 1054.75 | 0.0 | 0.0 | 0.0 | 1054.75 | |
| 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 "02 February 2024" |
| And Admin adds an NSF fee because of payment bounce with "02 February 2024" transaction date |
| And Admin adds a 10 % Processing charge to the loan with "en" locale on date: "02 February 2024" |
| When Admin sets the business date to "05 February 2024" |
| When Admin adds "LOAN_NSF_FEE" due date charge with "10 February 2024" due date and 50 EUR transaction amount |
| When Admin sets the business date to "28 February 2024" |
| And Admin does charge-off the loan on "28 February 2024" |
| Then Loan marked as charged-off on "28 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 | | 757.98 | 242.02 | 21.67 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | |
| | 2 | 29 | 01 March 2024 | | 510.71 | 247.27 | 16.42 | 105.48 | 60.0 | 429.17 | 0.0 | 0.0 | 0.0 | 429.17 | |
| | 3 | 31 | 01 April 2024 | | 258.09 | 252.62 | 11.07 | 0.0 | 0.0 | 263.69 | 0.0 | 0.0 | 0.0 | 263.69 | |
| | 4 | 30 | 01 May 2024 | | 0.0 | 258.09 | 5.59 | 0.0 | 0.0 | 263.68 | 0.0 | 0.0 | 0.0 | 263.68 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000.0 | 54.75 | 105.48 | 60.0 | 1220.23 | 0.0 | 0.0 | 0.0 | 1220.23 | |
| 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 | |
| | 28 February 2024 | Accrual | 36.96 | 0.0 | 36.96 | 0.0 | 0.0 | 0.0 | false | false | |
| | 28 February 2024 | Charge-off | 1220.23 | 1000.0 | 54.75 | 105.48 | 60.0 | 0.0 | false | false | |
| Then Admin fails to disburse the loan on "28 February 2024" with "500" EUR transaction amount because of charge-off that was performed for the loan |
| When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "28 February 2024" with 500 EUR transaction amount and system-generated Idempotency key |
| Then Loan status will be "ACTIVE" |
| Then Loan has 720.23 outstanding amount |
| Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "28 February 2024" which has the following Journal entries: |
| | Type | Account code | Account name | Debit | Credit | |
| | ASSET | 112601 | Loans Receivable | | 1000.0 | |
| | ASSET | 112603 | Interest/Fee Receivable | | 220.23 | |
| | EXPENSE | 744007 | Credit Loss/Bad Debt | 1000.0 | | |
| | INCOME | 404001 | Interest Income Charge Off | 54.75 | | |
| | INCOME | 404008 | Fee Charge Off | 165.48 | | |
| Then Loan Transactions tab has a "REPAYMENT" transaction with date "28 February 2024" which has the following Journal entries: |
| | Type | Account code | Account name | Debit | Credit | |
| | INCOME | 744008 | Recoveries | | 500.0 | |
| | LIABILITY | 145023 | Suspense/Clearing account | 500.0 | | |
| |
| @TestRailId:C3337 @AdvancedPaymentAllocation |
| Scenario: Verify charged off loans to be excluded from scheduled jobs - no interest is added for charged-off loans with 0 interest |
| When Admin sets the business date to "01 June 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_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 June 2024 | 1000 | 10 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" |
| When Admin successfully disburse the loan on "01 June 2024" with "250" 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| When Admin sets the business date to "03 June 2024" |
| And Admin runs inline COB job for Loan |
| 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| And Admin does charge-off the loan on "03 June 2024" |
| When Admin sets the business date to "05 June 2024" |
| And Admin runs inline COB job for Loan |
| 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 June 2024 | Charge-off | 255.23 | 250.0 | 5.23 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3338 @AdvancedPaymentAllocation |
| Scenario: Verify charged off loans to be excluded from scheduled jobs - accrual entries and interest are added when loan has reverted charged-off transaction |
| When Admin sets the business date to "01 June 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_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 June 2024 | 1000 | 10 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" |
| When Admin successfully disburse the loan on "01 June 2024" with "250" 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| When Admin sets the business date to "03 June 2024" |
| And Admin runs inline COB job for Loan |
| 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| And Admin does charge-off the loan on "03 June 2024" |
| When Admin sets the business date to "05 June 2024" |
| And Admin runs inline COB job for Loan |
| 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 June 2024 | Charge-off | 255.23 | 250.0 | 5.23 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "07 June 2024" |
| Then Admin does a charge-off undo the loan |
| And Admin runs inline COB job for Loan |
| 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 June 2024 | Charge-off | 255.23 | 250.0 | 5.23 | 0.0 | 0.0 | 0.0 | true | false | |
| | 05 June 2024 | Accrual | 0.14 | 0.0 | 0.14 | 0.0 | 0.0 | 0.0 | false | false | |
| | 06 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3326 @AdvancedPaymentAllocation |
| Scenario: Verify the repayment schedule is updated before the Charge-off in case of interest recalculation = true |
| 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_PMT_ALLOC_1 | 01 January 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 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 runs inline COB job for Loan |
| Then Loan Repayment schedule has 3 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 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | |
| | 2 | 29 | 01 March 2024 | | 335.27 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | |
| | 3 | 31 | 01 April 2024 | | 0.0 | 335.27 | 1.96 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000 | 11.69 | 0 | 0 | 1011.69 | 0 | 0 | 0 | 1011.69 | |
| When Admin sets the business date to "08 February 2024" |
| When Admin runs inline COB job for Loan |
| # Move the current date into the middle of the 2nd period, so 1st period is past due |
| When Admin sets the business date to "09 February 2024" |
| And Admin does charge-off the loan on "09 February 2024" |
| Then Loan Repayment schedule has 3 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 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | |
| | 2 | 29 | 01 March 2024 | | 335.8 | 332.8 | 4.43 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | |
| | 3 | 31 | 01 April 2024 | | 0.0 | 335.8 | 1.96 | 0.0 | 0.0 | 337.76 | 0.0 | 0.0 | 0.0 | 337.76 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000 | 12.22 | 0 | 0 | 1012.22 | 0 | 0 | 0 | 1012.22 | |
| |
| @TestRailId:C3337 @AdvancedPaymentAllocation |
| Scenario: Verify charged off loans to be excluded from scheduled jobs - no interest is added for charged-off loans with 0 interest |
| When Admin sets the business date to "01 June 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_CUSTOM_PAYMENT_ALLOC_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE | 01 June 2024 | 1000 | 10 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 4 | MONTHS | 1 | MONTHS | 4 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| And Admin successfully approves the loan on "01 June 2024" with "1000" amount and expected disbursement date on "01 June 2024" |
| When Admin successfully disburse the loan on "01 June 2024" with "250" 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| When Admin sets the business date to "03 June 2024" |
| And Admin runs inline COB job for Loan |
| 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| And Admin does charge-off the loan on "03 June 2024" |
| When Admin sets the business date to "05 June 2024" |
| And Admin runs inline COB job for Loan |
| 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 June 2024 | | 250.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 30 | 01 July 2024 | | 188.27 | 61.73 | 2.08 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 2 | 31 | 01 August 2024 | | 126.03 | 62.24 | 1.57 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 3 | 31 | 01 September 2024 | | 63.27 | 62.76 | 1.05 | 0.0 | 0.0 | 63.81 | 0.0 | 0.0 | 0.0 | 63.81 | |
| | 4 | 30 | 01 October 2024 | | 0.0 | 63.27 | 0.53 | 0.0 | 0.0 | 63.8 | 0.0 | 0.0 | 0.0 | 63.8 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 250.0 | 5.23 | 0.0 | 0.0 | 255.23 | 0.0 | 0.0 | 0.0 | 255.23 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | |
| | 01 June 2024 | Disbursement | 250.0 | 0.0 | 0.0 | 0.0 | 0.0 | 250.0 | false | false | |
| | 02 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 June 2024 | Accrual | 0.07 | 0.0 | 0.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 03 June 2024 | Charge-off | 255.23 | 250.0 | 5.23 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3326 @AdvancedPaymentAllocation |
| Scenario: Verify the repayment schedule is updated before the Charge-off in case of interest recalculation = true |
| 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_PMT_ALLOC_1 | 01 January 2024 | 1000 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 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 runs inline COB job for Loan |
| Then Loan Repayment schedule has 3 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 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | |
| | 2 | 29 | 01 March 2024 | | 335.27 | 333.33 | 3.9 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | |
| | 3 | 31 | 01 April 2024 | | 0.0 | 335.27 | 1.96 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000 | 11.69 | 0 | 0 | 1011.69 | 0 | 0 | 0 | 1011.69 | |
| When Admin sets the business date to "08 February 2024" |
| When Admin runs inline COB job for Loan |
| # Move the current date into the middle of the 2nd period, so 1st period is past due |
| When Admin sets the business date to "09 February 2024" |
| And Admin does charge-off the loan on "09 February 2024" |
| Then Loan Repayment schedule has 3 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 | | 668.6 | 331.4 | 5.83 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | |
| | 2 | 29 | 01 March 2024 | | 335.8 | 332.8 | 4.43 | 0.0 | 0.0 | 337.23 | 0.0 | 0.0 | 0.0 | 337.23 | |
| | 3 | 31 | 01 April 2024 | | 0.0 | 335.8 | 1.96 | 0.0 | 0.0 | 337.76 | 0.0 | 0.0 | 0.0 | 337.76 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 1000 | 12.22 | 0 | 0 | 1012.22 | 0 | 0 | 0 | 1012.22 | |
| |
| @TestRailId:C3339 |
| Scenario: Charge-off on due date when loan behavior is zero-interest with interestRecalculation - UC1 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "1 March 2024" |
| And Admin does charge-off the loan on "1 March 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "01 March 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 | | 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.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.07 | 0 | 0 | 101.07 | 17.01 | 0 | 0 | 84.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 | |
| | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3340 |
| Scenario: Charge-off after installment date when loan behavior is zero-interest with interestRecalculation - UC2 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 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.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3341 |
| Scenario: Charge-off in the middle of installment period when loan behavior is zero-interest with interestRecalculation - UC3 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "14 February 2024" |
| And Admin does charge-off the loan on "14 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "14 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 | | 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.78 | 16.79 | 0.22 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 49.77 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 32.76 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 15.75 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 0.8 | 0 | 0 | 100.8 | 17.01 | 0 | 0 | 83.79 | |
| 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 | |
| | 14 February 2024 | Accrual | 0.8 | 0.0 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 February 2024 | Charge-off | 83.79 | 83.57 | 0.22 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3342 |
| Scenario: Charge-off after maturity date when loan behavior is zero-interest with interestRecalculation - UC4 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 May 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 May 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 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 | 2.05 | 0 | 0 | 102.05 | 68.04 | 0 | 0 | 34.01 | |
| When Admin sets the business date to "15 July 2024" |
| And Admin does charge-off the loan on "15 July 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "15 July 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 | | 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 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.2 | 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 | 2.15 | 0 | 0 | 102.15 | 68.04 | 0 | 0 | 34.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 | 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 | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 15 July 2024 | Accrual | 2.15 | 0.0 | 2.15 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 July 2024 | Charge-off | 34.11 | 33.71 | 0.4 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3343 |
| Scenario: Charge-off after one installment is overdue when loan behavior is zero-interest and interestRecalculation - UC5 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "31 March 2024" |
| And Admin does charge-off the loan on "31 March 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "31 March 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 | | 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.51 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.5 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.49 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.54 | 0 | 0 | 101.54 | 17.01 | 0 | 0 | 84.53 | |
| 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 | |
| | 31 March 2024 | Accrual | 1.54 | 0.0 | 1.54 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3344 |
| Scenario: Charge-off with backdated repayment when loan behavior is zero-interest with interestRecalculation - UC6 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "31 March 2024" |
| And Admin does charge-off the loan on "31 March 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "31 March 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 | | 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.51 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.5 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.49 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | 0.0 | 0.0 | 0.0 | 16.49 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.54 | 0 | 0 | 101.54 | 17.01 | 0 | 0 | 84.53 | |
| 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 | |
| | 31 March 2024 | Accrual | 1.54 | 0.0 | 1.54 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | |
| # ----- backdated repayment on 1 March made on 31 March ----- # |
| And Customer makes "AUTOPAY" repayment on "01 March 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | | 50.42 | 16.63 | 0.38 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.41 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.4 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.45 | 0 | 0 | 101.45 | 34.02 | 0 | 0 | 67.43 | |
| 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 | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 31 March 2024 | Accrual | 1.54 | 0.0 | 1.54 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Accrual Adjustment | 0.09 | 0.0 | 0.09 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Charge-off | 67.43 | 67.05 | 0.38 | 0.0 | 0.0 | 0.0 | false | true | |
| |
| @TestRailId:C3345 |
| Scenario: Charge-off with reversal afterwards when loan behavior is zero-interest with interestRecalculation - UC7 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 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.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| # ----- repayment reversal of 1st February ----- # |
| When Customer undo "1"th "Repayment" transaction made on "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 | | 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.12 | 16.45 | 0.56 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.11 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.1 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.09 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | 0.0 | 0.0 | 0.0 | 16.09 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.14 | 0 | 0 | 101.14 | 0.0 | 0 | 0 | 101.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 | true | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Accrual | 0.09 | 0.0 | 0.09 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 101.14 | 100.0 | 1.14 | 0.0 | 0.0 | 0.0 | false | true | |
| And In Loan Transactions the "2"th Transaction has Transaction type="Repayment" and is reverted |
| |
| @TestRailId:C3346 |
| Scenario: Charge-off with repayment afterwards when loan behavior is zero-interest and interestRecalculation - UC8 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 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.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| # ----- repayment after charge off on 1st March ----- # |
| When Admin sets the business date to "1 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 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 | 01 March 2024 | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 0 | 0 | 101.05 | 34.02 | 0 | 0 | 67.03 | |
| 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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.54 | 0.47 | 0.0 | 0.0 | 67.03 | false | false | |
| |
| @TestRailId:C3347 |
| Scenario: Charge-off with charge that added before the charge off date when loan behavior is zero-interest with interestRecalculation - UC9.1 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.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 | 5.0 | 0.0 | 22.01 | 22.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 | 2.05 | 5.0 | 0 | 107.05 | 22.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "28 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "28 February 2024" due date and 3 EUR transaction amount |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01 | 0 | 0 | 87.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 | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3348 |
| Scenario: Charge-off with charge that added as on charge off date when loan behavior is zero-interest with interestRecalculation - UC9.2 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.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 | 5.0 | 0.0 | 22.01 | 22.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 | 2.05 | 5.0 | 0 | 107.05 | 22.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "29 February 2024" due date and 3 EUR transaction amount |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01 | 0 | 0 | 87.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 | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3349 |
| Scenario: Charge-off with charge waive is added after the charge off date when loan behavior is zero-interest with interestRecalculation - UC9.3 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.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 | 5.0 | 0.0 | 22.01 | 22.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 | 2.05 | 5.0 | 0 | 107.05 | 22.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 February 2024" |
| And Admin waives charge |
| 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 | Waived | 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 | 5.0 | 0.0 | 22.01 | 22.01 | 0.0 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 3.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding | |
| | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01 | 0 | 0 | 3.0 | 84.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 | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | |
| | 29 February 2024 | Waive loan charges | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.57 | false | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | true | |
| |
| @TestRailId:C3412 |
| Scenario: Charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation - UC9.4 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.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 | 5.0 | 0.0 | 22.01 | 22.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 | 2.05 | 5.0 | 0 | 107.05 | 22.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | Waived | 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 | 5.0 | 0.0 | 22.01 | 22.01 | 0.0 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 0.0 | 20.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding | |
| | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01 | 0 | 0 | 0.0 | 87.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 | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3413 |
| Scenario: Backdated charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation enabled is forbidden - UC9.5 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.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 | 5.0 | 0.0 | 22.01 | 22.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 | 2.05 | 5.0 | 0 | 107.05 | 22.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "1 March 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount |
| Then Backdated charge-off on a date "29 February 2024" is forbidden |
| |
| @TestRailId:C3350 |
| Scenario: Charge-off with Credit Balance Refund when loan behavior is zero-interest and interestRecalculation - UC11 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 July 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 June 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 July 2024" with 20 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.0 | 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 | |
| | 100 | 2.05 | 0 | 0 | 102.05 | 102.05 | 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 | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | |
| | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "2 July 2024" |
| When Admin makes Credit Balance Refund transaction on "02 July 2024" with 3 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.0 | 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 | |
| | 100 | 2.05 | 0 | 0 | 102.05 | 102.05 | 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 | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | |
| | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 02 July 2024 | Credit Balance Refund | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| When Customer undo "1"th "Repayment" transaction made on "01 July 2024" |
| Then Loan Repayment schedule has 7 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 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 | |
| | 7 | 1 | 02 July 2024 | | 0.0 | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 103 | 2.05 | 0 | 0 | 105.05 | 85.05 | 0 | 0 | 20.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 | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | |
| | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | |
| | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.9 | false | true | |
| When Admin sets the business date to "15 July 2024" |
| And Admin does charge-off the loan on "15 July 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "15 July 2024" |
| Then Loan Repayment schedule has 7 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 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 | |
| | 103 | 2.05 | 0 | 0 | 105.05 | 85.05 | 0 | 0 | 20.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 | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | |
| | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | |
| | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.9 | false | true | |
| | 15 July 2024 | Charge-off | 20.0 | 19.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3351 |
| Scenario: Charge-off with adjust to last installment scenario when loan behavior is zero-interest and interestRecalculation - UC12 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule |
| 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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| 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 | 1.5 | 0 | 0 | 101.5 | 17.01 | 17.01 | 0 | 84.49 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 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.98 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 49.97 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 32.96 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 17.01 | 15.95 | 0.0 | 0.0 | 0.0 | 15.95 | 0.0 | 0.0 | 0.0 | 15.95 | |
| | 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 | 1.0 | 0 | 0 | 101.0 | 17.01 | 17.01 | 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 | |
| | 29 February 2024 | Accrual | 1.0 | 0.0 | 1.0 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 83.99 | 82.99 | 1.0 | 0.0 | 0.0 | 0.0 | false | false | |
| And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| |
| @TestRailId:C3376 |
| Scenario: Undo the charge-off when loan behaviour is zero-interest and interestRecalculation = true |
| When Admin sets the business date to "1 March 2023" |
| And Admin creates a client with random data |
| When Admin creates a new zero charge-off Loan with interest recalculation and date: "1 January 2023" |
| And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" |
| And Admin successfully disburse the loan on "1 January 2023" 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 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 28 | 01 March 2023 | | 67.14 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2023 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2023 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2023 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2023 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 2.14 | 0 | 0 | 102.14 | 0 | 0 | 0 | 102.14 | |
| And Admin does charge-off the loan on "14 February 2023" |
| 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 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 28 | 01 March 2023 | | 66.83 | 16.74 | 0.27 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2023 | | 49.82 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2023 | | 32.81 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2023 | | 15.8 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2023 | | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.8 | 0.0 | 0.0 | 0.0 | 15.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.85 | 0 | 0 | 100.85 | 0 | 0 | 0 | 100.85 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | |
| | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | |
| | 14 February 2023 | Accrual | 0.85 | 0.0 | 0.85 | 0.0 | 0.0 | 0.0 | |
| | 14 February 2023 | Charge-off | 100.85 | 100.0 | 0.85 | 0.0 | 0.0 | 0.0 | |
| And Admin does a charge-off undo the 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 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2023 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 2 | 28 | 01 March 2023 | | 67.14 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2023 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2023 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2023 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2023 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 2.14 | 0 | 0 | 102.14 | 0 | 0 | 0 | 102.14 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | |
| | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | |
| | 14 February 2023 | Accrual | 0.85 | 0.0 | 0.85 | 0.0 | 0.0 | 0.0 | |
| | 14 February 2023 | Charge-off | 100.85 | 100.0 | 0.85 | 0.0 | 0.0 | 0.0 | |
| |
| @TestRailId:C3352 @AdvancedPaymentAllocation |
| Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs on due 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 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 | |
| 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 | |
| When Admin sets the business date to "1 March 2024" |
| And Admin does charge-off the loan on "1 March 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "01 March 2024" |
| Then Loan Repayment schedule has 2 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 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | |
| 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.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.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 | |
| | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "1 March 2024" |
| And Admin does a charge-off undo the 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.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 | |
| | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | true | false | |
| |
| @TestRailId:C3353 @AdvancedPaymentAllocation |
| Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs before installment 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 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 | |
| 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 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 February 2024" |
| Then Loan Repayment schedule has 2 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 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.47 | 0.0 | 0.0 | 84.04 | 0.0 | 0.0 | 0.0 | 84.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 | 1.05 | 0.0 | 0.0 | 101.05 | 17.01 | 0.0 | 0.0 | 84.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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3354 @AdvancedPaymentAllocation |
| Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs in the middle of 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 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 | |
| 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 | |
| When Admin sets the business date to "14 February 2024" |
| And Admin does charge-off the loan on "14 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "14 February 2024" |
| Then Loan Repayment schedule has 2 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 | 13 | 14 February 2024 | | 0.0 | 83.57 | 0.22 | 0.0 | 0.0 | 83.79 | 0.0 | 0.0 | 0.0 | 83.79 | |
| 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.8 | 0.0 | 0.0 | 100.8 | 17.01 | 0.0 | 0.0 | 83.79 | |
| 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 | |
| | 14 February 2024 | Accrual | 0.8 | 0.0 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 February 2024 | Charge-off | 83.79 | 83.57 | 0.22 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3355 @AdvancedPaymentAllocation |
| Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs after maturity date |
| Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled |
| 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 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 | |
| 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 |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount |
| When Admin sets the business date to "01 April 2024" |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount |
| When Admin sets the business date to "01 May 2024" |
| And Customer makes "AUTOPAY" repayment on "01 May 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 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 | 68.04 | 0.0 | 0.0 | 34.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 | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| When Admin sets the business date to "15 July 2024" |
| And Admin does charge-off the loan on "15 July 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "15 July 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 | | 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 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.2 | 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 | 68.04 | 0.0 | 0.0 | 34.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 | 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 | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 15 July 2024 | Accrual | 2.15 | 0.0 | 2.15 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 July 2024 | Charge-off | 34.11 | 33.71 | 0.4 | 0.0 | 0.0 | 0.0 | false | false | |
| Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled |
| |
| @TestRailId:C3356 @AdvancedPaymentAllocation |
| Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs after one installment is overdue |
| 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 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 | |
| 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 | |
| When Admin sets the business date to "31 March 2024" |
| And Admin does charge-off the loan on "31 March 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "31 March 2024" |
| Then Loan Repayment schedule has 3 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 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.47 | 0.0 | 0.0 | 67.52 | 0.0 | 0.0 | 0.0 | 67.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.54 | 0.0 | 0.0 | 101.54 | 17.01 | 0.0 | 0.0 | 84.53 | |
| 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 | |
| | 31 March 2024 | Accrual | 1.54 | 0.0 | 1.54 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "02 April 2024" |
| When Admin runs inline COB job for Loan |
| Then Loan has 17.01 total overdue amount |
| Then Loan Repayment schedule has 3 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 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.47 | 0.0 | 0.0 | 67.52 | 0.0 | 0.0 | 0.0 | 67.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.54 | 0.0 | 0.0 | 101.54 | 17.01 | 0.0 | 0.0 | 84.53 | |
| 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 | |
| | 31 March 2024 | Accrual | 1.54 | 0.0 | 1.54 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3357 @AdvancedPaymentAllocation |
| Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when backdated repayment occurs after charge-off |
| Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled |
| 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 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 | |
| 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 | |
| When Admin sets the business date to "31 March 2024" |
| And Admin does charge-off the loan on "31 March 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "31 March 2024" |
| Then Loan Repayment schedule has 3 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 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.47 | 0.0 | 0.0 | 67.52 | 0.0 | 0.0 | 0.0 | 67.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.54 | 0.0 | 0.0 | 101.54 | 17.01 | 0.0 | 0.0 | 84.53 | |
| 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 | |
| | 31 March 2024 | Accrual | 1.54 | 0.0 | 1.54 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Charge-off | 84.53 | 83.57 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | |
| # --- Backdated repayment --- |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 3 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 | | | | |
| #invalid calculation of loan balance - expected result is |
| | 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 | |
| #but was |
| #| 1 | 31 | 01 February 2024 | 01 March 2024 | 66.86 | 33.14 | 0.58 | 0.0 | 0.0 | 33.72 | 33.72 | 0.0 | 16.71 | 0.0 | |
| | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 30 | 31 March 2024 | | 0.0 | 67.05 | 0.38 | 0.0 | 0.0 | 67.43 | 0.0 | 0.0 | 0.0 | 67.43 | |
| 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.45 | 0.0 | 0.0 | 101.45 | 34.02 | 0.0 | 0.0 | 67.43 | |
| 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 | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 31 March 2024 | Accrual | 1.54 | 0.0 | 1.54 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Accrual Adjustment | 0.09 | 0.0 | 0.09 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Charge-off | 67.43 | 67.05 | 0.38 | 0.0 | 0.0 | 0.0 | false | true | |
| And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled |
| |
| @TestRailId:C3358 @AdvancedPaymentAllocation |
| Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when repayment reversal occurs after charge-off |
| Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled |
| 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 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 | |
| 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 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 February 2024" |
| Then Loan Repayment schedule has 2 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 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.47 | 0.0 | 0.0 | 84.04 | 0.0 | 0.0 | 0.0 | 84.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 | 1.05 | 0.0 | 0.0 | 101.05 | 17.01 | 0.0 | 0.0 | 84.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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| When Customer undo "1"th repayment on "01 February 2024" |
| Then Loan Repayment schedule has 2 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 | | | | |
| #invalid calculation of loan balance - expected result is |
| | 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 | |
| #but was |
| #| 1 | 31 | 01 February 2024 | | 50.14 | 49.86 | 0.58 | 0.0 | 0.0 | 50.44 | 0.0 | 0.0 | 0.0 | 50.44 | |
| | 2 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.56 | 0.0 | 0.0 | 84.13 | 0.0 | 0.0 | 0.0 | 84.13 | |
| 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.14 | 0.0 | 0.0 | 101.14 | 0.0 | 0.0 | 0.0 | 101.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 | true | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Accrual | 0.09 | 0.0 | 0.09 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 101.14 | 100.0 | 1.14 | 0.0 | 0.0 | 0.0 | false | true | |
| And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled |
| |
| @TestRailId:C3359 @AdvancedPaymentAllocation |
| Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when repayment occurs after charge-off |
| Given Global configuration "is-principal-compounding-disabled-for-overdue-loans" is enabled |
| 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 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 | |
| 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 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 February 2024" |
| Then Loan Repayment schedule has 2 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 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.47 | 0.0 | 0.0 | 84.04 | 0.0 | 0.0 | 0.0 | 84.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 | 1.05 | 0.0 | 0.0 | 101.05 | 17.01 | 0.0 | 0.0 | 84.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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "01 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount |
| Then Loan Repayment schedule has 2 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 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.47 | 0.0 | 0.0 | 84.04 | 17.01 | 0.0 | 17.01 | 67.03 | |
| 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.05 | 0.0 | 0.0 | 101.05 | 34.02 | 0.0 | 17.01 | 67.03 | |
| 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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.54 | 0.47 | 0.0 | 0.0 | 67.03 | false | false | |
| And Global configuration "is-principal-compounding-disabled-for-overdue-loans" is disabled |
| |
| @Skip @TestRailId:C3360 @AdvancedPaymentAllocation |
| Scenario: SKIPPED-Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs 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 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 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 | |
| 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 | | | | |
| #invalid calculation of loan balance - expected result is |
| | 1 | 31 | 01 February 2024 | 15 January 2024 | 66.51 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| #but was |
| #| 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 | | 49.89 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 33.17 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 16.35 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 0.0 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | |
| | 6 | 30 | 01 July 2024 | | -17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 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 | |
| | 100.0 | 1.5 | 0.0 | 0.0 | 101.5 | 17.01 | 0.0 | 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 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 February 2024" |
| Then Loan Repayment schedule has 2 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.52 | 16.48 | 0.53 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 28 | 29 February 2024 | | 0.0 | 83.89 | 0.37 | 0.0 | 0.0 | 83.89 | 0.0 | 0.0 | 0.0 | 83.89 | |
| 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.9 | 0.0 | 0.0 | 100.9 | 17.01 | 0.0 | 0.0 | 83.89 | |
| 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 | |
| | 29 February 2024 | Accrual | 0.9 | 0.0 | 0.9 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 83.89 | 82.99 | 0.9 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @Skip @TestRailId:C3361 @AdvancedPaymentAllocation |
| Scenario: Verify accelerate maturity to charge-off date when interest recalculation is enabled - case when charge-off occurs with allocation to last installment with interest allocation change |
| 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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 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 | |
| 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 | |
| When Admin sets the business date to "15 February 2024" |
| 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 | | | | |
| #invalid calculation of loan balance - expected result is |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 66.56 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| #but was |
| #| 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 | 15 February 2024 | 49.94 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 33.32 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 16.40 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 0.05 | 16.35 | 0.1 | 0.0 | 0.0 | 16.45 | 0.0 | 0.0 | 0.0 | 16.45 | |
| | 6 | 30 | 01 July 2024 | | -16.96 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 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 | |
| | 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 | |
| | 15 February 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 66.56 | false | false | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 February 2024" |
| Then Loan Repayment schedule has 3 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 | 28 | 29 February 2024 | | 0.0 | 83.57 | 0.41 | 0.0 | 0.0 | 83.98 | 17.01 | 0.0 | 0.0 | 66.97 | |
| 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.99 | 0.0 | 0.0 | 100.99 | 17.01 | 0.0 | 0.0 | 83.98 | |
| 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 | |
| | 15 February 2024 | Repayment | 17.01 | 16.79 | 0.22 | 0.0 | 0.0 | 66.78 | false | true | |
| | 29 February 2024 | Charge-off | 66.97 | 66.78 | 0.47 | 0.19 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3362 @AdvancedPaymentAllocation |
| Scenario: Verify that interest is not recalculated after the loan is charged-off |
| 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_ALLOW_PARTIAL_PERIOD | 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 | | 86.02 | 13.98 | 7.0 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 2 | 29 | 01 March 2024 | | 71.06 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 3 | 31 | 01 April 2024 | | 55.05 | 16.01 | 4.97 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 4 | 30 | 01 May 2024 | | 37.92 | 17.13 | 3.85 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 5 | 31 | 01 June 2024 | | 19.59 | 18.33 | 2.65 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 19.59 | 1.37 | 0.0 | 0.0 | 20.96 | 0.0 | 0.0 | 0.0 | 20.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 | 25.86 | 0.0 | 0.0 | 125.86 | 0.0 | 0.0 | 0.0 | 125.86 | |
| 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 | |
| When Admin sets the business date to "01 February 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 20.98 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 | 86.02 | 13.98 | 7.0 | 0.0 | 0.0 | 20.98 | 20.98 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 71.06 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 3 | 31 | 01 April 2024 | | 55.05 | 16.01 | 4.97 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 4 | 30 | 01 May 2024 | | 37.92 | 17.13 | 3.85 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 5 | 31 | 01 June 2024 | | 19.59 | 18.33 | 2.65 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 19.59 | 1.37 | 0.0 | 0.0 | 20.96 | 0.0 | 0.0 | 0.0 | 20.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 | 25.86 | 0.0 | 0.0 | 125.86 | 20.98 | 0.0 | 0.0 | 104.88 | |
| 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 | 20.98 | 13.98 | 7.0 | 0.0 | 0.0 | 86.02 | false | false | |
| When Admin sets the business date to "16 March 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 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 86.02 | 13.98 | 7.0 | 0.0 | 0.0 | 20.98 | 20.98 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 71.06 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 3 | 31 | 01 April 2024 | | 55.05 | 16.01 | 4.97 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 4 | 30 | 01 May 2024 | | 37.92 | 17.13 | 3.85 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 5 | 31 | 01 June 2024 | | 19.59 | 18.33 | 2.65 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 19.59 | 1.37 | 0.0 | 0.0 | 20.96 | 0.0 | 0.0 | 0.0 | 20.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 | 25.86 | 0.0 | 0.0 | 125.86 | 20.98 | 0.0 | 0.0 | 104.88 | |
| 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 | 20.98 | 13.98 | 7.0 | 0.0 | 0.0 | 86.02 | false | false | |
| When Admin sets the business date to "02 April 2024" |
| And Admin does charge-off the loan on "02 April 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 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 86.02 | 13.98 | 7.0 | 0.0 | 0.0 | 20.98 | 20.98 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 71.06 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 3 | 31 | 01 April 2024 | | 56.1 | 14.96 | 6.02 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 4 | 30 | 01 May 2024 | | 39.12 | 16.98 | 4.0 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 5 | 31 | 01 June 2024 | | 20.88 | 18.24 | 2.74 | 0.0 | 0.0 | 20.98 | 0.0 | 0.0 | 0.0 | 20.98 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 20.88 | 1.46 | 0.0 | 0.0 | 22.34 | 0.0 | 0.0 | 0.0 | 22.34 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100.0 | 27.24 | 0.0 | 0.0 | 127.24 | 20.98 | 0.0 | 0.0 | 106.26 | |
| 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 | 20.98 | 13.98 | 7.0 | 0.0 | 0.0 | 86.02 | false | false | |
| | 02 April 2024 | Accrual | 19.24 | 0.0 | 19.24 | 0.0 | 0.0 | 0.0 | false | false | |
| | 02 April 2024 | Charge-off | 106.26 | 86.02 | 20.24 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3363 |
| Scenario: Charge-off on due date when loan behavior is zero-interest with interestRecalculation disabled - UC1 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "1 March 2024" |
| And Admin does charge-off the loan on "1 March 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "01 March 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 | | 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.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.07 | 0 | 0 | 101.07 | 17.01 | 0 | 0 | 84.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 | |
| | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3364 |
| Scenario: Charge-off after installment date when loan behavior is zero-interest with interestRecalculation disabled - UC2 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 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.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3365 |
| Scenario: Charge-off in the middle of installment period when loan behavior is zero-interest with interestRecalculation disabled - UC3 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "14 February 2024" |
| And Admin does charge-off the loan on "14 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "14 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 | | 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.78 | 16.79 | 0.22 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 49.77 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 32.76 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 15.75 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 0.8 | 0 | 0 | 100.8 | 17.01 | 0 | 0 | 83.79 | |
| 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 | |
| | 14 February 2024 | Accrual | 0.8 | 0.0 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | |
| | 14 February 2024 | Charge-off | 83.79 | 83.57 | 0.22 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3366 |
| Scenario: Charge-off after maturity date when loan behavior is zero-interest with interestRecalculation disabled - UC4 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 May 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 May 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 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 | 2.05 | 0 | 0 | 102.05 | 68.04 | 0 | 0 | 34.01 | |
| When Admin sets the business date to "15 July 2024" |
| And Admin does charge-off the loan on "15 July 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "15 July 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 | | 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 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 | 2.05 | 0 | 0 | 102.05 | 68.04 | 0 | 0 | 34.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 | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 15 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 15 July 2024 | Charge-off | 34.01 | 33.71 | 0.3 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3367 |
| Scenario: Charge-off after one installment is overdue when loan behavior is zero-interest and interestRecalculation disabled - UC5 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "31 March 2024" |
| And Admin does charge-off the loan on "31 March 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "31 March 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 | | 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.42 | 16.63 | 0.38 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.41 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.4 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.45 | 0 | 0 | 101.45 | 17.01 | 0 | 0 | 84.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 | 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 | |
| | 31 March 2024 | Accrual | 1.45 | 0.0 | 1.45 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Charge-off | 84.44 | 83.57 | 0.87 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3368 |
| Scenario: Charge-off with backdated repayment when loan behavior is zero-interest with interestRecalculation disabled - UC6 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "31 March 2024" |
| And Admin does charge-off the loan on "31 March 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "31 March 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 | | 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.42 | 16.63 | 0.38 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.41 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.4 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.45 | 0 | 0 | 101.45 | 17.01 | 0 | 0 | 84.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 | 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 | |
| | 31 March 2024 | Accrual | 1.45 | 0.0 | 1.45 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Charge-off | 84.44 | 83.57 | 0.87 | 0.0 | 0.0 | 0.0 | false | false | |
| # ----- backdated repayment on 1 March made on 31 March ----- # |
| And Customer makes "AUTOPAY" repayment on "01 March 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | | 50.42 | 16.63 | 0.38 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.41 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.4 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | 0.0 | 0.0 | 0.0 | 16.4 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.45 | 0 | 0 | 101.45 | 34.02 | 0 | 0 | 67.43 | |
| 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 | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 31 March 2024 | Accrual | 1.45 | 0.0 | 1.45 | 0.0 | 0.0 | 0.0 | false | false | |
| | 31 March 2024 | Charge-off | 67.43 | 67.05 | 0.38 | 0.0 | 0.0 | 0.0 | false | true | |
| |
| @TestRailId:C3369 |
| Scenario: Charge-off with reversal afterwards when loan behavior is zero-interest with interestRecalculation disabled - UC7 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 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.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| # ----- repayment reversal of 1st February ----- # |
| When Customer undo "1"th "Repayment" transaction made on "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 | | 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.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 0 | 0 | 101.05 | 0.0 | 0 | 0 | 101.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 | true | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 101.05 | 100.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | true | |
| And In Loan Transactions the "2"th Transaction has Transaction type="Repayment" and is reverted |
| |
| @TestRailId:C3370 |
| Scenario: Charge-off with repayment afterwards when loan behavior is zero-interest and interestRecalculation disabled - UC8 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| 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_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 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 | 2.05 | 0 | 0 | 102.05 | 17.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 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.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 0 | 0 | 101.05 | 17.01 | 0 | 0 | 84.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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| # ----- repayment after charge off on 1st March ----- # |
| When Admin sets the business date to "1 March 2024" |
| And Customer makes "AUTOPAY" repayment on "01 March 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 | 01 March 2024 | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 0 | 0 | 101.05 | 34.02 | 0 | 0 | 67.03 | |
| 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 | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.54 | 0.47 | 0.0 | 0.0 | 67.03 | false | false | |
| |
| @TestRailId:C3371 |
| Scenario: Charge-off with charge that added before the charge off date when loan behavior is zero-interest with interestRecalculation disabled - UC9.1 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.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 | 5.0 | 0.0 | 22.01 | 22.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 | 2.05 | 5.0 | 0 | 107.05 | 22.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "28 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "28 February 2024" due date and 3 EUR transaction amount |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01 | 0 | 0 | 87.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 | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3372 |
| Scenario: Charge-off with charge that added as on charge off date when loan behavior is zero-interest with interestRecalculation disabled - UC9.2 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.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 | 5.0 | 0.0 | 22.01 | 22.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 | 2.05 | 5.0 | 0 | 107.05 | 22.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "29 February 2024" due date and 3 EUR transaction amount |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 5.0 | 0.0 | 22.01 | 22.01 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 20.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01 | 0 | 0 | 87.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 | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3373 |
| Scenario: Charge-off with charge waive is added after the charge off date when loan behavior is zero-interest with interestRecalculation disabled - UC9.3 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.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 | 5.0 | 0.0 | 22.01 | 22.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 | 2.05 | 5.0 | 0 | 107.05 | 22.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 February 2024" |
| And Admin waives charge |
| 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 | Waived | 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 | 5.0 | 0.0 | 22.01 | 22.01 | 0.0 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 3.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding | |
| | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01 | 0 | 0 | 3.0 | 84.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 | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | |
| | 29 February 2024 | Waive loan charges | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 83.57 | false | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.04 | 83.57 | 0.47 | 0.0 | 0.0 | 0.0 | false | true | |
| |
| @TestRailId:C3414 |
| Scenario: Charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation disabled - UC9.4 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.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 | 5.0 | 0.0 | 22.01 | 22.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 | 2.05 | 5.0 | 0 | 107.05 | 22.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | Waived | 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 | 5.0 | 0.0 | 22.01 | 22.01 | 0.0 | 0.0 | 0.0 | 0.0 | |
| | 2 | 29 | 01 March 2024 | | 67.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 3.0 | 0.0 | 20.01 | 0.0 | 0.0 | 0.0 | 0.0 | 20.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 16.0 | 0.0 | 0.0 | 0.0 | 0.0 | 16.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Waived | Outstanding | |
| | 100 | 1.05 | 8.0 | 0 | 109.05 | 22.01 | 0 | 0 | 0.0 | 87.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 | 22.01 | 16.43 | 0.58 | 5.0 | 0.0 | 83.57 | false | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 87.04 | 83.57 | 0.47 | 3.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3415 |
| Scenario: Backdated charge-off with charge is added after the charge off date when loan behavior is zero-interest with interestRecalculation disabled is forbidden - UC9.5 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin creates a fully customized loan with the following data: |
| | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | |
| | LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 February 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 5 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 22.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 | 5.0 | 0.0 | 22.01 | 22.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 | 2.05 | 5.0 | 0 | 107.05 | 22.01 | 0 | 0 | 85.04 | |
| When Admin sets the business date to "01 March 2024" |
| When Admin adds "LOAN_SNOOZE_FEE" due date charge with "05 March 2024" due date and 3 EUR transaction amount |
| Then Backdated charge-off on a date "29 February 2024" is forbidden |
| |
| @TestRailId:C3374 |
| Scenario: Charge-off with Credit Balance Refund when loan behavior is zero-interest and interestRecalculation disabled - UC11 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| 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_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "1 July 2024" |
| And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 April 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 June 2024" with 17.01 EUR transaction amount |
| And Customer makes "AUTOPAY" repayment on "01 July 2024" with 20 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.0 | 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 | |
| | 100 | 2.05 | 0 | 0 | 102.05 | 102.05 | 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 | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | |
| | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| When Admin sets the business date to "2 July 2024" |
| When Admin makes Credit Balance Refund transaction on "02 July 2024" with 3 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 6 | 30 | 01 July 2024 | 01 July 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.0 | 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 | |
| | 100 | 2.05 | 0 | 0 | 102.05 | 102.05 | 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 | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | |
| | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | |
| | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 02 July 2024 | Credit Balance Refund | 3.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | |
| When Customer undo "1"th "Repayment" transaction made on "01 July 2024" |
| Then Loan Repayment schedule has 7 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 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 | |
| | 7 | 1 | 02 July 2024 | | 0.0 | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | 0.0 | 0.0 | 0.0 | 3.0 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 103 | 2.05 | 0 | 0 | 105.05 | 85.05 | 0 | 0 | 20.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 | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | |
| | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | |
| | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.9 | false | true | |
| When Admin sets the business date to "15 July 2024" |
| And Admin does charge-off the loan on "15 July 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "15 July 2024" |
| Then Loan Repayment schedule has 7 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 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 4 | 30 | 01 May 2024 | 01 May 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 5 | 31 | 01 June 2024 | 01 June 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | |
| | 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 | |
| | 103 | 2.05 | 0 | 0 | 105.05 | 85.05 | 0 | 0 | 20.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 | |
| | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | |
| | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | |
| | 01 April 2024 | Repayment | 17.01 | 16.62 | 0.39 | 0.0 | 0.0 | 50.43 | false | false | |
| | 01 May 2024 | Repayment | 17.01 | 16.72 | 0.29 | 0.0 | 0.0 | 33.71 | false | false | |
| | 01 June 2024 | Repayment | 17.01 | 16.81 | 0.2 | 0.0 | 0.0 | 16.9 | false | false | |
| | 01 July 2024 | Repayment | 20.0 | 16.9 | 0.1 | 0.0 | 0.0 | 0.0 | true | false | |
| | 01 July 2024 | Accrual | 2.05 | 0.0 | 2.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 02 July 2024 | Credit Balance Refund | 3.0 | 3.0 | 0.0 | 0.0 | 0.0 | 19.9 | false | true | |
| | 15 July 2024 | Charge-off | 20.0 | 19.9 | 0.1 | 0.0 | 0.0 | 0.0 | false | false | |
| |
| @TestRailId:C3375 |
| Scenario: Charge-off with adjust to last installment scenario when loan behavior is zero-interest and interestRecalculation disabled - UC12 |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule |
| 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_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| 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.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.01 | 0.01 | 0.0 | 17.0 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.0 | 17.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 | |
| | 100 | 2.05 | 0 | 0 | 102.05 | 17.01 | 17.01 | 0 | 85.04 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 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.03 | 16.54 | 0.47 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 3 | 31 | 01 April 2024 | | 50.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 4 | 30 | 01 May 2024 | | 33.01 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | |
| | 5 | 31 | 01 June 2024 | | 16.9 | 16.11 | 0.0 | 0.0 | 0.0 | 16.11 | 0.01 | 0.01 | 0.0 | 16.1 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 17.0 | 17.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 | |
| | 100 | 1.15 | 0 | 0 | 101.15 | 17.01 | 17.01 | 0 | 84.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 | |
| | 15 January 2024 | Repayment | 17.01 | 16.91 | 0.1 | 0.0 | 0.0 | 83.09 | false | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.14 | 83.09 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| |
| @TestRailId:C3377 |
| Scenario: Charge-off on due date when loan behaviour is zero-interest and interestRecalculation = false - adjust to last installment scenario, not fully paid |
| When Admin sets the business date to "1 January 2024" |
| And Admin creates a client with random data |
| And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment allocation rule |
| 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_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | |
| 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.58 | 16.42 | 0.58 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 2 | 29 | 01 March 2024 | | 67.07 | 16.51 | 0.49 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 3 | 31 | 01 April 2024 | | 50.46 | 16.61 | 0.39 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 4 | 30 | 01 May 2024 | | 33.75 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 5 | 31 | 01 June 2024 | | 16.95 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 6 | 30 | 01 July 2024 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2024" with "100" amount and expected disbursement date on "1 January 2024" |
| And Admin successfully disburse the loan on "1 January 2024" with "100" EUR transaction amount |
| When Admin sets the business date to "15 January 2024" |
| And Customer makes "AUTOPAY" repayment on "15 January 2024" with 17.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.58 | 16.42 | 0.58 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 2 | 29 | 01 March 2024 | | 67.07 | 16.51 | 0.49 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 3 | 31 | 01 April 2024 | | 50.46 | 16.61 | 0.39 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 4 | 30 | 01 May 2024 | | 33.75 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 5 | 31 | 01 June 2024 | | 16.95 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.1 | 0.1 | 0.0 | 16.9 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 17.05 | 17.05 | 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 | 2.05 | 0 | 0 | 102.05 | 17.15 | 17.15 | 0 | 84.9 | |
| When Admin sets the business date to "29 February 2024" |
| And Admin does charge-off the loan on "29 February 2024" |
| Then LoanBalanceChangedBusinessEvent is created on "29 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 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2024 | | 83.58 | 16.42 | 0.58 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 2 | 29 | 01 March 2024 | | 67.05 | 16.53 | 0.47 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 3 | 31 | 01 April 2024 | | 50.05 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 4 | 30 | 01 May 2024 | | 33.05 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 5 | 31 | 01 June 2024 | | 16.95 | 16.1 | 0.1 | 0.0 | 0.0 | 16.2 | 0.1 | 0.1 | 0.0 | 16.1 | |
| | 6 | 30 | 01 July 2024 | 15 January 2024 | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 17.05 | 17.05 | 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 | 1.25 | 0 | 0 | 101.25 | 17.15 | 17.15 | 0 | 84.1 | |
| 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.15 | 16.95 | 0.2 | 0.0 | 0.0 | 83.05 | false | false | |
| | 29 February 2024 | Accrual | 1.05 | 0.0 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| | 29 February 2024 | Charge-off | 84.1 | 83.05 | 1.05 | 0.0 | 0.0 | 0.0 | false | false | |
| And Admin set "LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule |
| |
| @TestRailId:C3378 |
| Scenario: Undo the charge-off when loan behaviour is zero-interest and interestRecalculation = false |
| When Admin sets the business date to "1 March 2023" |
| And Admin creates a client with random data |
| When Admin creates a new zero charge-off Loan without interest recalculation and with date: "1 January 2023" |
| 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 2023 | | 100.0 | | | 0.0 | | 0.0 | | | | 0.0 | |
| | 1 | 31 | 01 February 2023 | | 83.58 | 16.42 | 0.58 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 2 | 28 | 01 March 2023 | | 67.07 | 16.51 | 0.49 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 3 | 31 | 01 April 2023 | | 50.46 | 16.61 | 0.39 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 4 | 30 | 01 May 2023 | | 33.75 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 5 | 31 | 01 June 2023 | | 16.95 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 6 | 30 | 01 July 2023 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| And Admin successfully approves the loan on "1 January 2023" with "100" amount and expected disbursement date on "1 January 2023" |
| And Admin successfully disburse the loan on "1 January 2023" with "100" EUR transaction amount |
| And Admin does charge-off the loan on "14 February 2023" |
| 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 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2023 | | 83.58 | 16.42 | 0.58 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 2 | 28 | 01 March 2023 | | 66.81 | 16.77 | 0.23 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 3 | 31 | 01 April 2023 | | 49.81 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 4 | 30 | 01 May 2023 | | 32.81 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 5 | 31 | 01 June 2023 | | 15.81 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 6 | 30 | 01 July 2023 | | 0.0 | 15.81 | 0.0 | 0.0 | 0.0 | 15.81| 0.0 | 0.0 | 0.0 | 15.81 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 0.81 | 0 | 0 | 100.81| 0 | 0 | 0 | 100.81 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | |
| | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | |
| | 14 February 2023 | Accrual | 0.81 | 0.0 | 0.81 | 0.0 | 0.0 | 0.0 | |
| | 14 February 2023 | Charge-off | 100.81 | 100.0 | 0.81 | 0.0 | 0.0 | 0.0 | |
| And Admin does a charge-off undo the 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 2023 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | |
| | 1 | 31 | 01 February 2023 | | 83.58 | 16.42 | 0.58 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 2 | 28 | 01 March 2023 | | 67.07 | 16.51 | 0.49 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 3 | 31 | 01 April 2023 | | 50.46 | 16.61 | 0.39 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 4 | 30 | 01 May 2023 | | 33.75 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 5 | 31 | 01 June 2023 | | 16.95 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | |
| | 6 | 30 | 01 July 2023 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | |
| Then Loan Repayment schedule has the following data in Total row: |
| | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | |
| | 100 | 2.05 | 0 | 0 | 102.05 | 0 | 0 | 0 | 102.05 | |
| Then Loan Transactions tab has the following data: |
| | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | |
| | 01 January 2023 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | |
| | 14 February 2023 | Accrual | 0.81 | 0.0 | 0.81 | 0.0 | 0.0 | 0.0 | |
| | 14 February 2023 | Charge-off | 100.81 | 100.0 | 0.81 | 0.0 | 0.0 | 0.0 | |
| |