FINERACT-2405: totalUnpaidPayableNotDueInterest resets to 0 on Charge-Off

This commit is contained in:
Jose Alberto Hernandez
2025-11-19 19:58:33 +01:00
committed by Adam Saghy
parent 2681ee3518
commit 47e8674fa0
7 changed files with 177 additions and 4 deletions
@@ -9949,3 +9949,130 @@ Feature: Charge-off
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 546.14 | 24.69 | 0.0 | 10.0 | 580.83 | 308.59 | 308.59 | 0.0 | 272.24 |
@TestRailId:C4153
Scenario: Verify that totalUnpaidPayableNotDueInterest doesn't get reset to 0 on the charge-off date
When Admin sets the business date to "01 May 2025"
And Admin creates a client with random data
And Admin creates a fully customized loan with the following data:
| LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
| LP2_ADV_PYMNT_360_30_ZERO_INTEREST_CHARGE_OFF_ACCRUAL_ACTIVITY | 01 May 2025 | 423.38 | 12.25 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 24 | MONTHS | 1 | MONTHS | 24 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
And Admin successfully approves the loan on "01 May 2025" with "423.38" amount and expected disbursement date on "01 May 2025"
And Admin successfully disburse the loan on "01 May 2025" with "423.38" EUR transaction amount
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 423.38 | 56.13 | 0.0 | 0.0 | 479.51 | 0.0 | 0.0 | 0.0 | 479.51 |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance |
| 01 May 2025 | Disbursement | 423.38 | 0.0 | 0.0 | 0.0 | 0.0 | 423.38 |
When Admin sets the business date to "01 June 2025"
When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 June 2025" with 19.98 EUR transaction amount and system-generated Idempotency key
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 423.38 | 56.13 | 0.0 | 0.0 | 479.51 | 19.98 | 0.0 | 0.0 | 459.53 |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance |
| 01 May 2025 | Disbursement | 423.38 | 0.0 | 0.0 | 0.0 | 0.0 | 423.38 |
| 01 June 2025 | Repayment | 19.98 | 15.66 | 4.32 | 0.0 | 0.0 | 407.72 |
When Admin sets the business date to "01 July 2025"
When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 July 2025" with 19.98 EUR transaction amount and system-generated Idempotency key
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 423.38 | 56.13 | 0.0 | 0.0 | 479.51 | 39.96 | 0.0 | 0.0 | 439.55 |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance |
| 01 May 2025 | Disbursement | 423.38 | 0.0 | 0.0 | 0.0 | 0.0 | 423.38 |
| 01 June 2025 | Repayment | 19.98 | 15.66 | 4.32 | 0.0 | 0.0 | 407.72 |
| 01 July 2025 | Repayment | 19.98 | 15.82 | 4.16 | 0.0 | 0.0 | 391.9 |
When Admin sets the business date to "08 October 2025"
When Admin runs inline COB job for Loan
Then Loan has 11.51 total unpaid payable due interest
Then Loan has 0.79 total unpaid payable not due interest
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 423.38 | 56.13 | 0.0 | 0.0 | 479.51 | 39.96 | 0.0 | 0.0 | 439.55 |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance |
| 01 May 2025 | Disbursement | 423.38 | 0.0 | 0.0 | 0.0 | 0.0 | 423.38 |
| 01 June 2025 | Repayment | 19.98 | 15.66 | 4.32 | 0.0 | 0.0 | 407.72 |
| 01 June 2025 | Accrual Activity | 4.32 | 0.0 | 4.32 | 0.0 | 0.0 | 0.0 |
| 01 July 2025 | Repayment | 19.98 | 15.82 | 4.16 | 0.0 | 0.0 | 391.9 |
| 01 July 2025 | Accrual Activity | 4.16 | 0.0 | 4.16 | 0.0 | 0.0 | 0.0 |
| 01 August 2025 | Accrual Activity | 4.0 | 0.0 | 4.0 | 0.0 | 0.0 | 0.0 |
| 01 September 2025 | Accrual Activity | 3.84 | 0.0 | 3.84 | 0.0 | 0.0 | 0.0 |
| 01 October 2025 | Accrual Activity | 3.67 | 0.0 | 3.67 | 0.0 | 0.0 | 0.0 |
| 07 October 2025 | Accrual | 20.67 | 0.0 | 20.67 | 0.0 | 0.0 | 0.0 |
And Admin does charge-off the loan on "08 October 2025"
Then Loan has 11.51 total unpaid payable due interest
Then Loan has 0.79 total unpaid payable not due interest
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 423.38 | 20.78 | 0.0 | 0.0 | 444.16 | 39.96 | 0.0 | 0.0 | 404.2 |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance |
| 01 May 2025 | Disbursement | 423.38 | 0.0 | 0.0 | 0.0 | 0.0 | 423.38 |
| 01 June 2025 | Repayment | 19.98 | 15.66 | 4.32 | 0.0 | 0.0 | 407.72 |
| 01 June 2025 | Accrual Activity | 4.32 | 0.0 | 4.32 | 0.0 | 0.0 | 0.0 |
| 01 July 2025 | Repayment | 19.98 | 15.82 | 4.16 | 0.0 | 0.0 | 391.9 |
| 01 July 2025 | Accrual Activity | 4.16 | 0.0 | 4.16 | 0.0 | 0.0 | 0.0 |
| 01 August 2025 | Accrual Activity | 4.0 | 0.0 | 4.0 | 0.0 | 0.0 | 0.0 |
| 01 September 2025 | Accrual Activity | 3.84 | 0.0 | 3.84 | 0.0 | 0.0 | 0.0 |
| 01 October 2025 | Accrual Activity | 3.67 | 0.0 | 3.67 | 0.0 | 0.0 | 0.0 |
| 07 October 2025 | Accrual | 20.67 | 0.0 | 20.67 | 0.0 | 0.0 | 0.0 |
| 08 October 2025 | Accrual | 0.11 | 0.0 | 0.11 | 0.0 | 0.0 | 0.0 |
| 08 October 2025 | Charge-off | 404.2 | 391.9 | 12.3 | 0.0 | 0.0 | 0.0 |
@TestRailId:C4228
Scenario: Verify that totalUnpaidPayableNotDueInterest is correct when charge-off falls on a due date of an open repayment period
When Admin sets the business date to "01 May 2025"
And Admin creates a client with random data
And Admin creates a fully customized loan with the following data:
| LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
| LP2_ADV_PYMNT_360_30_ZERO_INTEREST_CHARGE_OFF_ACCRUAL_ACTIVITY | 01 May 2025 | 423.38 | 12.25 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 24 | MONTHS | 1 | MONTHS | 24 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
And Admin successfully approves the loan on "01 May 2025" with "423.38" amount and expected disbursement date on "01 May 2025"
And Admin successfully disburse the loan on "01 May 2025" with "423.38" EUR transaction amount
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 423.38 | 56.13 | 0.0 | 0.0 | 479.51 | 0.0 | 0.0 | 0.0 | 479.51 |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance |
| 01 May 2025 | Disbursement | 423.38 | 0.0 | 0.0 | 0.0 | 0.0 | 423.38 |
When Admin sets the business date to "01 June 2025"
When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 June 2025" with 19.98 EUR transaction amount and system-generated Idempotency key
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 423.38 | 56.13 | 0.0 | 0.0 | 479.51 | 19.98 | 0.0 | 0.0 | 459.53 |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance |
| 01 May 2025 | Disbursement | 423.38 | 0.0 | 0.0 | 0.0 | 0.0 | 423.38 |
| 01 June 2025 | Repayment | 19.98 | 15.66 | 4.32 | 0.0 | 0.0 | 407.72 |
When Admin sets the business date to "01 July 2025"
When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 July 2025" with 19.98 EUR transaction amount and system-generated Idempotency key
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 423.38 | 56.13 | 0.0 | 0.0 | 479.51 | 39.96 | 0.0 | 0.0 | 439.55 |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance |
| 01 May 2025 | Disbursement | 423.38 | 0.0 | 0.0 | 0.0 | 0.0 | 423.38 |
| 01 June 2025 | Repayment | 19.98 | 15.66 | 4.32 | 0.0 | 0.0 | 407.72 |
| 01 July 2025 | Repayment | 19.98 | 15.82 | 4.16 | 0.0 | 0.0 | 391.9 |
When Admin sets the business date to "01 October 2025"
When Admin runs inline COB job for Loan
Then Loan has 11.51 total unpaid payable due interest
Then Loan has 0.0 total unpaid payable not due interest
Then Loan Repayment schedule has the following data in Total row:
| Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
| 423.38 | 56.13 | 0.0 | 0.0 | 479.51 | 39.96 | 0.0 | 0.0 | 439.55 |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance |
| 01 May 2025 | Disbursement | 423.38 | 0.0 | 0.0 | 0.0 | 0.0 | 423.38 |
| 01 June 2025 | Repayment | 19.98 | 15.66 | 4.32 | 0.0 | 0.0 | 407.72 |
| 01 June 2025 | Accrual Activity | 4.32 | 0.0 | 4.32 | 0.0 | 0.0 | 0.0 |
| 01 July 2025 | Repayment | 19.98 | 15.82 | 4.16 | 0.0 | 0.0 | 391.9 |
| 01 July 2025 | Accrual Activity | 4.16 | 0.0 | 4.16 | 0.0 | 0.0 | 0.0 |
| 01 August 2025 | Accrual Activity | 4.0 | 0.0 | 4.0 | 0.0 | 0.0 | 0.0 |
| 01 September 2025 | Accrual Activity | 3.84 | 0.0 | 3.84 | 0.0 | 0.0 | 0.0 |
| 30 September 2025 | Accrual | 19.87 | 0.0 | 19.87 | 0.0 | 0.0 | 0.0 |
And Admin does charge-off the loan on "01 October 2025"
Then Loan has 11.51 total unpaid payable due interest
Then Loan has 0.0 total unpaid payable not due interest