From 5a56ea50f305968ae13f172d32df3b7b5e79ef31 Mon Sep 17 00:00:00 2001 From: MarianaDmytrivBinariks Date: Tue, 16 Sep 2025 15:49:14 +0300 Subject: [PATCH] FINERACT-2384: e2e tests for re-age trn before maturity date --- .../resources/features/LoanReAging.feature | 1260 ++++++++++++++--- 1 file changed, 1064 insertions(+), 196 deletions(-) diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature index 70f8ae51d..267637846 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature @@ -1211,22 +1211,21 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | WEEKS | 01 April 2025 | 1 | - 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2025 | 03 May 2025 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2025 | 03 May 2025 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 28 | 01 March 2025 | 03 May 2025 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2025 | 03 May 2025 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2025 | | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 |1000.0 | 0.0 | 0.0 | 0.0 |1000.0 | - | 6 | 32 | 03 May 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | + Then Loan Repayment schedule has 5 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 April 2025 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2025 | 01 April 2025 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | 01 April 2025 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2025 | | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + | 5 | 32 | 03 May 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 1000.0 | 0.0 | 0.0 | 10.0 | 1010.0 | 0.0 | 0.0 | 0.0 | 1010.0 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 10.0 | 1010.0 | 0.0 | 0.0 | 0.0 | 1010.0 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | - | 03 May 2025 | Re-age | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 01 April 2025 | Re-age | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | Then Loan Charges tab has the following data: | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | | NSF fee | true | Specified due date | 03 May 2025 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | @@ -1279,23 +1278,22 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | WEEKS | 01 April 2025 | 1 | - 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 |250.0 | 0.0 | 250.0 | 0.0 | - | 2 | 31 | 01 February 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 28 | 01 March 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2025 | | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | - | 6 | 32 | 03 May 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | + Then Loan Repayment schedule has 5 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | + | 2 | 31 | 01 February 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2025 | | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | + | 5 | 32 | 03 May 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000.0 | 0.0 | 0.0 | 10.0 | 1010.0 | 250.0 | 0.0 | 250.0 | 760.0 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | - | 01 March 2025 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | - | 03 May 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 01 March 2025 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | + | 01 April 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | Then Loan Charges tab has the following data: | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | | NSF fee | true | Specified due date | 03 May 2025 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | @@ -1351,24 +1349,23 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | WEEKS | 15 February 2025 | 1 | - 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2025 | 01 January 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | - | 2 | 15 | 16 January 2025 | 20 March 2025 | 500.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | - | 3 | 15 | 31 January 2025 | 20 March 2025 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | - | 4 | 15 | 15 February 2025 | 20 March 2025 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | - | 5 | 0 | 15 February 2025 | 20 March 2025 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 6 | 33 | 20 March 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | + Then Loan Repayment schedule has 5 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 January 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | + | 2 | 15 | 16 January 2025 | 15 February 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 15 | 31 January 2025 | 15 February 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 15 | 15 February 2025 | 20 March 2025 | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | 750.0 | 0.0 | 750.0 | 0.0 | + | 5 | 33 | 20 March 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000.0 | 0.0 | 0.0 | 10.0 | 1010.0 | 1000.0 | 0.0 | 750.0 | 10.0 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | - | 01 January 2025 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | - | 20 March 2025 | Repayment | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | - | 20 March 2025 | Re-age | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 01 January 2025 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | + | 20 March 2025 | Repayment | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | 15 February 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | Then Loan Charges tab has the following data: | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | | NSF fee | true | Specified due date | 20 March 2025 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | @@ -1419,15 +1416,14 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | WEEKS | 01 April 2025 | 1 | - Then Loan Repayment schedule has 6 periods, with the following data for periods: + Then Loan Repayment schedule has 5 periods, with the following data for periods: | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | - | 2 | 31 | 01 February 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 28 | 01 March 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2025 | | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | - | 6 | 32 | 03 May 2025 | | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 2 | 31 | 01 February 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2025 | | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | + | 5 | 32 | 03 May 2025 | | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1125.0 | 0.0 | 0.0 | 0.0 | 1125.0 | 250.0 | 0.0 | 250.0| 875.0 | @@ -1436,7 +1432,7 @@ Feature: LoanReAging | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | | 01 March 2025 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | | 03 May 2025 | Chargeback | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 875.0 | false | - | 03 May 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | 01 April 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | @TestRailId:C4048 @AdvancedPaymentAllocation Scenario: Verify that Loan re-aging transaction with repayment, chargeback and charge - N+1 installment after maturity date prior to re-aging - UC5 @@ -1488,27 +1484,26 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | WEEKS | 01 April 2025 | 1 | - Then Loan Repayment schedule has 6 periods, with the following data for periods: + Then Loan Repayment schedule has 5 periods, with the following data for periods: | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | - | 2 | 31 | 01 February 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 28 | 01 March 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2025 | | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | - | 6 | 32 | 03 May 2025 | | 0.0 | 125.0 | 0.0 | 0.0 | 10.0 | 135.0 | 0.0 | 0.0 | 0.0 | 135.0 | + | 2 | 31 | 01 February 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2025 | | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | + | 5 | 32 | 03 May 2025 | | 0.0 | 125.0 | 0.0 | 0.0 | 10.0 | 135.0 | 0.0 | 0.0 | 0.0 | 135.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 1125.0 | 0.0 | 0.0 | 10.0 | 1135.0 | 250.0 | 0.0 | 250.0| 885.0 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1125.0 | 0.0 | 0.0 | 10.0 | 1135.0 | 250.0 | 0.0 | 250.0 | 885.0 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | - | 01 March 2025 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | - | 03 May 2025 | Chargeback | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 875.0 | false | - | 03 May 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 01 March 2025 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | + | 03 May 2025 | Chargeback | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 875.0 | false | + | 01 April 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | NSF fee | true | Specified due date | 03 May 2025 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 03 May 2025 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | @TestRailId:C4049 @AdvancedPaymentAllocation Scenario: Verify that Loan re-aging transaction with repayment, charge and charge adjustment - N+1 installment after maturity date prior to re-aging - UC6 @@ -1560,16 +1555,15 @@ Feature: LoanReAging # --- add re-aging trn with start date as maturity date --- # When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | WEEKS | 01 April 2025 | 1 | - 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 |250.0 | 0.0 | 250.0 | 0.0 | - | 2 | 31 | 01 February 2025 | 04 May 2025 | 730.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 20.0 | 0.0 | - | 3 | 28 | 01 March 2025 | 04 May 2025 | 730.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2025 | 04 May 2025 | 730.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2025 | | 0.0 | 730.0 | 0.0 | 0.0 | 0.0 | 730.0 | 0.0 | 0.0 | 0.0 | 730.0 | - | 6 | 32 | 03 May 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | + | 1 | WEEKS | 01 April 2025 | 1 | + Then Loan Repayment schedule has 5 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | + | 2 | 31 | 01 February 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2025 | | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | 20.0 | 0.0 | 20.0 | 730.0 | + | 5 | 32 | 03 May 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000.0 | 0.0 | 0.0 | 20.0 | 1020.0 | 270.0 | 0.0 | 270.0 | 750.0 | @@ -1577,11 +1571,11 @@ Feature: LoanReAging | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | | 01 March 2025 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | - | 04 May 2025 | Charge Adjustment | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 730.0 | false | - | 04 May 2025 | Re-age | 730.0 | 730.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | 04 May 2025 | Charge Adjustment | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 730.0 | false | + | 01 April 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | NSF fee | true | Specified due date | 03 May 2025 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 03 May 2025 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | @TestRailId:C4050 @AdvancedPaymentAllocation Scenario: Verify that Loan re-aging transaction with MIR and charge - N+1 installment after maturity date prior to re-aging - UC7 @@ -1631,26 +1625,25 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | WEEKS | 01 April 2025 | 1 | - 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2025 | 03 May 2025 | 900.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 |100.0 | 0.0 | 100.0 | 0.0 | - | 2 | 31 | 01 February 2025 | 03 May 2025 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 28 | 01 March 2025 | 03 May 2025 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2025 | 03 May 2025 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2025 | | 0.0 | 900.0 | 0.0 | 0.0 | 0.0 | 900.0 | 0.0 | 0.0 | 0.0 | 900.0 | - | 6 | 32 | 03 May 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | + Then Loan Repayment schedule has 5 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 April 2025 | 900.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 100.0 | 0.0 | 100.0 | 0.0 | + | 2 | 31 | 01 February 2025 | 01 April 2025 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | 01 April 2025 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2025 | | 0.0 | 900.0 | 0.0 | 0.0 | 0.0 | 900.0 | 0.0 | 0.0 | 0.0 | 900.0 | + | 5 | 32 | 03 May 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000.0 | 0.0 | 0.0 | 20.0 | 1020.0 | 100.0 | 0.0 | 100.0 | 920.0 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | - | 01 April 2025 | Merchant Issued Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 900.0 | false | - | 03 May 2025 | Re-age | 900.0 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | 01 April 2025 | Merchant Issued Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 900.0 | false | + | 01 April 2025 | Re-age | 900.0 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | NSF fee | true | Specified due date | 03 May 2025 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 03 May 2025 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | @TestRailId:C4051 @AdvancedPaymentAllocation Scenario: Verify that Loan re-aging transaction with 2nd disbursement and charge - N+1 installment after maturity date prior to re-aging - UC8 @@ -1703,17 +1696,16 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | WEEKS | 01 April 2025 | 1 | - 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 2025 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2025 | 01 May 2025 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 16 January 2025 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 2 | 0 | 16 January 2025 | 01 May 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 February 2025 | 01 May 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 28 | 01 March 2025 | 01 May 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 April 2025 | 01 May 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 6 | 0 | 01 April 2025 | | 0.0 | 600.0 | 0.0 | 0.0 | 0.0 | 600.0 | 0.0 | 0.0 | 0.0 | 600.0 | - | 7 | 30 | 01 May 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | + 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 2025 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 April 2025 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 16 January 2025 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 0 | 16 January 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 February 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 28 | 01 March 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 5 | 31 | 01 April 2025 | | 0.0 | 600.0 | 0.0 | 0.0 | 0.0 | 600.0 | 0.0 | 0.0 | 0.0 | 600.0 | + | 6 | 30 | 01 May 2025 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 600.0 | 0.0 | 0.0 | 20.0 | 620.0 | 0.0 | 0.0 | 0.0 | 620.0 | @@ -1721,7 +1713,7 @@ Feature: LoanReAging | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | | 01 January 2025 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | false | | 16 January 2025 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 600.0 | false | - | 01 May 2025 | Re-age | 600.0 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | 01 April 2025 | Re-age | 600.0 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | Then Loan Charges tab has the following data: | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | | NSF fee | true | Specified due date | 01 May 2025 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | @@ -1740,16 +1732,15 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | YEARS | 01 April 2024 | 3 | - Then Loan Repayment schedule has 7 periods, with the following data for periods: + 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 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2024 | | 50.0 | 25.0 | 0.0 | 100.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | - | 6 | 365 | 01 April 2025 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 7 | 365 | 01 April 2026 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | 01 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 5 | 365 | 01 April 2025 | | 25.0 | 25.0 | 0.0 | 100.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 6 | 365 | 01 April 2026 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | @TestRailId:C4067 @AdvancedPaymentAllocation Scenario: Verify merging re-aging transaction with N+1 installment in the same bucket(MONTHS) @@ -1765,16 +1756,15 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | MONTHS | 01 April 2024 | 3 | - Then Loan Repayment schedule has 7 periods, with the following data for periods: + 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 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 6 | 30 | 01 May 2024 | | 25.0 | 25.0 | 0.0 | 100.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | - | 7 | 31 | 01 June 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | 01 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 5 | 30 | 01 May 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 6 | 31 | 01 June 2024 | | 0.0 | 25.0 | 0.0 | 100.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | @TestRailId:C4068 @AdvancedPaymentAllocation Scenario: Verify merging re-aging transaction with N+1 installment in the same bucket(WEEKS) @@ -1790,16 +1780,15 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | WEEKS | 01 April 2024 | 3 | - Then Loan Repayment schedule has 7 periods, with the following data for periods: + 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 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 6 | 7 | 08 April 2024 | | 25.0 | 25.0 | 0.0 | 100.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | - | 7 | 7 | 15 April 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 2 | 31 | 01 February 2024 | 01 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 5 | 7 | 08 April 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 6 | 7 | 15 April 2024 | | 0.0 | 25.0 | 0.0 | 100.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | @TestRailId:C4069 @AdvancedPaymentAllocation Scenario: Verify merging re-aging transaction with N+1 installment in the same bucket(DAYS) @@ -1815,16 +1804,15 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | DAYS | 01 April 2024 | 3 | - Then Loan Repayment schedule has 7 periods, with the following data for periods: + 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 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 6 | 1 | 02 April 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 7 | 1 | 03 April 2024 | | 0.0 | 25.0 | 0.0 | 100.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 2 | 31 | 01 February 2024 | 01 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 5 | 1 | 02 April 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 6 | 1 | 03 April 2024 | | 0.0 | 25.0 | 0.0 | 100.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | @TestRailId:C4070 @AdvancedPaymentAllocation Scenario: Verify re-aging transaction with N+1 installment outside bucket @@ -1840,17 +1828,16 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | MONTHS | 01 April 2024 | 3 | - Then Loan Repayment schedule has 8 periods, with the following data for periods: + 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 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | 05 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 6 | 30 | 01 May 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 7 | 31 | 01 June 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | - | 8 | 32 | 03 July 2024 | | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 2 | 31 | 01 February 2024 | 01 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 01 April 2024 | 75.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2024 | | 50.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 5 | 30 | 01 May 2024 | | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 6 | 31 | 01 June 2024 | | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | + | 7 | 32 | 03 July 2024 | | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | @TestRailId:C4071 @AdvancedPaymentAllocation Scenario: Verify that Loan re-aging transaction with backdated repayment and chargeback - N+1 installment after maturity date overlaps with re-aging - UC1 @@ -1898,19 +1885,18 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | WEEKS | 01 April 2025 | 6 | - Then Loan Repayment schedule has 10 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 |250.0 | 0.0 | 250.0 | 0.0 | - | 2 | 31 | 01 February 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 28 | 01 March 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2025 | | 604.17 | 145.83 | 0.0 | 0.0 | 0.0 | 145.83 | 0.0 | 0.0 | 0.0 | 145.83 | - | 6 | 7 | 08 April 2025 | | 458.34 | 145.83 | 0.0 | 0.0 | 0.0 | 145.83 | 0.0 | 0.0 | 0.0 | 145.83 | - | 7 | 7 | 15 April 2025 | | 312.51 | 145.83 | 0.0 | 0.0 | 0.0 | 145.83 | 0.0 | 0.0 | 0.0 | 145.83 | - | 8 | 7 | 22 April 2025 | | 166.68 | 145.83 | 0.0 | 0.0 | 0.0 | 145.83 | 0.0 | 0.0 | 0.0 | 145.83 | - | 9 | 7 | 29 April 2025 | | 145.85 | 145.83 | 0.0 | 0.0 | 0.0 | 145.83 | 0.0 | 0.0 | 0.0 | 145.83 | - | 10 | 7 | 06 May 2025 | | 0.0 | 145.85 | 0.0 | 0.0 | 0.0 | 145.85 | 0.0 | 0.0 | 0.0 | 145.85 | + Then Loan Repayment schedule has 9 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | + | 2 | 31 | 01 February 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2025 | | 625.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 5 | 7 | 08 April 2025 | | 500.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 6 | 7 | 15 April 2025 | | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 7 | 7 | 22 April 2025 | | 250.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 8 | 7 | 29 April 2025 | | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 9 | 7 | 06 May 2025 | | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1125.0 | 0.0 | 0.0 | 0.0 | 1125.0 | 250.0 | 0.0 | 250.0| 875.0 | @@ -1919,7 +1905,7 @@ Feature: LoanReAging | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | | 01 March 2025 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | | 03 May 2025 | Chargeback | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 875.0 | false | - | 03 May 2025 | Re-age | 875.0 | 875.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | 01 April 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | @TestRailId:C4072 @AdvancedPaymentAllocation Scenario: Verify that Loan re-aging transaction with repayment, chargeback and charge - N+1 installment after maturity date overlaps with re-aging - UC2 @@ -1971,16 +1957,15 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | MONTHS | 01 April 2025 | 3 | - 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | - | 2 | 31 | 01 February 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 28 | 01 March 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2025 | 03 May 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2025 | | 458.33 | 291.67 | 0.0 | 0.0 | 0.0 | 291.67 | 0.0 | 0.0 | 0.0 | 291.67 | - | 6 | 30 | 01 May 2025 | | 291.66 | 291.67 | 0.0 | 0.0 | 10.0 | 301.67 | 0.0 | 0.0 | 0.0 | 301.67 | - | 7 | 31 | 01 June 2025 | | 0.0 | 291.66 | 0.0 | 0.0 | 0.0 | 291.66 | 0.0 | 0.0 | 0.0 | 291.66 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | + | 2 | 31 | 01 February 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2025 | | 500.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 5 | 30 | 01 May 2025 | | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 6 | 31 | 01 June 2025 | | 0.0 | 375.0 | 0.0 | 0.0 | 10.0 | 385.0 | 0.0 | 0.0 | 0.0 | 385.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1125.0 | 0.0 | 0.0 | 10.0 | 1135.0 | 250.0 | 0.0 | 250.0| 885.0 | @@ -1989,7 +1974,7 @@ Feature: LoanReAging | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | | 01 March 2025 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | | 03 May 2025 | Chargeback | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 875.0 | false | - | 03 May 2025 | Re-age | 875.0 | 875.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | 01 April 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | Then Loan Charges tab has the following data: | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | | NSF fee | true | Specified due date | 03 May 2025 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | @@ -2045,17 +2030,16 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 20 | DAYS | 01 April 2025 | 4 | - Then Loan Repayment schedule has 8 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 |250.0 | 0.0 | 250.0 | 0.0 | - | 2 | 31 | 01 February 2025 | 04 May 2025 | 730.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 20.0 | 0.0 | - | 3 | 28 | 01 March 2025 | 04 May 2025 | 730.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2025 | 04 May 2025 | 730.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2025 | | 547.5 | 182.5 | 0.0 | 0.0 | 0.0 | 182.5 | 0.0 | 0.0 | 0.0 | 182.5 | - | 6 | 20 | 21 April 2025 | | 365.0 | 182.5 | 0.0 | 0.0 | 20.0 | 202.5 | 0.0 | 0.0 | 0.0 | 202.5 | - | 7 | 20 | 11 May 2025 | | 182.5 | 182.5 | 0.0 | 0.0 | 0.0 | 182.5 | 0.0 | 0.0 | 0.0 | 182.5 | - | 8 | 20 | 31 May 2025 | | 0.0 | 182.5 | 0.0 | 0.0 | 0.0 | 182.5 | 0.0 | 0.0 | 0.0 | 182.5 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 March 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 250.0 | 0.0 | + | 2 | 31 | 01 February 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | 01 April 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2025 | | 562.5 | 187.5 | 0.0 | 0.0 | 0.0 | 187.5 | 20.0 | 0.0 | 20.0 | 167.5 | + | 5 | 20 | 21 April 2025 | | 375.0 | 187.5 | 0.0 | 0.0 | 0.0 | 187.5 | 0.0 | 0.0 | 0.0 | 187.5 | + | 6 | 20 | 11 May 2025 | | 187.5 | 187.5 | 0.0 | 0.0 | 20.0 | 207.5 | 0.0 | 0.0 | 0.0 | 207.5 | + | 7 | 20 | 31 May 2025 | | 0.0 | 187.5 | 0.0 | 0.0 | 0.0 | 187.5 | 0.0 | 0.0 | 0.0 | 187.5 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000.0 | 0.0 | 0.0 | 20.0 | 1020.0 | 270.0 | 0.0 | 270.0 | 750.0 | @@ -2064,7 +2048,7 @@ Feature: LoanReAging | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | | 01 March 2025 | Repayment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | | 04 May 2025 | Charge Adjustment | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 730.0 | false | - | 04 May 2025 | Re-age | 730.0 | 730.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | 01 April 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | Then Loan Charges tab has the following data: | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | | NSF fee | true | Specified due date | 03 May 2025 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | @@ -2117,17 +2101,16 @@ Feature: LoanReAging When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | MONTHS | 01 April 2025 | 4 | - Then Loan Repayment schedule has 8 periods, with the following data for periods: - | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2025 | 03 May 2025 | 900.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 |100.0 | 0.0 | 100.0 | 0.0 | - | 2 | 31 | 01 February 2025 | 03 May 2025 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 28 | 01 March 2025 | 03 May 2025 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2025 | 03 May 2025 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 0 | 01 April 2025 | | 675.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | - | 6 | 30 | 01 May 2025 | | 450.0 | 225.0 | 0.0 | 0.0 | 20.0 | 245.0 | 0.0 | 0.0 | 0.0 | 245.0 | - | 7 | 31 | 01 June 2025 | | 225.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | - | 8 | 30 | 01 July 2025 | | 0.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 April 2025 | 900.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 100.0 | 0.0 | 100.0 | 0.0 | + | 2 | 31 | 01 February 2025 | 01 April 2025 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | 01 April 2025 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 31 | 01 April 2025 | | 675.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | + | 5 | 30 | 01 May 2025 | | 450.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | + | 6 | 31 | 01 June 2025 | | 225.0 | 225.0 | 0.0 | 0.0 | 20.0 | 245.0 | 0.0 | 0.0 | 0.0 | 245.0 | + | 7 | 30 | 01 July 2025 | | 0.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | 0.0 | 0.0 | 0.0 | 225.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 1000.0 | 0.0 | 0.0 | 20.0 | 1020.0 | 100.0 | 0.0 | 100.0 | 920.0 | @@ -2135,24 +2118,62 @@ Feature: LoanReAging | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | | 01 April 2025 | Merchant Issued Refund | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 900.0 | false | - | 03 May 2025 | Re-age | 900.0 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + | 01 April 2025 | Re-age | 900.0 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | Then Loan Charges tab has the following data: | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | | NSF fee | true | Specified due date | 03 May 2025 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | - Scenario: Verify that Loan re-aging transaction - can be performed before maturity date and merges the corresponding normal installments + + @TestRailId:C4055 @AdvancedPaymentAllocation + Scenario: Verify that Loan re-aging transaction - before maturity date and merges the corresponding normal installments - UC1 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_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | LP2_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 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 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 2 | 31 | 01 February 2024 | | 625.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 3 | 29 | 01 March 2024 | | 500.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 4 | 31 | 01 April 2024 | | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 5 | 30 | 01 May 2024 | | 250.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 6 | 31 | 01 June 2024 | | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 7 | 30 | 01 July 2024 | | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | When Admin sets the business date to "09 March 2024" When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | MONTHS | 15 March 2024 | 6 | + Then Loan Repayment schedule has 9 periods, with the following data 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 | 0 | 01 January 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 14 | 15 March 2024 | | 833.33 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 5 | 31 | 15 April 2024 | | 666.66 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 6 | 30 | 15 May 2024 | | 499.99 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 7 | 31 | 15 June 2024 | | 333.32 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 8 | 30 | 15 July 2024 | | 166.65 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 9 | 31 | 15 August 2024 | | 0.0 | 166.65 | 0.0 | 0.0 | 0.0 | 166.65 | 0.0 | 0.0 | 0.0 | 166.65 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 09 March 2024 | Re-age | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | - Scenario: Verify that Loan re-aging transaction - can be performed before maturity date and removes additional normal installments + @TestRailId:C4056 @AdvancedPaymentAllocation + Scenario: Verify that Loan re-aging transaction - before maturity date and removes additional normal installments - UC2 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: @@ -2160,12 +2181,772 @@ Feature: LoanReAging | LP2_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount + Then Loan Repayment schedule has 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 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 2 | 31 | 01 February 2024 | | 625.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 3 | 29 | 01 March 2024 | | 500.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 4 | 31 | 01 April 2024 | | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 5 | 30 | 01 May 2024 | | 250.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 6 | 31 | 01 June 2024 | | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 7 | 30 | 01 July 2024 | | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | When Admin sets the business date to "09 March 2024" When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 15 March 2024 | 1 | + | 1 | MONTHS | 15 March 2024 | 1 | + 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 | 0 | 01 January 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 14 | 15 March 2024 | | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 09 March 2024 | Re-age | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | - Scenario: Verify that Loan re-aging transaction - can be performed before maturity date and removes n+1 + @TestRailId:C4057 @AdvancedPaymentAllocation + Scenario: Verify that Loan re-aging transaction with repayment and chargeback - before maturity date and merges the corresponding normal installments - UC3 + When Admin sets the business date to "01 January 2025" + 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 | + | LP1_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2025 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | +# --- add repayment and chargeback --- # + When Admin sets the business date to "03 February 2025" + And Customer makes "AUTOPAY" repayment on "03 February 2025" with 167 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | 03 February 2025 | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 167.0 | 0.0 | 167.0 | 0.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1100.0 | 0.0 | 0.0 | 0.0 | 1100.0 | 167.0 | 0.0 | 167.0 | 933.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 03 February 2025 | Repayment | 167.0 | 167.0 | 0.0 | 0.0 | 0.0 | 833.0 | false | + | 03 February 2025 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 933.0 | false | +# --- re-age loan on 2nd installment ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 15 February 2025 | 6 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | 03 February 2025 | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 167.0 | 0.0 | 167.0 | 0.0 | + | 2 | 14 | 15 February 2025 | | 777.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | + | 3 | 28 | 15 March 2025 | | 621.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | + | 4 | 31 | 15 April 2025 | | 465.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | + | 5 | 30 | 15 May 2025 | | 309.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | + | 6 | 31 | 15 June 2025 | | 153.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | 0.0 | 0.0 | 0.0 | 156.0 | + | 7 | 30 | 15 July 2025 | | 0.0 | 153.0 | 0.0 | 0.0 | 0.0 | 153.0 | 0.0 | 0.0 | 0.0 | 153.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1100.0 | 0.0 | 0.0 | 0.0 | 1100.0 | 167.0 | 0.0 | 167.0 | 933.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 03 February 2025 | Repayment | 167.0 | 167.0 | 0.0 | 0.0 | 0.0 | 833.0 | false | + | 03 February 2025 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 933.0 | false | + | 03 February 2025 | Re-age | 933.0 | 933.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4058 @AdvancedPaymentAllocation + Scenario: Verify that Loan re-aging transaction with repayment and chargeback - before maturity date and removes additional installments - UC4 + When Admin sets the business date to "01 January 2025" + 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 | + | LP1_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2025 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | +# --- add repayment and chargeback --- # + When Admin sets the business date to "03 February 2025" + And Customer makes "AUTOPAY" repayment on "03 February 2025" with 167 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | 03 February 2025 | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 167.0 | 0.0 | 167.0 | 0.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1100.0 | 0.0 | 0.0 | 0.0 | 1100.0 | 167.0 | 0.0 | 167.0 | 933.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 03 February 2025 | Repayment | 167.0 | 167.0 | 0.0 | 0.0 | 0.0 | 833.0 | false | + | 03 February 2025 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 933.0 | false | +# --- re-age loan on 2nd installment ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 15 February 2025 | 1 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | 03 February 2025 | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 167.0 | 0.0 | 167.0 | 0.0 | + | 2 | 14 | 15 February 2025 | | 0.0 | 933.0 | 0.0 | 0.0 | 0.0 | 933.0 | 0.0 | 0.0 | 0.0 | 933.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1100.0 | 0.0 | 0.0 | 0.0 | 1100.0 | 167.0 | 0.0 | 167.0 | 933.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 03 February 2025 | Repayment | 167.0 | 167.0 | 0.0 | 0.0 | 0.0 | 833.0 | false | + | 03 February 2025 | Chargeback | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 933.0 | false | + | 03 February 2025 | Re-age | 933.0 | 933.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4059 @AdvancedPaymentAllocation + Scenario: Verify that Loan re-aging transaction with downdpayment - before maturity date and removes additional installments - UC5 + When Admin sets the business date to "01 January 2025" + When Admin set "LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + 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_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION | 01 January 2025 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 January 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2025 | | 625.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 3 | 28 | 01 March 2025 | | 500.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 4 | 31 | 01 April 2025 | | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 5 | 30 | 01 May 2025 | | 250.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 6 | 31 | 01 June 2025 | | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 7 | 30 | 01 July 2025 | | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 250.0 | 0.0 | 0.0 | 750.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 01 January 2025 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | +# --- re-age loan on 2nd installment ---# + When Admin sets the business date to "15 February 2025" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 01 March 2025 | 2 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 January 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2025 | 15 February 2025 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 28 | 01 March 2025 | | 375.0 | 375.0 | 0.0 | 0.0 | 0.0 | 375.0 | 0.0 | 0.0 | 0.0 | 375.0 | + | 4 | 31 | 01 April 2025 | | 0.0 | 375.0 | 0.0 | 0.0 | 0.0 | 375.0 | 0.0 | 0.0 | 0.0 | 375.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 250.0 | 0.0 | 0.0 | 750.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 01 January 2025 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | + | 15 February 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4060 @AdvancedPaymentAllocation + Scenario: Verify that Loan re-aging transaction with multiple disbursements - before maturity date and removes additional installments - UC6 + When Admin sets the business date to "01 January 2025" + 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 | + | LP1_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2025 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | +# --- add repayment and chargeback --- # + When Admin sets the business date to "10 February 2025" + When Admin successfully disburse the loan on "10 February 2025" with "500" EUR transaction amount + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | | | 10 February 2025 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 28 | 01 March 2025 | | 1066.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | + | 3 | 31 | 01 April 2025 | | 799.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | + | 4 | 30 | 01 May 2025 | | 532.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | + | 5 | 31 | 01 June 2025 | | 265.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 265.0 | 0.0 | 0.0 | 0.0 | 265.0 | 0.0 | 0.0 | 0.0 | 265.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1500.0 | 0.0 | 0.0 | 0.0 | 1500.0 | 0.0 | 0.0 | 0.0 | 1500.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 10 February 2025 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | false | +# --- re-age loan on 2nd installment ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 15 February 2025 | 2 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | 10 February 2025 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 10 February 2025 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 14 | 15 February 2025 | | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | + | 3 | 28 | 15 March 2025 | | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | 0.0 | 0.0 | 0.0 | 750.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1500.0 | 0.0 | 0.0 | 0.0 | 1500.0 | 0.0 | 0.0 | 0.0 | 1500.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 10 February 2025 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1500.0 | false | + | 10 February 2025 | Re-age | 1500.0 | 1500.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4061 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction at 1st installment with full repayment - before maturity date and merges the corresponding normal installments - UC7 + When Admin sets the business date to "01 January 2025" + 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 | + | LP1_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2025 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | +# --- make early repayment --- # + When Admin sets the business date to "15 January 2025" + And Customer makes "AUTOPAY" repayment on "15 January 2025" with 167 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | 15 January 2025 | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 167.0| 167.0 | 0.0 | 0.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 167.0 | 167.0 | 0.0 | 833.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 15 January 2025 | Repayment | 167.0 | 167.0 | 0.0 | 0.0 | 0.0 | 833.0 | false | +# --- re-age loan on 1st installment ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 16 January 2025 | 6 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 15 | 16 January 2025 | | 694.0 | 306.0 | 0.0 | 0.0 | 0.0 | 306.0 | 167.0| 167.0 | 0.0 | 139.0 | + | 2 | 31 | 16 February 2025 | | 555.0 | 139.0 | 0.0 | 0.0 | 0.0 | 139.0 | 0.0 | 0.0 | 0.0 | 139.0 | + | 3 | 28 | 16 March 2025 | | 416.0 | 139.0 | 0.0 | 0.0 | 0.0 | 139.0 | 0.0 | 0.0 | 0.0 | 139.0 | + | 4 | 31 | 16 April 2025 | | 277.0 | 139.0 | 0.0 | 0.0 | 0.0 | 139.0 | 0.0 | 0.0 | 0.0 | 139.0 | + | 5 | 30 | 16 May 2025 | | 138.0 | 139.0 | 0.0 | 0.0 | 0.0 | 139.0 | 0.0 | 0.0 | 0.0 | 139.0 | + | 6 | 31 | 16 June 2025 | | 0.0 | 138.0 | 0.0 | 0.0 | 0.0 | 138.0 | 0.0 | 0.0 | 0.0 | 138.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 167.0 | 167.0 | 0.0 | 833.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 15 January 2025 | Repayment | 167.0 | 167.0 | 0.0 | 0.0 | 0.0 | 833.0 | false | + | 15 January 2025 | Re-age | 833.0 | 833.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4062 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction at 1st installment with partial repayment - before maturity date and merges the corresponding normal installments - UC8 + When Admin sets the business date to "01 January 2025" + 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 | + | LP1_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2025 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | +# --- make early repayment --- # + When Admin sets the business date to "15 January 2025" + And Customer makes "AUTOPAY" repayment on "15 January 2025" 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 100.0| 100.0 | 0.0 | 67.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 100.0 | 100.0 | 0.0 | 900.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 15 January 2025 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 900.0 | false | +# --- re-age loan on 1st installment ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 16 January 2025 | 6 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 15 | 16 January 2025 | | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 100.0| 100.0 | 0.0 | 150.0 | + | 2 | 31 | 16 February 2025 | | 600.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | + | 3 | 28 | 16 March 2025 | | 450.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | + | 4 | 31 | 16 April 2025 | | 300.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | + | 5 | 30 | 16 May 2025 | | 150.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | + | 6 | 31 | 16 June 2025 | | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 100.0 | 100.0 | 0.0 | 900.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 15 January 2025 | Repayment | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 900.0 | false | + | 15 January 2025 | Re-age | 900.0 | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4063 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction at 1st installment with repayment for a few installments - before maturity date and merges the corresponding normal installments - UC9 + When Admin sets the business date to "01 January 2025" + 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 | + | LP1_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2025 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | +# --- make early repayment --- # + When Admin sets the business date to "15 January 2025" + And Customer makes "AUTOPAY" repayment on "15 January 2025" with 400 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | 15 January 2025 | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 167.0 | 167.0 | 0.0 | 0.0 | + | 2 | 28 | 01 March 2025 | 15 January 2025 | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 167.0 | 167.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 66.0 | 66.0 | 0.0 | 101.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 400.0 | 400.0 | 0.0 | 600.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 15 January 2025 | Repayment | 400.0 | 400.0 | 0.0 | 0.0 | 0.0 | 600.0 | false | +# --- re-age loan on 1st installment ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 16 January 2025 | 6 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 15 | 16 January 2025 | | 733.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | 167.0 | 167.0 | 0.0 | 100.0 | + | 2 | 31 | 16 February 2025 | | 466.0 | 267.0 | 0.0 | 0.0 | 0.0 | 267.0 | 167.0 | 167.0 | 0.0 | 100.0 | + | 3 | 28 | 16 March 2025 | | 300.0 | 166.0 | 0.0 | 0.0 | 0.0 | 166.0 | 66.0 | 66.0 | 0.0 | 100.0 | + | 4 | 31 | 16 April 2025 | | 200.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 5 | 30 | 16 May 2025 | | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 6 | 31 | 16 June 2025 | | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 400.0 | 400.0 | 0.0 | 600.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 15 January 2025 | Repayment | 400.0 | 400.0 | 0.0 | 0.0 | 0.0 | 600.0 | false | + | 15 January 2025 | Re-age | 600.0 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4064 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction at 1st installment with MIR - before maturity date and merges the corresponding normal installments - UC10 + When Admin sets the business date to "01 January 2025" + 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 | + | LP1_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2025 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | +# --- make early repayment --- # + When Admin sets the business date to "25 January 2025" + When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "25 January 2025" with 300 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | 25 January 2025 | 833.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 167.0 | 167.0 | 0.0 | 0.0 | + | 2 | 28 | 01 March 2025 | | 666.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 133.0 | 133.0 | 0.0 | 34.0 | + | 3 | 31 | 01 April 2025 | | 499.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 4 | 30 | 01 May 2025 | | 332.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 5 | 31 | 01 June 2025 | | 165.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | 0.0 | 0.0 | 0.0 | 167.0 | + | 6 | 30 | 01 July 2025 | | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | 0.0 | 0.0 | 0.0 | 165.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 300.0 | 300.0 | 0.0 | 700.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 25 January 2025 | Merchant Issued Refund | 300.0 | 300.0 | 0.0 | 0.0 | 0.0 | 700.0 | false | +# --- re-age loan on 1st installment ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 16 January 2025 | 5 | + Then Loan Repayment schedule has 5 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 15 | 16 January 2025 | 25 January 2025 | 800.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 200.0 | 0.0 | 200.0 | 0.0 | + | 2 | 31 | 16 February 2025 | | 600.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 100.0 | 100.0 | 0.0 | 100.0 | + | 3 | 28 | 16 March 2025 | | 400.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | + | 4 | 31 | 16 April 2025 | | 200.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | + | 5 | 30 | 16 May 2025 | | 0.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | 0.0 | 0.0 | 0.0 | 200.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 300.0 | 100.0 | 200.0 | 700.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 25 January 2025 | Merchant Issued Refund | 300.0 | 300.0 | 0.0 | 0.0 | 0.0 | 700.0 | false | + | 16 January 2025 | Re-age | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4065 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction at 1st installment with repayment at last installment - before maturity date and merges the corresponding normal installments - UC11.1 + When Admin sets the business date to "01 January 2025" + When Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2025 | 1000.0 | 0 | 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 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.33 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 2 | 28 | 01 March 2025 | | 666.66 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 3 | 31 | 01 April 2025 | | 499.99 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 4 | 30 | 01 May 2025 | | 333.32 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 5 | 31 | 01 June 2025 | | 166.65 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 6 | 30 | 01 July 2025 | | 0.0 | 166.65 | 0.0 | 0.0 | 0.0 | 166.65 | 0.0 | 0.0 | 0.0 | 166.65 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | +# --- make early repayment --- # + When Admin sets the business date to "15 January 2025" + And Customer makes "AUTOPAY" repayment on "15 January 2025" with 166.65 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.33 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 2 | 28 | 01 March 2025 | | 666.66 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 3 | 31 | 01 April 2025 | | 499.99 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 4 | 30 | 01 May 2025 | | 333.32 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 5 | 31 | 01 June 2025 | | 166.65 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 6 | 30 | 01 July 2025 | 15 January 2025 | 0.0 | 166.65 | 0.0 | 0.0 | 0.0 | 166.65 | 166.65 | 166.65 | 0.0 | 0.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 166.65 | 166.65 | 0.0 | 833.35 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 15 January 2025 | Repayment | 166.65 | 166.65 | 0.0 | 0.0 | 0.0 | 833.35 | false | +# --- re-age loan on 1st installment ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 16 January 2025 | 8 | + Then Loan Repayment schedule has 8 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 15 | 16 January 2025 | | 895.83 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | + | 2 | 31 | 16 February 2025 | | 791.66 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | + | 3 | 28 | 16 March 2025 | | 687.49 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | + | 4 | 31 | 16 April 2025 | | 583.32 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | + | 5 | 30 | 16 May 2025 | | 479.15 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | + | 6 | 31 | 16 June 2025 | | 208.33 | 270.82 | 0.0 | 0.0 | 0.0 | 270.82 | 166.65 | 166.65 | 0.0 | 104.17 | + | 7 | 30 | 16 July 2025 | | 104.16 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | 0.0 | 0.0 | 0.0 | 104.17 | + | 8 | 31 | 16 August 2025 | | 0.0 | 104.16 | 0.0 | 0.0 | 0.0 | 104.16 | 0.0 | 0.0 | 0.0 | 104.16 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 166.65 | 166.65 | 0.0 | 833.35 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 15 January 2025 | Repayment | 166.65 | 166.65 | 0.0 | 0.0 | 0.0 | 833.35 | false | + | 15 January 2025 | Re-age | 833.35 | 833.35 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4078 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction at 1st installment with repayment at last installment - before maturity date and merges the corresponding normal installments - UC11.2 + When Admin sets the business date to "01 January 2025" + When Admin creates a client with random data + And Admin creates a fully customized loan with the following data: + | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2025 | 1000.0 | 0 | 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 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.33 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 2 | 28 | 01 March 2025 | | 666.66 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 3 | 31 | 01 April 2025 | | 499.99 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 4 | 30 | 01 May 2025 | | 333.32 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 5 | 31 | 01 June 2025 | | 166.65 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 6 | 30 | 01 July 2025 | | 0.0 | 166.65 | 0.0 | 0.0 | 0.0 | 166.65 | 0.0 | 0.0 | 0.0 | 166.65 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | +# --- make early repayment --- # + When Admin sets the business date to "15 January 2025" + And Customer makes "AUTOPAY" repayment on "15 January 2025" with 166.65 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2025 | | 833.33 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 2 | 28 | 01 March 2025 | | 666.66 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 3 | 31 | 01 April 2025 | | 499.99 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 4 | 30 | 01 May 2025 | | 333.32 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 5 | 31 | 01 June 2025 | | 166.65 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | 0.0 | 0.0 | 0.0 | 166.67 | + | 6 | 30 | 01 July 2025 | 15 January 2025 | 0.0 | 166.65 | 0.0 | 0.0 | 0.0 | 166.65 | 166.65 | 166.65 | 0.0 | 0.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 166.65 | 166.65 | 0.0 | 833.35 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 15 January 2025 | Repayment | 166.65 | 166.65 | 0.0 | 0.0 | 0.0 | 833.35 | false | +# --- re-age loan on 1st installment ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 16 January 2025 | 4 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 15 | 16 January 2025 | | 791.66 | 208.34 | 0.0 | 0.0 | 0.0 | 208.34 | 0.0 | 0.0 | 0.0 | 208.34 | + | 2 | 31 | 16 February 2025 | | 583.32 | 208.34 | 0.0 | 0.0 | 0.0 | 208.34 | 0.0 | 0.0 | 0.0 | 208.34 | + | 3 | 28 | 16 March 2025 | | 374.98 | 208.34 | 0.0 | 0.0 | 0.0 | 208.34 | 0.0 | 0.0 | 0.0 | 208.34 | + | 4 | 31 | 16 April 2025 | | 166.65 | 208.33 | 0.0 | 0.0 | 0.0 | 208.33 | 0.0 | 0.0 | 0.0 | 208.33 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 833.35 | 0.0 | 0.0 | 0.0 | 833.35 | 0.0 | 0.0 | 0.0 | 833.35 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 15 January 2025 | Repayment | 166.65 | 166.65 | 0.0 | 0.0 | 0.0 | 833.35 | false | + | 15 January 2025 | Re-age | 833.35 | 833.35 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4079 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction at 1st installment - before maturity date and removes additional installments - UC12 + When Admin sets the business date to "01 January 2025" + 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_DOWNPAYMENT_ADV_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2025 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 2 | 31 | 01 February 2025 | | 625.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 3 | 28 | 01 March 2025 | | 500.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 4 | 31 | 01 April 2025 | | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 5 | 30 | 01 May 2025 | | 250.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 6 | 31 | 01 June 2025 | | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 7 | 30 | 01 July 2025 | | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | +# --- re-age loan on 1st installment ---# + When Admin sets the business date to "2 January 2025" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 02 January 2025 | 3 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 02 January 2025 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 1 | 02 January 2025 | | 666.67 | 333.33 | 0.0 | 0.0 | 0.0 | 333.33 | 0.0 | 0.0 | 0.0 | 333.33 | + | 3 | 31 | 02 February 2025 | | 333.34 | 333.33 | 0.0 | 0.0 | 0.0 | 333.33 | 0.0 | 0.0 | 0.0 | 333.33 | + | 4 | 28 | 02 March 2025 | | 0.0 | 333.34 | 0.0 | 0.0 | 0.0 | 333.34 | 0.0 | 0.0 | 0.0 | 333.34 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 1000.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 02 January 2025 | Re-age | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4080 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction at 1st installment with charge - before maturity date and removes additional normal installments and not modifies n+1 - UC13 + When Admin sets the business date to "01 January 2025" + 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_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION | 01 January 2025 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2025" with "1000" amount and expected disbursement date on "01 January 2025" + When Admin successfully disburse the loan on "01 January 2025" with "1000" EUR transaction amount + When Admin adds "LOAN_NSF_FEE" due date charge with "1 January 2025" due date and 20 EUR transaction amount + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 January 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0| 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2025 | | 625.0 | 125.0 | 0.0 | 0.0 | 20.0 | 145.0 | 0.0 | 0.0 | 0.0 | 145.0 | + | 3 | 28 | 01 March 2025 | | 500.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 4 | 31 | 01 April 2025 | | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 5 | 30 | 01 May 2025 | | 250.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 6 | 31 | 01 June 2025 | | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 7 | 30 | 01 July 2025 | | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 20.0 | 1020.0 | 250.0 | 0.0 | 0.0 | 770.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 01 January 2025 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 01 January 2025 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | +# --- re-age loan on 1st installment ---# + When Admin sets the business date to "10 January 2025" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 11 January 2025 | 2 | + 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 2025 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2025 | 01 January 2025 | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | + | 2 | 10 | 11 January 2025 | | 375.0 | 375.0 | 0.0 | 0.0 | 20.0 | 395.0 | 0.0 | 0.0 | 0.0 | 395.0 | + | 3 | 31 | 11 February 2025 | | 0.0 | 375.0 | 0.0 | 0.0 | 0.0 | 375.0 | 0.0 | 0.0 | 0.0 | 375.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 20.0 | 1020.0 | 250.0 | 0.0 | 0.0 | 770.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2025 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 01 January 2025 | Down Payment | 250.0 | 250.0 | 0.0 | 0.0 | 0.0 | 750.0 | false | + | 10 January 2025 | Re-age | 750.0 | 750.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + + @TestRailId:C4081 @AdvancedPaymentAllocation + Scenario: Verify that Loan re-aging transaction - can be performed before maturity date and removes n+1 - UC14 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: @@ -2174,13 +2955,59 @@ Feature: LoanReAging 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 adds "LOAN_NSF_FEE" due date charge with "1 October 2024" due date and 20 EUR transaction amount - + Then Loan Repayment schedule has 8 periods, with the following data 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 | 0 | 01 January 2024 | | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 2 | 31 | 01 February 2024 | | 625.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 3 | 29 | 01 March 2024 | | 500.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 4 | 31 | 01 April 2024 | | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 5 | 30 | 01 May 2024 | | 250.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 6 | 31 | 01 June 2024 | | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 7 | 30 | 01 July 2024 | | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 8 | 92 | 01 October 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 20.0 | 1020.0 | 0.0 | 0.0 | 0.0 | 1020.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 01 October 2024 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | When Admin sets the business date to "09 March 2024" When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | | 1 | MONTHS | 15 March 2024 | 10 | + Then Loan Repayment schedule has 13 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 14 | 15 March 2024 | | 900.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 5 | 31 | 15 April 2024 | | 800.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 6 | 30 | 15 May 2024 | | 700.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 7 | 31 | 15 June 2024 | | 600.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 8 | 30 | 15 July 2024 | | 500.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 9 | 31 | 15 August 2024 | | 400.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 10 | 31 | 15 September 2024| | 300.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 11 | 30 | 15 October 2024 | | 200.0 | 100.0 | 0.0 | 0.0 | 20.0 | 120.0 | 0.0 | 0.0 | 0.0 | 120.0 | + | 12 | 31 | 15 November 2024 | | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + | 13 | 30 | 15 December 2024 | | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | 100.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 20.0 | 1020.0 | 0.0 | 0.0 | 0.0 | 1020.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 09 March 2024 | Re-age | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 01 October 2024 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | - Scenario: Verify that Loan re-aging transaction - can be performed before maturity date and removes additional normal installments and not modifies n+1 + @TestRailId:C4082 @AdvancedPaymentAllocation + Scenario: Verify that Loan re-aging transaction - before maturity date and removes additional normal installments and not modifies n+1 - UC15 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: @@ -2190,8 +3017,49 @@ Feature: LoanReAging When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount When Admin adds "LOAN_NSF_FEE" due date charge with "1 October 2024" due date and 20 EUR transaction amount When Admin adds "LOAN_NSF_FEE" due date charge with "1 November 2024" due date and 30 EUR transaction amount - + Then Loan Repayment schedule has 8 periods, with the following data 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 | 0 | 01 January 2024 | | 750.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | 0.0 | 0.0 | 0.0 | 250.0 | + | 2 | 31 | 01 February 2024 | | 625.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 3 | 29 | 01 March 2024 | | 500.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 4 | 31 | 01 April 2024 | | 375.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 5 | 30 | 01 May 2024 | | 250.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 6 | 31 | 01 June 2024 | | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 7 | 30 | 01 July 2024 | | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | 0.0 | 0.0 | 0.0 | 125.0 | + | 8 | 123 | 01 November 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 50.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 50.0 | 1050.0 | 0.0 | 0.0 | 0.0 | 1050.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 01 October 2024 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | + | NSF fee | true | Specified due date | 01 November 2024| Flat | 30.0 | 0.0 | 0.0 | 30.0 | When Admin sets the business date to "09 March 2024" When Admin creates a Loan re-aging transaction by Loan external ID with the following data: | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 15 March 2024 | 2 | + | 1 | MONTHS | 15 March 2024 | 2 | + Then Loan Repayment schedule has 6 periods, with the following data for periods: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 1000.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 09 March 2024 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 14 | 15 March 2024 | | 500.0 | 500.0 | 0.0 | 0.0 | 0.0 | 500.0 | 0.0 | 0.0 | 0.0 | 500.0 | + | 5 | 31 | 15 April 2024 | | 0.0 | 500.0 | 0.0 | 0.0 | 0.0 | 500.0 | 0.0 | 0.0 | 0.0 | 500.0 | + | 6 | 200 | 01 November 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 50.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 1000.0 | 0.0 | 0.0 | 50.0 | 1050.0 | 0.0 | 0.0 | 0.0 | 1050.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false | + | 09 March 2024 | Re-age | 1000.0 | 1000.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | NSF fee | true | Specified due date | 01 October 2024 | Flat | 20.0 | 0.0 | 0.0 | 20.0 | + | NSF fee | true | Specified due date | 01 November 2024 | Flat | 30.0 | 0.0 | 0.0 | 30.0 | +