You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by ad...@apache.org on 2025/06/12 21:42:17 UTC
(fineract) branch develop updated (e811491da7 -> c490e167b8)
This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
from e811491da7 FINERACT-2304: Handle Stuck CommandProcessing Retries
new 76b9cde83c FINERACT-2232: Capitalized income - Amortization rework
new c490e167b8 FINERACT-2232: added e2e automation tests for capitalized income amortization calculation
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../test/data/loanproduct/DefaultLoanProduct.java | 1 +
.../global/LoanProductGlobalInitializerStep.java | 49 +
.../fineract/test/stepdef/loan/LoanStepDef.java | 26 +-
.../fineract/test/support/TestContextKey.java | 1 +
.../features/LoanCapitalizedIncome.feature | 1013 +++++++++++++++-----
.../domain/LoanTransactionRepository.java | 19 +
...talizedIncomeAmortizationProcessingService.java | 5 +-
.../CapitalizedIncomeWritePlatformServiceImpl.java | 1 -
.../AccrualBasedAccountingProcessorForLoan.java | 47 +-
.../CapitalizedIncomeAmortizationBusinessStep.java | 64 +-
...nCapitalizedIncomeAmortizationEventService.java | 19 +-
...zedIncomeAmortizationProcessingServiceImpl.java | 121 ++-
.../adjustment/LoanAdjustmentServiceImpl.java | 13 -
.../util/CapitalizedIncomeAmortizationUtil.java | 57 +-
.../CapitalizedIncomeAmortizationUtilTest.java | 66 --
.../LoanCapitalizedIncomeTest.java | 34 +-
16 files changed, 1060 insertions(+), 476 deletions(-)
delete mode 100644 fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtilTest.java
(fineract) 01/02: FINERACT-2232: Capitalized income - Amortization rework
Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
commit 76b9cde83c8b37469746805674269315bf854ba3
Author: adam.magyari <ma...@gmail.com>
AuthorDate: Sun Jun 8 12:30:22 2025 +0200
FINERACT-2232: Capitalized income - Amortization rework
---
.../fineract/test/stepdef/loan/LoanStepDef.java | 2 +-
.../features/LoanCapitalizedIncome.feature | 507 ++++++++++-----------
.../domain/LoanTransactionRepository.java | 19 +
...talizedIncomeAmortizationProcessingService.java | 5 +-
.../CapitalizedIncomeWritePlatformServiceImpl.java | 1 -
.../AccrualBasedAccountingProcessorForLoan.java | 47 +-
.../CapitalizedIncomeAmortizationBusinessStep.java | 64 +--
...nCapitalizedIncomeAmortizationEventService.java | 19 +-
...zedIncomeAmortizationProcessingServiceImpl.java | 121 ++++-
.../adjustment/LoanAdjustmentServiceImpl.java | 13 -
.../util/CapitalizedIncomeAmortizationUtil.java | 57 ++-
.../CapitalizedIncomeAmortizationUtilTest.java | 66 ---
.../LoanCapitalizedIncomeTest.java | 34 +-
13 files changed, 480 insertions(+), 475 deletions(-)
diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java
index 523bb042cc..2151ba49e0 100644
--- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java
+++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java
@@ -1763,7 +1763,7 @@ public class LoanStepDef extends AbstractStepDef {
final List<GetLoansLoanIdTransactions> transactions = loanDetailsResponse.body().getTransactions();
final Optional<GetLoansLoanIdTransactions> transactionsMatch = transactions.stream()
.filter(t -> formatter.format(t.getDate()).equals(transactionDate) && t.getType().getCapitalizedIncomeAmortization())
- .findFirst();
+ .reduce((one, two) -> two);
if (transactionsMatch.isPresent()) {
testContext().set(TestContextKey.LOAN_CAPITALIZED_INCOME_AMORTIZATION_ID, transactionsMatch.get().getId());
}
diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanCapitalizedIncome.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanCapitalizedIncome.feature
index e23cc95518..e86ec28ac5 100644
--- a/fineract-e2e-tests-runner/src/test/resources/features/LoanCapitalizedIncome.feature
+++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanCapitalizedIncome.feature
@@ -730,7 +730,7 @@ Feature: Capitalized Income
| 07 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 08 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 13 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
@@ -748,7 +748,7 @@ Feature: Capitalized Income
| 25 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 26 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 31 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
@@ -767,7 +767,7 @@ Feature: Capitalized Income
| 12 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 13 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 18 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
@@ -786,7 +786,7 @@ Feature: Capitalized Income
| 01 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 02 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 03 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 04 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 04 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 05 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 06 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 07 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
@@ -806,13 +806,13 @@ Feature: Capitalized Income
| 21 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 22 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 23 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 24 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
+ | 24 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 25 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 26 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
+ | 26 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 27 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 29 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 30 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
+ | 30 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 31 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
And Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "01 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
@@ -901,99 +901,99 @@ Feature: Capitalized Income
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
- | 01 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 02 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 03 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 04 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 05 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 06 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 07 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 08 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 12 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 13 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 14 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 15 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 16 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 17 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 18 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 19 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 20 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 21 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 22 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 23 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 24 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 25 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 26 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 30 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 31 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 01 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 02 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 03 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 04 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 05 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 06 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 07 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 08 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.0 | 0.54 | 0.0 | 0.0 | false | false |
+ | 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 12 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 13 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 14 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 15 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 16 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 17 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 18 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 19 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 20 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 21 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 22 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 23 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 24 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 25 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 26 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.0 | 0.54 | 0.0 | 0.0 | false | false |
+ | 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 30 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 02 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 03 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 04 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 05 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 06 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 07 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 08 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 09 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 10 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 11 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 12 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 13 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 17 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 18 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 19 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 20 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 21 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 22 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 23 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 24 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 25 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 26 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 27 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 28 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 29 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 02 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 03 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 04 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 05 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 06 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 07 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 08 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 09 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 10 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 11 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 12 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 13 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.0 | 0.54 | 0.0 | 0.0 | false | false |
+ | 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 17 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 18 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 19 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 20 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 21 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 22 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 23 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 24 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 25 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 26 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 27 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 28 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 29 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 01 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 02 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 03 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 04 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 05 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 06 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 07 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 08 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 09 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 10 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 11 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 12 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 13 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 14 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 15 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 16 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 17 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 18 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 19 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 20 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 21 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 22 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.0 | 0.54 | 0.0 | 0.0 | false | false |
- | 23 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 24 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.0 | 0.54 | 0.0 | 0.0 | false | false |
- | 25 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 26 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.0 | 0.54 | 0.0 | 0.0 | false | false |
- | 27 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 28 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.0 | 0.54 | 0.0 | 0.0 | false | false |
- | 29 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
- | 30 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.0 | 0.54 | 0.0 | 0.0 | false | false |
- | 31 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 01 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 02 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 03 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 04 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.0 | 0.54 | 0.0 | 0.0 | false | false |
+ | 05 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 06 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 07 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 08 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 09 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 10 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 11 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 12 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 13 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 14 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 15 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 16 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 17 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 18 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 19 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 20 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 21 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 22 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.0 | 0.54 | 0.0 | 0.0 | false | false |
+ | 23 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 24 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 25 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 26 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 27 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 28 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 29 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 30 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
+ | 31 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.0 | 0.55 | 0.0 | 0.0 | false | false |
And Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "01 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| INCOME | 404000 | Interest Income | | 0.55 |
@@ -1021,9 +1021,9 @@ Feature: Capitalized Income
| ASSET | 112601 | Loans Receivable | 100.0 | |
| LIABILITY | 145024 | Deferred Capitalized Income | | 100.0 |
Then Admin can successfully set Fraud flag to the loan
- When Admin sets the business date to "03 February 2024"
- And Admin does charge-off the loan with reason "DELINQUENT" on "03 February 2024"
- Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "03 February 2024" which has the following Journal entries:
+ When Admin sets the business date to "26 January 2024"
+ And Admin does charge-off the loan with reason "DELINQUENT" on "26 January 2024"
+ Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "26 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 1000.0 |
| ASSET | 112603 | Interest/Fee Receivable | | 4.58 |
@@ -1033,14 +1033,15 @@ Feature: Capitalized Income
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 01 January 2024 | Disbursement | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 900.0 | false |
| 02 January 2024 | Capitalized Income | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false |
- | 03 February 2024 | Accrual | 4.58 | 0.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
- | 03 February 2024 | Charge-off | 1004.58| 1000.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
- | 03 February 2024 | Capitalized Income Amortization | 100.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | false |
- Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "03 February 2024" which has the following Journal entries:
+ | 26 January 2024 | Capitalized Income Amortization | 83.33 | 0.0 | 83.33 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Accrual | 3.69 | 0.0 | 3.69 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Charge-off | 1004.58| 1000.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Capitalized Income Amortization | 16.67 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | false |
+ Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "26 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
- | EXPENSE | 744007 | Credit Loss/Bad Debt | | 100.0 |
- | LIABILITY | 145024 | Deferred Capitalized Income | 100.0 | |
- Then LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent is raised on "03 February 2024"
+ | EXPENSE | 744007 | Credit Loss/Bad Debt | | 16.67 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 16.67 | |
+ Then LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent is raised on "26 January 2024"
@TestRailId:C3662
Scenario: As a user I want to add capitalized income to a progressive loan after disbursement and then charge-off a fraud loan - amortization in case of loan charge-off event
@@ -1063,9 +1064,9 @@ Feature: Capitalized Income
| ASSET | 112601 | Loans Receivable | 100.0 | |
| LIABILITY | 145024 | Deferred Capitalized Income | | 100.0 |
Then Admin can successfully set Fraud flag to the loan
- When Admin sets the business date to "03 February 2024"
- And Admin does charge-off the loan on "03 February 2024"
- Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "03 February 2024" which has the following Journal entries:
+ When Admin sets the business date to "26 January 2024"
+ And Admin does charge-off the loan on "26 January 2024"
+ Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "26 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 1000.0 |
| ASSET | 112603 | Interest/Fee Receivable | | 4.58 |
@@ -1075,14 +1076,15 @@ Feature: Capitalized Income
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 01 January 2024 | Disbursement | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 900.0 | false |
| 02 January 2024 | Capitalized Income | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false |
- | 03 February 2024 | Accrual | 4.58 | 0.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
- | 03 February 2024 | Charge-off | 1004.58| 1000.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
- | 03 February 2024 | Capitalized Income Amortization | 100.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | false |
- Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "03 February 2024" which has the following Journal entries:
+ | 26 January 2024 | Capitalized Income Amortization | 83.33 | 0.0 | 83.33 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Accrual | 3.69 | 0.0 | 3.69 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Charge-off | 1004.58| 1000.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Capitalized Income Amortization | 16.67 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | false |
+ Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "26 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
- | EXPENSE | 744037 | Credit Loss/Bad Debt-Fraud | | 100.0 |
- | LIABILITY | 145024 | Deferred Capitalized Income | 100.0 | |
- Then LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent is raised on "03 February 2024"
+ | EXPENSE | 744037 | Credit Loss/Bad Debt-Fraud | | 16.67 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 16.67 | |
+ Then LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent is raised on "26 January 2024"
@TestRailId:C3663
Scenario: As a user I want to add capitalized income to a progressive loan after disbursement and then charge-off the loan - amortization in case of loan charge-off event
@@ -1105,9 +1107,9 @@ Feature: Capitalized Income
| ASSET | 112601 | Loans Receivable | 100.0 | |
| LIABILITY | 145024 | Deferred Capitalized Income | | 100.0 |
Then Admin can successfully set Fraud flag to the loan
- When Admin sets the business date to "03 February 2024"
- And Admin does charge-off the loan with reason "DELINQUENT" on "03 February 2024"
- Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "03 February 2024" which has the following Journal entries:
+ When Admin sets the business date to "26 January 2024"
+ And Admin does charge-off the loan with reason "DELINQUENT" on "26 January 2024"
+ Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "26 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 1000.0 |
| ASSET | 112603 | Interest/Fee Receivable | | 4.58 |
@@ -1117,14 +1119,15 @@ Feature: Capitalized Income
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 01 January 2024 | Disbursement | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 900.0 | false |
| 02 January 2024 | Capitalized Income | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false |
- | 03 February 2024 | Accrual | 4.58 | 0.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
- | 03 February 2024 | Charge-off | 1004.58| 1000.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
- | 03 February 2024 | Capitalized Income Amortization | 100.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | false |
- Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "03 February 2024" which has the following Journal entries:
+ | 26 January 2024 | Capitalized Income Amortization | 83.33 | 0.0 | 83.33 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Accrual | 3.69 | 0.0 | 3.69 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Charge-off | 1004.58| 1000.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Capitalized Income Amortization | 16.67 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | false |
+ Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "26 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
- | EXPENSE | 744007 | Credit Loss/Bad Debt | | 100.0 |
- | LIABILITY | 145024 | Deferred Capitalized Income | 100.0 | |
- Then LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent is raised on "03 February 2024"
+ | EXPENSE | 744007 | Credit Loss/Bad Debt | | 16.67 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 16.67 | |
+ Then LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent is raised on "26 January 2024"
@TestRailId:C3664
Scenario: As a user I want to add capitalized income to a progressive loan after disbursement and then undo the charge-off transaction with "delinquent" reason - amortization in case of loan charge-off event should also be reversed
@@ -1147,9 +1150,9 @@ Feature: Capitalized Income
| ASSET | 112601 | Loans Receivable | 100.0 | |
| LIABILITY | 145024 | Deferred Capitalized Income | | 100.0 |
Then Admin can successfully set Fraud flag to the loan
- When Admin sets the business date to "03 February 2024"
- And Admin does charge-off the loan with reason "DELINQUENT" on "03 February 2024"
- Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "03 February 2024" which has the following Journal entries:
+ When Admin sets the business date to "26 January 2024"
+ And Admin does charge-off the loan with reason "DELINQUENT" on "26 January 2024"
+ Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "26 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 1000.0 |
| ASSET | 112603 | Interest/Fee Receivable | | 4.58 |
@@ -1159,16 +1162,17 @@ Feature: Capitalized Income
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 01 January 2024 | Disbursement | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 900.0 | false |
| 02 January 2024 | Capitalized Income | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false |
- | 03 February 2024 | Accrual | 4.58 | 0.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
- | 03 February 2024 | Charge-off | 1004.58| 1000.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
- | 03 February 2024 | Capitalized Income Amortization | 100.0 | 0.0 | 100.0 | 0.0 | 0.0 | 0.0 | false |
- Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "03 February 2024" which has the following Journal entries:
+ | 26 January 2024 | Capitalized Income Amortization | 83.33 | 0.0 | 83.33 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Accrual | 3.69 | 0.0 | 3.69 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Charge-off | 1004.58| 1000.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Capitalized Income Amortization | 16.67 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | false |
+ Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "26 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
- | EXPENSE | 744007 | Credit Loss/Bad Debt | | 100.0 |
- | LIABILITY | 145024 | Deferred Capitalized Income | 100.0 | |
- Then LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent is raised on "03 February 2024"
+ | EXPENSE | 744007 | Credit Loss/Bad Debt | | 16.67 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 16.67 | |
+ Then LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent is raised on "26 January 2024"
Then Admin does a charge-off undo the loan
- Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "03 February 2024" which has the following Journal entries:
+ Then Loan Transactions tab has a "CHARGE_OFF" transaction with date "26 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 1000.0 |
| ASSET | 112603 | Interest/Fee Receivable | | 4.58 |
@@ -1182,14 +1186,15 @@ Feature: Capitalized Income
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 01 January 2024 | Disbursement | 900.0 | 0.0 | 0.0 | 0.0 | 0.0 | 900.0 | false |
| 02 January 2024 | Capitalized Income | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 1000.0 | false |
- | 03 February 2024 | Accrual | 4.58 | 0.0 | 4.58 | 0.0 | 0.0 | 0.0 | false |
- | 03 February 2024 | Charge-off | 1004.58| 1000.0 | 4.58 | 0.0 | 0.0 | 0.0 | true |
+ | 26 January 2024 | Capitalized Income Amortization | 83.33 | 0.0 | 83.33 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Accrual | 3.69 | 0.0 | 3.69 | 0.0 | 0.0 | 0.0 | false |
+ | 26 January 2024 | Charge-off | 1004.58| 1000.0 | 4.58 | 0.0 | 0.0 | 0.0 | true |
Then Reversed loan capitalized income amortization transaction has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
- | EXPENSE | 744007 | Credit Loss/Bad Debt | | 100.0 |
- | LIABILITY | 145024 | Deferred Capitalized Income | 100.0 | |
- | EXPENSE | 744007 | Credit Loss/Bad Debt | 100.0 | |
- | LIABILITY | 145024 | Deferred Capitalized Income | | 100.0 |
+ | EXPENSE | 744007 | Credit Loss/Bad Debt | | 16.67 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 16.67 | |
+ | EXPENSE | 744007 | Credit Loss/Bad Debt | 16.67 | |
+ | LIABILITY | 145024 | Deferred Capitalized Income | | 16.67 |
@TestRailId:C3673
Scenario: Verify capitalized income: repayment schedule - UC1: Simple loan - full payment
@@ -1258,7 +1263,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1294,7 +1299,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1338,7 +1343,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1374,7 +1379,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1412,7 +1417,7 @@ Feature: Capitalized Income
| 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1479,7 +1484,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1515,7 +1520,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1553,7 +1558,7 @@ Feature: Capitalized Income
| 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1591,7 +1596,7 @@ Feature: Capitalized Income
| 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
| 03 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 04 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
- | 04 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 04 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
| 05 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 06 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1630,18 +1635,18 @@ Feature: Capitalized Income
| 23 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
| 23 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 24 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
- | 24 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
+ | 24 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 25 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
| 25 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 26 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
- | 26 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
+ | 26 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 27 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
| 27 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 29 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
| 29 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 30 March 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
+ | 30 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 31 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
| 31 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 01 April 2024 | Repayment | 50.59 | 50.3 | 0.29 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1714,7 +1719,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1750,7 +1755,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1795,7 +1800,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1831,7 +1836,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1869,7 +1874,7 @@ Feature: Capitalized Income
| 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
@@ -1900,7 +1905,7 @@ Feature: Capitalized Income
| 29 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 01 March 2024 | Repayment | 100.88 | 100.29 | 0.59 | 0.0 | 0.0 | 0.0 | false | false |
| 01 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 01 March 2024 | Capitalized Income Amortization | 17.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 March 2024 | Capitalized Income Amortization | 17.03 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | false | false |
@TestRailId:C3675
Scenario: Verify capitalized income: repayment schedule - UC3: loan - charge-off
@@ -1969,7 +1974,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2005,7 +2010,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2050,7 +2055,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2086,7 +2091,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2124,7 +2129,7 @@ Feature: Capitalized Income
| 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2153,9 +2158,10 @@ Feature: Capitalized Income
| 28 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 29 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 March 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 01 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 01 March 2024 | Charge-off | 101.17 | 100.29 | 0.88 | 0.0 | 0.0 | 0.0 | false | false |
- | 01 March 2024 | Capitalized Income Amortization | 17.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 March 2024 | Capitalized Income Amortization | 16.48 | 0.0 | 16.48 | 0.0 | 0.0 | 0.0 | false | false |
@TestRailId:C3665
Scenario: Verify Capitalized Income Adjustment with partial amortization and allocation strategy - Credit Adj < Bal - UC4
@@ -2201,7 +2207,7 @@ Feature: Capitalized Income
| 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
# Journal entry check for accrual
Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 February 2024" which has the following Journal entries:
@@ -2211,8 +2217,8 @@ Feature: Capitalized Income
# Journal entry check for final capitalized income amortization
Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "01 February 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
- | INCOME | 404000 | Interest Income | | 0.83 |
- | LIABILITY | 145024 | Deferred Capitalized Income | 0.83 | |
+ | INCOME | 404000 | Interest Income | | 17.58 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 17.58 | |
When Admin sets the business date to "01 March 2024"
And Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 March 2024" with 50.58 EUR transaction amount and system-generated Idempotency key
Then Loan Transactions tab has the following data:
@@ -2220,7 +2226,7 @@ Feature: Capitalized Income
| 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 March 2024 | Repayment | 50.58 | 49.99 | 0.59 | 0.0 | 0.0 | 50.3 | false |
# Journal entry check for March repayment
@@ -2240,7 +2246,7 @@ Feature: Capitalized Income
| 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 March 2024 | Repayment | 50.58 | 49.99 | 0.59 | 0.0 | 0.0 | 50.3 | false |
| 01 March 2024 | Capitalized Income Adjustment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 40.3 | false |
@@ -2252,12 +2258,12 @@ Feature: Capitalized Income
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 March 2024 | Capitalized Income Adjustment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 40.3 | false |
| 01 April 2024 | Repayment | 40.54 | 40.3 | 0.24 | 0.0 | 0.0 | 0.0 | false |
| 01 April 2024 | Accrual | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
- | 01 April 2024 | Capitalized Income Amortization | 39.17 | 0.0 | 39.17 | 0.0 | 0.0 | 0.0 | false |
+ | 01 April 2024 | Capitalized Income Amortization | 22.42 | 0.0 | 22.42 | 0.0 | 0.0 | 0.0 | false |
# Journal entry check for final repayment
Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 April 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
@@ -2272,8 +2278,8 @@ Feature: Capitalized Income
# Journal entry check for final capitalized income amortization
Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "01 April 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
- | INCOME | 404000 | Interest Income | | 39.17 |
- | LIABILITY | 145024 | Deferred Capitalized Income | 39.17 | |
+ | INCOME | 404000 | Interest Income | | 22.42 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 22.42 | |
# Journal entry check for final capitalized income adjustment
Then Loan Transactions tab has a "CAPITALIZED_INCOME_ADJUSTMENT" transaction with date "01 March 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
@@ -2325,7 +2331,7 @@ Feature: Capitalized Income
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
# Journal entry check for February accrual
Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 February 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
@@ -2334,8 +2340,8 @@ Feature: Capitalized Income
# Journal entry check for February capitalized income amortization
Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "01 February 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
- | INCOME | 404000 | Interest Income | | 0.83 |
- | LIABILITY | 145024 | Deferred Capitalized Income | 0.83 | |
+ | INCOME | 404000 | Interest Income | | 17.58 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 17.58 | |
When Admin sets the business date to "01 March 2024"
When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 March 2024" with 50.58 EUR transaction amount and system-generated Idempotency key
Then Loan Transactions tab has the following data:
@@ -2344,7 +2350,7 @@ Feature: Capitalized Income
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
| 01 March 2024 | Repayment | 50.58 | 49.99 | 0.59 | 0.0 | 0.0 | 50.3 | false |
# Journal entry check for March repayment
Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 March 2024" which has the following Journal entries:
@@ -2364,7 +2370,7 @@ Feature: Capitalized Income
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
| 01 March 2024 | Repayment | 50.58 | 49.99 | 0.59 | 0.0 | 0.0 | 50.3 | false |
| 01 March 2024 | Capitalized Income Adjustment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 40.3 | false |
When Admin sets the business date to "15 March 2024"
@@ -2380,7 +2386,7 @@ Feature: Capitalized Income
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
| 01 March 2024 | Repayment | 50.58 | 49.99 | 0.59 | 0.0 | 0.0 | 50.3 | false |
| 01 March 2024 | Capitalized Income Adjustment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 40.3 | false |
| 15 March 2024 | Capitalized Income Adjustment | 5.0 | 5.0 | 0.0 | 0.0 | 0.0 | 35.3 | false |
@@ -2392,13 +2398,13 @@ Feature: Capitalized Income
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
| 01 March 2024 | Repayment | 50.58 | 49.99 | 0.59 | 0.0 | 0.0 | 50.3 | false |
| 01 March 2024 | Capitalized Income Adjustment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 40.3 | false |
| 15 March 2024 | Capitalized Income Adjustment | 5.0 | 5.0 | 0.0 | 0.0 | 0.0 | 35.3 | false |
| 01 April 2024 | Repayment | 35.52 | 35.3 | 0.22 | 0.0 | 0.0 | 0.0 | false |
| 01 April 2024 | Accrual | 0.81 | 0.0 | 0.81 | 0.0 | 0.0 | 0.0 | false |
- | 01 April 2024 | Capitalized Income Amortization | 34.17 | 0.0 | 34.17 | 0.0 | 0.0 | 0.0 | false |
+ | 01 April 2024 | Capitalized Income Amortization | 17.42 | 0.0 | 17.42 | 0.0 | 0.0 | 0.0 | false |
# Journal entry check for final April repayment
Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 April 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
@@ -2413,8 +2419,8 @@ Feature: Capitalized Income
# Journal entry check for final April capitalized income amortization
Then Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION" transaction with date "01 April 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
- | INCOME | 404000 | Interest Income | | 34.17 |
- | LIABILITY | 145024 | Deferred Capitalized Income | 34.17 | |
+ | INCOME | 404000 | Interest Income | | 17.42 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 17.42 | |
# Journal entry checks for Capitalized Income Adjustments - INTACT
Then Loan Transactions tab has a "CAPITALIZED_INCOME_ADJUSTMENT" transaction with date "01 March 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
@@ -2464,7 +2470,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2500,7 +2506,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2536,7 +2542,7 @@ Feature: Capitalized Income
| 14 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2570,8 +2576,7 @@ Feature: Capitalized Income
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 49.71 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.29 |
- | INCOME | 404000 | Interest Income | 33.0 | |
- | LIABILITY | 145024 | Deferred Capitalized Income | 17.0 | |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 50.0 | |
When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 February 2024" with 33.72 EUR transaction amount and system-generated Idempotency key
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
@@ -2595,7 +2600,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2631,7 +2636,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2668,7 +2673,7 @@ Feature: Capitalized Income
| 14 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2697,13 +2702,12 @@ Feature: Capitalized Income
| 28 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 29 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 01 March 2024 | Capitalized Income Adjustment | 50.0 | 49.13 | 0.87 | 0.0 | 0.0 | 67.15 | false | true |
+ | 01 March 2024 | Capitalized Income Adjustment | 50.0 | 49.13 | 0.87 | 0.0 | 0.0 | 67.15 | false | true |
Then Loan Transactions tab has a "CAPITALIZED_INCOME_ADJUSTMENT" transaction with date "01 March 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 49.13 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.87 |
- | INCOME | 404000 | Interest Income | 33.0 | |
- | LIABILITY | 145024 | Deferred Capitalized Income | 17.0 | |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 50.0 | |
@TestRailId:C3703
Scenario: Verify Capitalized Income adjustment reverse replay with backdated charge
@@ -2747,7 +2751,7 @@ Feature: Capitalized Income
| 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 12 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ | 12 January 2024 | Capitalized Income Amortization | 0.57 | 0.0 | 0.57 | 0.0 | 0.0 | 0.0 | false | false |
| 13 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 13 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 14 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2793,7 +2797,7 @@ Feature: Capitalized Income
| 03 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 03 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 04 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 04 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ | 04 February 2024 | Capitalized Income Amortization | 0.57 | 0.0 | 0.57 | 0.0 | 0.0 | 0.0 | false | false |
| 05 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 05 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 06 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2837,7 +2841,7 @@ Feature: Capitalized Income
| 25 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 25 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 26 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 26 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ | 26 February 2024 | Capitalized Income Amortization | 0.57 | 0.0 | 0.57 | 0.0 | 0.0 | 0.0 | false | false |
| 27 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 27 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 28 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2849,8 +2853,7 @@ Feature: Capitalized Income
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 50.12 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.88 |
- | INCOME | 404000 | Interest Income | 33.6 | |
- | LIABILITY | 145024 | Deferred Capitalized Income | 17.4 | |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 51.0 | |
When Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 10 EUR transaction amount
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
@@ -2878,7 +2881,7 @@ Feature: Capitalized Income
| 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 12 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ | 12 January 2024 | Capitalized Income Amortization | 0.57 | 0.0 | 0.57 | 0.0 | 0.0 | 0.0 | false | false |
| 13 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 13 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 14 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2924,7 +2927,7 @@ Feature: Capitalized Income
| 03 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 03 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 04 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 04 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ | 04 February 2024 | Capitalized Income Amortization | 0.57 | 0.0 | 0.57 | 0.0 | 0.0 | 0.0 | false | false |
| 05 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 05 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 06 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2968,7 +2971,7 @@ Feature: Capitalized Income
| 25 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 25 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 26 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 26 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ | 26 February 2024 | Capitalized Income Amortization | 0.57 | 0.0 | 0.57 | 0.0 | 0.0 | 0.0 | false | false |
| 27 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 27 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 28 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -2980,8 +2983,7 @@ Feature: Capitalized Income
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 50.04 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.96 |
- | INCOME | 404000 | Interest Income | 33.6 | |
- | LIABILITY | 145024 | Deferred Capitalized Income | 17.4 | |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 51.0 | |
@TestRailId:C3712
Scenario: Verify Capitalized Income Adjustment validation - Total adjustment amount cannot exceed original transaction amount
@@ -3060,7 +3062,7 @@ Feature: Capitalized Income
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
When Admin sets the business date to "01 March 2024"
When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 March 2024" with 50.89 EUR transaction amount and system-generated Idempotency key
When Admin sets the business date to "02 March 2024"
@@ -3081,7 +3083,7 @@ Feature: Capitalized Income
| 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false |
| 01 February 2024 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
| 01 February 2024 | Accrual | 0.87 | 0.0 | 0.87 | 0.0 | 0.0 | 0.0 | false |
- | 01 February 2024 | Capitalized Income Amortization | 0.83 | 0.0 | 0.83 | 0.0 | 0.0 | 0.0 | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false |
| 01 March 2024 | Repayment | 50.89 | 50.3 | 0.59 | 0.0 | 0.0 | 49.99 | false |
| 02 March 2024 | Capitalized Income Adjustment | 50.0 | 49.99 | 0.01 | 0.0 | 0.0 | 0.0 | false |
@@ -3212,7 +3214,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3248,7 +3250,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3284,7 +3286,7 @@ Feature: Capitalized Income
| 14 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3317,8 +3319,7 @@ Feature: Capitalized Income
Then Loan Transactions tab has a "CAPITALIZED_INCOME_ADJUSTMENT" transaction with date "01 March 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 40.0 |
- | INCOME | 404000 | Interest Income | 23.0 | |
- | LIABILITY | 145024 | Deferred Capitalized Income | 17.0 | |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 40.0 | |
When Admin sets the business date to "02 March 2024"
And Admin runs inline COB job for Loan
And Customer undo "1"th capitalized income adjustment on "02 March 2024"
@@ -3346,7 +3347,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3382,7 +3383,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3418,7 +3419,7 @@ Feature: Capitalized Income
| 14 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3448,17 +3449,16 @@ Feature: Capitalized Income
| 29 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 01 March 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | true | false |
+ | 01 March 2024 | Capitalized Income Amortization Adjustment | 22.97 | 0.0 | 22.97 | 0.0 | 0.0 | 0.0 | false | false |
| 01 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 02 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 02 March 2024 | Capitalized Income Amortization | 1.33 | 0.0 | 1.33 | 0.0 | 0.0 | 0.0 | false | false |
+ | 02 March 2024 | Capitalized Income Amortization | 24.07 | 0.0 | 24.07 | 0.0 | 0.0 | 0.0 | false | false |
Then Loan Transactions tab has a "CAPITALIZED_INCOME_ADJUSTMENT" transaction with date "01 March 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 40.0 |
- | INCOME | 404000 | Interest Income | 23.0 | |
- | LIABILITY | 145024 | Deferred Capitalized Income | 17.0 | |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 40.0 | |
| ASSET | 112601 | Loans Receivable | 40.0 | |
- | INCOME | 404000 | Interest Income | | 23.0 |
- | LIABILITY | 145024 | Deferred Capitalized Income | | 17.0 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | | 40.0 |
@TestRailId:C3705
Scenario: Verify Capitalized Income adjustment reverse - UC2
@@ -3534,7 +3534,7 @@ Feature: Capitalized Income
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Capitalized Income Amortization | 0.06 | 0.0 | 0.06 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 11 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ | 11 January 2024 | Capitalized Income Amortization | 1.03 | 0.0 | 1.03 | 0.0 | 0.0 | 0.0 | false | false |
Then Loan Transactions tab has a "CAPITALIZED_INCOME_ADJUSTMENT" transaction with date "10 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 40.0 |
@@ -3578,17 +3578,17 @@ Feature: Capitalized Income
| 07 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 07 January 2024 | Capitalized Income Amortization | 0.66 | 0.0 | 0.66 | 0.0 | 0.0 | 0.0 | false | false |
| 08 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 08 January 2024 | Capitalized Income Amortization | 0.66 | 0.0 | 0.66 | 0.0 | 0.0 | 0.0 | false | false |
+ | 08 January 2024 | Capitalized Income Amortization | 0.65 | 0.0 | 0.65 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.66 | 0.0 | 0.66 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Capitalized Income Adjustment | 55.0 | 54.75 | 0.25 | 0.0 | 0.0 | 95.25 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization Adjustment | 0.93 | 0.0 | 0.93 | 0.0 | 0.0 | 0.0 | false | false |
Then Loan Transactions tab has a "CAPITALIZED_INCOME_ADJUSTMENT" transaction with date "10 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 54.75 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.25 |
- | INCOME | 404000 | Interest Income | 0.94 | |
- | LIABILITY | 145024 | Deferred Capitalized Income | 54.06 | |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 55.0 | |
Then Customer is forbidden to undo "1"th "Capitalized Income" transaction made on "01 January 2024" due to adjustment exists
And Customer undo "1"th capitalized income adjustment on "11 January 2024"
When Admin sets the business date to "12 January 2024"
@@ -3611,23 +3611,22 @@ Feature: Capitalized Income
| 07 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 07 January 2024 | Capitalized Income Amortization | 0.66 | 0.0 | 0.66 | 0.0 | 0.0 | 0.0 | false | false |
| 08 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 08 January 2024 | Capitalized Income Amortization | 0.66 | 0.0 | 0.66 | 0.0 | 0.0 | 0.0 | false | false |
+ | 08 January 2024 | Capitalized Income Amortization | 0.65 | 0.0 | 0.65 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.66 | 0.0 | 0.66 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Capitalized Income Adjustment | 55.0 | 54.75 | 0.25 | 0.0 | 0.0 | 95.25 | true | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization Adjustment | 0.93 | 0.0 | 0.93 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 11 January 2024 | Capitalized Income Amortization | 0.68 | 0.0 | 0.68 | 0.0 | 0.0 | 0.0 | false | false |
+ | 11 January 2024 | Capitalized Income Amortization | 2.25 | 0.0 | 2.25 | 0.0 | 0.0 | 0.0 | false | false |
Then Loan Transactions tab has a "CAPITALIZED_INCOME_ADJUSTMENT" transaction with date "10 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 54.75 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.25 |
- | INCOME | 404000 | Interest Income | 0.94 | |
- | LIABILITY | 145024 | Deferred Capitalized Income | 54.06 | |
+ | LIABILITY | 145024 | Deferred Capitalized Income | 55.0 | |
| ASSET | 112601 | Loans Receivable | 54.75 | |
| ASSET | 112603 | Interest/Fee Receivable | 0.25 | |
- | INCOME | 404000 | Interest Income | | 0.94 |
- | LIABILITY | 145024 | Deferred Capitalized Income | | 54.06 |
+ | LIABILITY | 145024 | Deferred Capitalized Income | | 55.0 |
@TestRailId:C3708
Scenario: Verify capitalized income reversed after repayment - UC1
@@ -3696,7 +3695,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3732,7 +3731,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3744,9 +3743,11 @@ Feature: Capitalized Income
| Type | Account code | Account name | Debit | Credit |
| INCOME | 404000 | Interest Income | | 0.55 |
| LIABILITY | 145024 | Deferred Capitalized Income | 0.55 | |
- And Admin sets the business date to "15 February 2024"
+ And Admin sets the business date to "14 February 2024"
And Admin runs inline COB job for Loan
When Customer undo "1"th "Capitalized Income" transaction made on "01 January 2024"
+ And Admin sets the business date to "15 February 2024"
+ And Admin runs inline COB job for Loan
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
@@ -3769,7 +3770,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3805,7 +3806,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3839,13 +3840,12 @@ Feature: Capitalized Income
| 12 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 13 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization Adjustment | 24.75 | 0.0 | 24.75 | 0.0 | 0.0 | 0.0 | false | false |
- And Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT" transaction with date "15 February 2024" which has the following Journal entries:
+ | 14 February 2024 | Accrual Adjustment | 0.4 | 0.0 | 0.4 | 0.0 | 0.0 | 0.0 | false | false |
+ | 14 February 2024 | Capitalized Income Amortization Adjustment | 24.18 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | false | false |
+ And Loan Transactions tab has a "CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT" transaction with date "14 February 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
- | INCOME | 404000 | Interest Income | 24.75 | |
- | LIABILITY | 145024 | Deferred Capitalized Income | | 24.75 |
+ | INCOME | 404000 | Interest Income | 24.18 | |
+ | LIABILITY | 145024 | Deferred Capitalized Income | | 24.18 |
And Admin sets the business date to "16 February 2024"
And Admin runs inline COB job for Loan
And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "16 February 2024" with "50" EUR transaction amount
@@ -3881,7 +3881,7 @@ Feature: Capitalized Income
| 09 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 10 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 10 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3917,7 +3917,7 @@ Feature: Capitalized Income
| 27 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 28 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
- | 28 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
+ | 28 January 2024 | Capitalized Income Amortization | 0.54 | 0.0 | 0.54 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 29 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
@@ -3951,12 +3951,11 @@ Feature: Capitalized Income
| 12 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 13 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
- | 14 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Capitalized Income Amortization Adjustment | 24.75 | 0.0 | 24.75 | 0.0 | 0.0 | 0.0 | false | false |
- | 15 February 2024 | Accrual Adjustment | 0.41 | 0.0 | 0.41 | 0.0 | 0.0 | 0.0 | false | false |
+ | 14 February 2024 | Accrual Adjustment | 0.4 | 0.0 | 0.4 | 0.0 | 0.0 | 0.0 | false | false |
+ | 14 February 2024 | Capitalized Income Amortization Adjustment | 24.18 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | false | false |
+ | 15 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false |
| 16 February 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
- Then LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent is raised on "15 February 2024"
+ Then LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent is raised on "14 February 2024"
Then Customer is forbidden to undo "1"th "Capitalized Income" transaction made on "01 January 2024" due to transaction type is non-reversal
@TestRailId:C3737
diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepository.java
index 548384e2d2..04b791eb49 100644
--- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepository.java
+++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepository.java
@@ -348,4 +348,23 @@ public interface LoanTransactionRepository extends JpaRepository<LoanTransaction
List<LoanTransaction> findNonReversedByLoanAndType(@Param("loan") Loan loan, @Param("type") LoanTransactionType type,
Pageable pageable);
+ @Query("""
+ SELECT COALESCE(SUM(CASE WHEN lt.typeOf = org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION THEN lt.amount
+ WHEN lt.typeOf = org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT THEN -lt.amount
+ ELSE 0 END), 0) FROM LoanTransaction lt
+ WHERE lt.loan = :loan
+ AND lt.reversed = false
+ AND (lt.typeOf = org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION
+ OR lt.typeOf = org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT)
+ """)
+ BigDecimal getAmortizedAmount(@Param("loan") Loan loan);
+
+ @Query("""
+ SELECT lt FROM LoanTransaction lt, LoanTransactionRelation ltr
+ WHERE lt.reversed = false
+ AND lt = ltr.fromTransaction
+ AND ltr.toTransaction = :capitalizedIncome
+ AND ltr.relationType = org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelationTypeEnum.ADJUSTMENT
+ """)
+ List<LoanTransaction> findAdjustmentsForCapitalizedIncome(@Param("capitalizedIncome") LoanTransaction capitalizedIncome);
}
diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingService.java
index d65a317c51..9b763a437d 100644
--- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingService.java
+++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingService.java
@@ -18,6 +18,7 @@
*/
package org.apache.fineract.portfolio.loanaccount.service;
+import java.time.LocalDate;
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction;
import org.springframework.lang.NonNull;
@@ -26,7 +27,9 @@ public interface LoanCapitalizedIncomeAmortizationProcessingService {
void processCapitalizedIncomeAmortizationOnLoanClosure(@NonNull Loan loan);
- void processCapitalizedIncomeAmortizationOnLoanChargeOff(@NonNull Loan loan);
+ void processCapitalizedIncomeAmortizationOnLoanChargeOff(@NonNull Loan loan, @NonNull LoanTransaction chargeOffTransaction);
void processCapitalizedIncomeAmortizationOnLoanUndoChargeOff(@NonNull LoanTransaction loanTransaction);
+
+ void processCapitalizedIncomeAmortizationTillDate(@NonNull Loan loan, @NonNull LocalDate tillDate);
}
diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeWritePlatformServiceImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeWritePlatformServiceImpl.java
index a931048cd3..9e51018a5c 100644
--- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeWritePlatformServiceImpl.java
+++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeWritePlatformServiceImpl.java
@@ -142,7 +142,6 @@ public class CapitalizedIncomeWritePlatformServiceImpl implements CapitalizedInc
// Post journal entries
journalEntryPoster.postJournalEntries(loan, existingTransactionIds, existingReversedTransactionIds);
- // Accounting uses the original balance, balance update HAS TO HAPPEN AFTER postJournalEntries
LoanCapitalizedIncomeBalance capitalizedIncomeBalance = capitalizedIncomeBalanceRepository.findByLoanIdAndLoanTransactionId(loanId,
capitalizedIncomeTransactionId);
capitalizedIncomeBalance
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java
index 362f15a0b1..72a5c4e3a8 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java
@@ -21,12 +21,10 @@ package org.apache.fineract.accounting.journalentry.service;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.ArrayList;
-import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
-import java.util.Optional;
import lombok.RequiredArgsConstructor;
import org.apache.fineract.accounting.closure.domain.GLClosure;
import org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForLoan;
@@ -36,19 +34,12 @@ import org.apache.fineract.accounting.journalentry.data.ChargePaymentDTO;
import org.apache.fineract.accounting.journalentry.data.GLAccountBalanceHolder;
import org.apache.fineract.accounting.journalentry.data.LoanDTO;
import org.apache.fineract.accounting.journalentry.data.LoanTransactionDTO;
-import org.apache.fineract.accounting.journalentry.domain.JournalEntry;
import org.apache.fineract.accounting.journalentry.domain.JournalEntryRepository;
import org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping;
-import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
-import org.apache.fineract.infrastructure.core.exception.PlatformDataIntegrityException;
import org.apache.fineract.infrastructure.core.service.MathUtil;
import org.apache.fineract.organisation.office.domain.Office;
import org.apache.fineract.portfolio.PortfolioProductType;
import org.apache.fineract.portfolio.loanaccount.data.LoanTransactionEnumData;
-import org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeBalance;
-import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction;
-import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation;
-import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelationTypeEnum;
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepository;
import org.apache.fineract.portfolio.loanaccount.repository.LoanCapitalizedIncomeBalanceRepository;
import org.springframework.stereotype.Component;
@@ -246,46 +237,10 @@ public class AccrualBasedAccountingProcessorForLoan implements AccountingProcess
}
// Resolve Debit
- GLAccount accountIncomeFromCapitalization = this.helper.getLinkedGLAccountForLoanProduct(loanProductId,
- AccrualAccountsForLoan.INCOME_FROM_CAPITALIZATION.getValue(), paymentTypeId);
GLAccount accountDeferredIncome = this.helper.getLinkedGLAccountForLoanProduct(loanProductId,
AccrualAccountsForLoan.DEFERRED_INCOME_LIABILITY.getValue(), paymentTypeId);
- Optional<LoanTransaction> transactionOpt = loanTransactionRepository.findById(Long.parseLong(transactionId));
- if (transactionOpt.isEmpty()) {
- throw new PlatformDataIntegrityException("transaction.for.accounting.not.found", "Transaction for accounting not found");
- }
- Optional<LoanTransactionRelation> relationToOriginalTransactionOpt = transactionOpt.get().getLoanTransactionRelations().stream()//
- .filter(rel -> LoanTransactionRelationTypeEnum.REPLAYED.equals(rel.getRelationType()))//
- .min(Comparator.comparing(AbstractPersistableCustom::getId));
- if (relationToOriginalTransactionOpt.isPresent()) {
- // Reverse-replay case
- final LoanTransaction originalTransaction = relationToOriginalTransactionOpt.get().getToTransaction();
- final List<JournalEntry> originalJournalEntries = this.journalEntryRepository.findJournalEntries(
- AccountingProcessorHelper.LOAN_TRANSACTION_IDENTIFIER + originalTransaction.getId(),
- PortfolioProductType.LOAN.getValue());
-
- for (JournalEntry originalJournalEntry : originalJournalEntries) {
- if (originalJournalEntry.isDebitEntry()) {
- if (accountIncomeFromCapitalization.getId().equals(originalJournalEntry.getGlAccount().getId())) {
- glAccountBalanceHolder.addToDebit(accountIncomeFromCapitalization, originalJournalEntry.getAmount());
- } else if (accountDeferredIncome.getId().equals(originalJournalEntry.getGlAccount().getId())) {
- glAccountBalanceHolder.addToDebit(accountDeferredIncome, originalJournalEntry.getAmount());
- }
- }
- }
- } else {
- LoanCapitalizedIncomeBalance capitalizedIncomeBalance = loanCapitalizedIncomeBalanceRepository
- .findBalanceForAdjustment(Long.parseLong(loanTransactionDTO.getTransactionId()));
- if (MathUtil.isGreaterThan(transactionAmount, capitalizedIncomeBalance.getUnrecognizedAmount())) {
- BigDecimal amortizedAmount = transactionAmount.subtract(capitalizedIncomeBalance.getUnrecognizedAmount());
-
- glAccountBalanceHolder.addToDebit(accountIncomeFromCapitalization, amortizedAmount);
- glAccountBalanceHolder.addToDebit(accountDeferredIncome, transactionAmount.subtract(amortizedAmount));
- } else {
- glAccountBalanceHolder.addToDebit(accountDeferredIncome, transactionAmount);
- }
- }
+ glAccountBalanceHolder.addToDebit(accountDeferredIncome, transactionAmount);
}
// create credit entries
diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CapitalizedIncomeAmortizationBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CapitalizedIncomeAmortizationBusinessStep.java
index 0fb1686b80..09b639935c 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CapitalizedIncomeAmortizationBusinessStep.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CapitalizedIncomeAmortizationBusinessStep.java
@@ -19,30 +19,12 @@
package org.apache.fineract.cob.loan;
import jakarta.transaction.Transactional;
-import java.math.BigDecimal;
-import java.math.MathContext;
import java.time.LocalDate;
-import java.time.temporal.ChronoUnit;
-import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
-import org.apache.fineract.accounting.journalentry.service.JournalEntryWritePlatformService;
import org.apache.fineract.infrastructure.core.service.DateUtils;
-import org.apache.fineract.infrastructure.core.service.ExternalIdFactory;
-import org.apache.fineract.infrastructure.core.service.MathUtil;
-import org.apache.fineract.infrastructure.event.business.domain.loan.transaction.LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent;
-import org.apache.fineract.infrastructure.event.business.service.BusinessEventNotifierService;
-import org.apache.fineract.organisation.monetary.domain.Money;
-import org.apache.fineract.organisation.monetary.domain.MoneyHelper;
-import org.apache.fineract.portfolio.loanaccount.data.AccountingBridgeDataDTO;
-import org.apache.fineract.portfolio.loanaccount.data.AccountingBridgeLoanTransactionDTO;
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
-import org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeBalance;
-import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction;
-import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepository;
-import org.apache.fineract.portfolio.loanaccount.mapper.LoanAccountingBridgeMapper;
-import org.apache.fineract.portfolio.loanaccount.repository.LoanCapitalizedIncomeBalanceRepository;
-import org.apache.fineract.portfolio.loanaccount.util.CapitalizedIncomeAmortizationUtil;
+import org.apache.fineract.portfolio.loanaccount.service.LoanCapitalizedIncomeAmortizationProcessingService;
import org.springframework.stereotype.Component;
@Component
@@ -50,54 +32,14 @@ import org.springframework.stereotype.Component;
@Slf4j
public class CapitalizedIncomeAmortizationBusinessStep implements LoanCOBBusinessStep {
- private final LoanCapitalizedIncomeBalanceRepository capitalizedIncomeBalanceRepository;
- private final BusinessEventNotifierService businessEventNotifierService;
- private final JournalEntryWritePlatformService journalEntryWritePlatformService;
- private final LoanAccountingBridgeMapper loanAccountingBridgeMapper;
- private final LoanTransactionRepository loanTransactionRepository;
- private final ExternalIdFactory externalIdFactory;
+ private final LoanCapitalizedIncomeAmortizationProcessingService loanCapitalizedIncomeAmortizationProcessingService;
@Transactional
@Override
public Loan execute(Loan loan) {
- MathContext mc = MoneyHelper.getMathContext();
LocalDate businessDate = DateUtils.getBusinessLocalDate();
- List<LoanCapitalizedIncomeBalance> balances = capitalizedIncomeBalanceRepository.findAllByLoanId(loan.getId());
- BigDecimal totalAmortizationAmount = BigDecimal.ZERO;
- for (LoanCapitalizedIncomeBalance balance : balances) {
- if (DateUtils.isAfterInclusive(businessDate, balance.getDate())) {
- long daysUntilMaturity = businessDate.until(loan.getMaturityDate(), ChronoUnit.DAYS);
- Money dailyAmortization = CapitalizedIncomeAmortizationUtil.calculateDailyAmortization(
- loan.getLoanProductRelatedDetail().getCapitalizedIncomeStrategy(), daysUntilMaturity,
- balance.getUnrecognizedAmount(), loan.getCurrency().toData());
- totalAmortizationAmount = totalAmortizationAmount.add(dailyAmortization.getAmount(), mc);
- balance.setUnrecognizedAmount(balance.getUnrecognizedAmount().subtract(dailyAmortization.getAmount(), mc));
- }
- }
-
- capitalizedIncomeBalanceRepository.saveAll(balances);
-
- if (MathUtil.isGreaterThanZero(totalAmortizationAmount)) {
- LoanTransaction transaction = LoanTransaction.capitalizedIncomeAmortization(loan, loan.getOffice(), businessDate,
- totalAmortizationAmount, externalIdFactory.create());
- loan.addLoanTransaction(transaction);
-
- transaction = loanTransactionRepository.save(transaction);
- loanTransactionRepository.flush();
-
- final AccountingBridgeLoanTransactionDTO transactionDTO = loanAccountingBridgeMapper.mapToLoanTransactionData(transaction,
- loan.getCurrency().getCode());
- final AccountingBridgeDataDTO accountingBridgeData = new AccountingBridgeDataDTO(loan.getId(), loan.getLoanProduct().getId(),
- loan.getOfficeId(), loan.getCurrencyCode(), loan.getSummary().getTotalInterestCharged(),
- loan.isNoneOrCashOrUpfrontAccrualAccountingEnabledOnLoanProduct(),
- loan.isUpfrontAccrualAccountingEnabledOnLoanProduct(), loan.isPeriodicAccrualAccountingEnabledOnLoanProduct(), false,
- false, false, null, loan.isClosedWrittenOff(), List.of(transactionDTO));
- this.journalEntryWritePlatformService.createJournalEntriesForLoan(accountingBridgeData);
-
- businessEventNotifierService
- .notifyPostBusinessEvent(new LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent(transaction));
- }
+ loanCapitalizedIncomeAmortizationProcessingService.processCapitalizedIncomeAmortizationTillDate(loan, businessDate);
return loan;
}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationEventService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationEventService.java
index b98915775b..5307983e7e 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationEventService.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationEventService.java
@@ -21,10 +21,12 @@ package org.apache.fineract.portfolio.loanaccount.service;
import jakarta.annotation.PostConstruct;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
+import org.apache.fineract.infrastructure.core.service.DateUtils;
import org.apache.fineract.infrastructure.event.business.BusinessEventListener;
import org.apache.fineract.infrastructure.event.business.domain.loan.LoanBalanceChangedBusinessEvent;
import org.apache.fineract.infrastructure.event.business.domain.loan.LoanCloseBusinessEvent;
import org.apache.fineract.infrastructure.event.business.domain.loan.transaction.LoanChargeOffPostBusinessEvent;
+import org.apache.fineract.infrastructure.event.business.domain.loan.transaction.LoanChargeOffPreBusinessEvent;
import org.apache.fineract.infrastructure.event.business.domain.loan.transaction.LoanUndoChargeOffBusinessEvent;
import org.apache.fineract.infrastructure.event.business.service.BusinessEventNotifierService;
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
@@ -45,6 +47,7 @@ public class LoanCapitalizedIncomeAmortizationEventService {
businessEventNotifierService.addPostBusinessEventListener(LoanChargeOffPostBusinessEvent.class, new LoanChargeOffEventListener());
businessEventNotifierService.addPostBusinessEventListener(LoanUndoChargeOffBusinessEvent.class,
new LoanUndoChargeOffEventListener());
+ businessEventNotifierService.addPreBusinessEventListener(LoanChargeOffPreBusinessEvent.class, new LoanChargeOffPreEventListener());
}
private final class LoanCloseListener implements BusinessEventListener<LoanCloseBusinessEvent> {
@@ -83,7 +86,21 @@ public class LoanCapitalizedIncomeAmortizationEventService {
final Loan loan = loanTransaction.getLoan();
if (loan.getLoanProductRelatedDetail().isEnableIncomeCapitalization() && loan.isChargedOff() && loanTransaction.isChargeOff()) {
log.debug("Loan charge-off on capitalized income amortization for loan {}", loan.getId());
- loanCapitalizedIncomeAmortizationProcessingService.processCapitalizedIncomeAmortizationOnLoanChargeOff(loan);
+ loanCapitalizedIncomeAmortizationProcessingService.processCapitalizedIncomeAmortizationOnLoanChargeOff(loan,
+ loanTransaction);
+ }
+ }
+ }
+
+ private final class LoanChargeOffPreEventListener implements BusinessEventListener<LoanChargeOffPreBusinessEvent> {
+
+ @Override
+ public void onBusinessEvent(final LoanChargeOffPreBusinessEvent event) {
+ final Loan loan = event.get();
+ if (loan.getLoanProductRelatedDetail().isEnableIncomeCapitalization()) {
+ log.debug("Loan pre charge-off capitalized income amortization for loan {}", loan.getId());
+ loanCapitalizedIncomeAmortizationProcessingService.processCapitalizedIncomeAmortizationTillDate(loan,
+ DateUtils.getBusinessLocalDate());
}
}
}
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingServiceImpl.java
index b5e3bea472..a8d53148ec 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingServiceImpl.java
@@ -26,16 +26,24 @@ import lombok.RequiredArgsConstructor;
import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService;
import org.apache.fineract.infrastructure.core.domain.ExternalId;
import org.apache.fineract.infrastructure.core.service.DateUtils;
+import org.apache.fineract.infrastructure.core.service.ExternalIdFactory;
import org.apache.fineract.infrastructure.core.service.MathUtil;
+import org.apache.fineract.infrastructure.event.business.domain.BusinessEvent;
import org.apache.fineract.infrastructure.event.business.domain.loan.LoanAdjustTransactionBusinessEvent;
+import org.apache.fineract.infrastructure.event.business.domain.loan.transaction.LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent;
import org.apache.fineract.infrastructure.event.business.domain.loan.transaction.LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent;
import org.apache.fineract.infrastructure.event.business.service.BusinessEventNotifierService;
+import org.apache.fineract.organisation.monetary.domain.Money;
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
import org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeBalance;
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction;
+import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation;
+import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelationTypeEnum;
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepository;
import org.apache.fineract.portfolio.loanaccount.repository.LoanCapitalizedIncomeBalanceRepository;
+import org.apache.fineract.portfolio.loanaccount.util.CapitalizedIncomeAmortizationUtil;
import org.jetbrains.annotations.NotNull;
+import org.springframework.lang.NonNull;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -48,20 +56,29 @@ public class LoanCapitalizedIncomeAmortizationProcessingServiceImpl implements L
private final LoanCapitalizedIncomeBalanceRepository loanCapitalizedIncomeBalanceRepository;
private final BusinessEventNotifierService businessEventNotifierService;
private final LoanJournalEntryPoster journalEntryPoster;
+ private final ExternalIdFactory externalIdFactory;
@Override
@Transactional
public void processCapitalizedIncomeAmortizationOnLoanClosure(@NotNull final Loan loan) {
final LocalDate transactionDate = getFinalCapitalizedIncomeAmortizationTransactionDate(loan);
final Optional<LoanTransaction> amortizationTransaction = createCapitalizedIncomeAmortizationTransaction(loan, transactionDate,
- false);
- amortizationTransaction.ifPresent(loanTransaction -> businessEventNotifierService
- .notifyPostBusinessEvent(new LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent(loanTransaction)));
+ false, null);
+ amortizationTransaction.ifPresent(loanTransaction -> {
+ if (loanTransaction.isCapitalizedIncomeAmortization()) {
+ businessEventNotifierService
+ .notifyPostBusinessEvent(new LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent(loanTransaction));
+ } else {
+ businessEventNotifierService.notifyPostBusinessEvent(
+ new LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent(loanTransaction));
+ }
+ });
}
@Override
@Transactional
- public void processCapitalizedIncomeAmortizationOnLoanChargeOff(@NotNull final Loan loan) {
+ public void processCapitalizedIncomeAmortizationOnLoanChargeOff(@NotNull final Loan loan,
+ @NonNull final LoanTransaction chargeOffTransaction) {
final List<Long> existingTransactionIds = loanTransactionRepository.findTransactionIdsByLoan(loan);
final List<Long> existingReversedTransactionIds = loanTransactionRepository.findReversedTransactionIdsByLoan(loan);
@@ -71,39 +88,57 @@ public class LoanCapitalizedIncomeAmortizationProcessingServiceImpl implements L
}
final Optional<LoanTransaction> amortizationTransaction = createCapitalizedIncomeAmortizationTransaction(loan, transactionDate,
- true);
+ true, chargeOffTransaction);
if (amortizationTransaction.isPresent()) {
journalEntryPoster.postJournalEntries(loan, existingTransactionIds, existingReversedTransactionIds);
- businessEventNotifierService.notifyPostBusinessEvent(
- new LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent(amortizationTransaction.get()));
+ if (amortizationTransaction.get().isCapitalizedIncomeAmortization()) {
+ businessEventNotifierService.notifyPostBusinessEvent(
+ new LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent(amortizationTransaction.get()));
+ } else {
+ businessEventNotifierService.notifyPostBusinessEvent(
+ new LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent(amortizationTransaction.get()));
+ }
}
}
private Optional<LoanTransaction> createCapitalizedIncomeAmortizationTransaction(final Loan loan, final LocalDate transactionDate,
- final boolean isChargeOff) {
+ final boolean isChargeOff, final LoanTransaction chargeOffTransaction) {
ExternalId externalId = ExternalId.empty();
- BigDecimal totalUnrecognizedAmount = BigDecimal.ZERO;
if (configurationDomainService.isExternalIdAutoGenerationEnabled()) {
externalId = ExternalId.generate();
}
final List<LoanCapitalizedIncomeBalance> balances = loanCapitalizedIncomeBalanceRepository.findAllByLoanId(loan.getId());
+
+ BigDecimal totalAmortizationAmount = BigDecimal.ZERO;
for (LoanCapitalizedIncomeBalance balance : balances) {
- final BigDecimal unrecognizedAmount = balance.getUnrecognizedAmount();
- totalUnrecognizedAmount = totalUnrecognizedAmount.add(unrecognizedAmount);
+ List<LoanTransaction> adjustments = loanTransactionRepository.findAdjustmentsForCapitalizedIncome(balance.getLoanTransaction());
+ LocalDate maturityDate = loan.getMaturityDate() != null ? loan.getMaturityDate() : transactionDate;
+ final Money amortizationTillDate = CapitalizedIncomeAmortizationUtil.calculateTotalAmortizationTillDate(balance, adjustments,
+ maturityDate, loan.getLoanProductRelatedDetail().getCapitalizedIncomeStrategy(), maturityDate, loan.getCurrency());
+ totalAmortizationAmount = totalAmortizationAmount.add(amortizationTillDate.getAmount());
if (isChargeOff) {
- balance.setChargedOffAmount(unrecognizedAmount);
+ balance.setChargedOffAmount(balance.getUnrecognizedAmount());
}
balance.setUnrecognizedAmount(BigDecimal.ZERO);
}
- if (MathUtil.isLessThanOrEqualZero(totalUnrecognizedAmount)) {
+ BigDecimal amortizedAmount = loanTransactionRepository.getAmortizedAmount(loan);
+ BigDecimal totalUnrecognizedAmount = totalAmortizationAmount.subtract(amortizedAmount);
+ if (MathUtil.isZero(totalUnrecognizedAmount)) {
return Optional.empty();
}
- final LoanTransaction amortizationTransaction = LoanTransaction.capitalizedIncomeAmortization(loan, loan.getOffice(),
- transactionDate, totalUnrecognizedAmount, externalId);
+ final LoanTransaction amortizationTransaction = MathUtil.isGreaterThanZero(totalUnrecognizedAmount)
+ ? LoanTransaction.capitalizedIncomeAmortization(loan, loan.getOffice(), transactionDate, totalUnrecognizedAmount,
+ externalId)
+ : LoanTransaction.capitalizedIncomeAmortizationAdjustment(loan,
+ Money.of(loan.getCurrency(), MathUtil.negate(totalUnrecognizedAmount)), transactionDate, externalId);
+ if (isChargeOff) {
+ amortizationTransaction.getLoanTransactionRelations().add(LoanTransactionRelation.linkToTransaction(amortizationTransaction,
+ chargeOffTransaction, LoanTransactionRelationTypeEnum.RELATED));
+ }
loan.addLoanTransaction(amortizationTransaction);
loanTransactionRepository.saveAndFlush(amortizationTransaction);
@@ -119,7 +154,10 @@ public class LoanCapitalizedIncomeAmortizationProcessingServiceImpl implements L
final List<Long> existingReversedTransactionIds = loanTransactionRepository.findReversedTransactionIdsByLoan(loan);
loan.getLoanTransactions().stream().filter(LoanTransaction::isCapitalizedIncomeAmortization)
- .filter(transaction -> transaction.getTransactionDate().equals(loanTransaction.getTransactionDate()))
+ .filter(transaction -> transaction.getTransactionDate().equals(loanTransaction.getTransactionDate())
+ && transaction.getLoanTransactionRelations().stream()
+ .anyMatch(rel -> LoanTransactionRelationTypeEnum.RELATED.equals(rel.getRelationType())
+ && rel.getToTransaction().equals(loanTransaction)))
.forEach(transaction -> {
transaction.reverse();
final LoanAdjustTransactionBusinessEvent.Data data = new LoanAdjustTransactionBusinessEvent.Data(transaction);
@@ -135,6 +173,57 @@ public class LoanCapitalizedIncomeAmortizationProcessingServiceImpl implements L
journalEntryPoster.postJournalEntries(loan, existingTransactionIds, existingReversedTransactionIds);
}
+ @Override
+ @Transactional
+ public void processCapitalizedIncomeAmortizationTillDate(@NonNull Loan loan, @NonNull LocalDate tillDate) {
+ final List<Long> existingTransactionIds = loanTransactionRepository.findTransactionIdsByLoan(loan);
+ final List<Long> existingReversedTransactionIds = loanTransactionRepository.findReversedTransactionIdsByLoan(loan);
+
+ List<LoanCapitalizedIncomeBalance> balances = loanCapitalizedIncomeBalanceRepository.findAllByLoanId(loan.getId());
+
+ LocalDate maturityDate = loan.getMaturityDate() != null ? loan.getMaturityDate()
+ : getFinalCapitalizedIncomeAmortizationTransactionDate(loan);
+ LocalDate tillDatePlusOne = tillDate.plusDays(1);
+ if (tillDatePlusOne.isAfter(maturityDate)) {
+ tillDatePlusOne = maturityDate;
+ }
+
+ Money totalAmortization = Money.zero(loan.getCurrency());
+ for (LoanCapitalizedIncomeBalance balance : balances) {
+ List<LoanTransaction> adjustments = loanTransactionRepository.findAdjustmentsForCapitalizedIncome(balance.getLoanTransaction());
+ Money amortizationTillDate = CapitalizedIncomeAmortizationUtil.calculateTotalAmortizationTillDate(balance, adjustments,
+ maturityDate, loan.getLoanProductRelatedDetail().getCapitalizedIncomeStrategy(), tillDatePlusOne, loan.getCurrency());
+ totalAmortization = totalAmortization.add(amortizationTillDate);
+
+ balance.setUnrecognizedAmount(balance.getAmount().subtract(MathUtil.nullToZero(balance.getAmountAdjustment()))
+ .subtract(amortizationTillDate.getAmount()));
+ }
+
+ loanCapitalizedIncomeBalanceRepository.saveAll(balances);
+
+ BigDecimal totalAmortized = loanTransactionRepository.getAmortizedAmount(loan);
+ BigDecimal totalAmortizationAmount = totalAmortization.getAmount().subtract(totalAmortized);
+
+ if (!MathUtil.isZero(totalAmortizationAmount)) {
+ LoanTransaction transaction = MathUtil.isGreaterThanZero(totalAmortizationAmount)
+ ? LoanTransaction.capitalizedIncomeAmortization(loan, loan.getOffice(), tillDate, totalAmortizationAmount,
+ externalIdFactory.create())
+ : LoanTransaction.capitalizedIncomeAmortizationAdjustment(loan,
+ Money.of(loan.getCurrency(), MathUtil.negate(totalAmortizationAmount)), tillDate, externalIdFactory.create());
+ loan.addLoanTransaction(transaction);
+
+ transaction = loanTransactionRepository.save(transaction);
+ loanTransactionRepository.flush();
+
+ journalEntryPoster.postJournalEntries(loan, existingTransactionIds, existingReversedTransactionIds);
+
+ BusinessEvent<?> event = MathUtil.isGreaterThanZero(totalAmortizationAmount)
+ ? new LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent(transaction)
+ : new LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent(transaction);
+ businessEventNotifierService.notifyPostBusinessEvent(event);
+ }
+ }
+
private LocalDate getFinalCapitalizedIncomeAmortizationTransactionDate(final Loan loan) {
return switch (loan.getStatus()) {
case CLOSED_OBLIGATIONS_MET -> loan.getClosedOnDate();
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentServiceImpl.java
index 5f72ea27fa..1c7ff1b59e 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentServiceImpl.java
@@ -37,7 +37,6 @@ import org.apache.fineract.infrastructure.core.service.ExternalIdFactory;
import org.apache.fineract.infrastructure.core.service.MathUtil;
import org.apache.fineract.infrastructure.event.business.domain.loan.LoanAdjustTransactionBusinessEvent;
import org.apache.fineract.infrastructure.event.business.domain.loan.LoanBalanceChangedBusinessEvent;
-import org.apache.fineract.infrastructure.event.business.domain.loan.transaction.LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent;
import org.apache.fineract.infrastructure.event.business.service.BusinessEventNotifierService;
import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
import org.apache.fineract.organisation.monetary.domain.Money;
@@ -156,9 +155,6 @@ public class LoanAdjustmentServiceImpl implements LoanAdjustmentService {
throw new InvalidLoanTransactionTypeException("transaction", "capitalizedIncome.cannot.be.reversed.when.adjusted",
"Capitalized income transaction cannot be reversed when non-reversed adjustment exists for it.");
}
- BigDecimal recognizedAmount = capitalizedIncomeBalance.getAmount().subtract(capitalizedIncomeBalance.getUnrecognizedAmount());
- capitalizedIncomeAmortizationAdjustmentTransaction = LoanTransaction.capitalizedIncomeAmortizationAdjustment(loan,
- Money.of(loan.getCurrency(), recognizedAmount), DateUtils.getBusinessLocalDate(), externalIdFactory.create());
loanCapitalizedIncomeBalanceRepository.delete(capitalizedIncomeBalance);
}
if (transactionToAdjust.isCapitalizedIncomeAdjustment()) {
@@ -213,15 +209,6 @@ public class LoanAdjustmentServiceImpl implements LoanAdjustmentService {
this.loanTransactionRepository.saveAndFlush(newTransactionDetail);
}
- if (capitalizedIncomeAmortizationAdjustmentTransaction != null && capitalizedIncomeAmortizationAdjustmentTransaction.isNotZero()) {
- LoanTransaction savedCapitalizedIncomeAmortizationAdjustmentTransaction = loanTransactionRepository
- .saveAndFlush(capitalizedIncomeAmortizationAdjustmentTransaction);
- loan.addLoanTransaction(savedCapitalizedIncomeAmortizationAdjustmentTransaction);
- businessEventNotifierService
- .notifyPostBusinessEvent(new LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent(
- capitalizedIncomeAmortizationAdjustmentTransaction));
- }
-
loan = saveAndFlushLoanWithDataIntegrityViolationChecks(loan);
if (StringUtils.isNotBlank(noteText)) {
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtil.java
index aa35cd7a7e..8876fad0ea 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtil.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtil.java
@@ -19,21 +19,66 @@
package org.apache.fineract.portfolio.loanaccount.util;
import java.math.BigDecimal;
-import org.apache.fineract.organisation.monetary.data.CurrencyData;
+import java.time.LocalDate;
+import java.util.Comparator;
+import java.util.List;
+import org.apache.fineract.infrastructure.core.service.DateUtils;
+import org.apache.fineract.infrastructure.core.service.MathUtil;
+import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
import org.apache.fineract.organisation.monetary.domain.Money;
import org.apache.fineract.organisation.monetary.domain.MoneyHelper;
+import org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeBalance;
import org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeStrategy;
+import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction;
public final class CapitalizedIncomeAmortizationUtil {
private CapitalizedIncomeAmortizationUtil() {}
- public static Money calculateDailyAmortization(final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy,
- final long daysTillMaturity, final BigDecimal remainingAmount, final CurrencyData currencyData) {
- BigDecimal amortization = switch (capitalizedIncomeStrategy) {
- case EQUAL_AMORTIZATION -> remainingAmount.divide(BigDecimal.valueOf(daysTillMaturity), MoneyHelper.getMathContext());
+ public static Money calculateTotalAmortizationTillDate(final LoanCapitalizedIncomeBalance capitalizedIncomeBalance,
+ final List<LoanTransaction> adjustmentTransactions, final LocalDate maturityDate,
+ final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LocalDate tillDate, final MonetaryCurrency currency) {
+ return switch (capitalizedIncomeStrategy) {
+ case EQUAL_AMORTIZATION -> calculateTotalAmortizationTillDateEqualAmortization(capitalizedIncomeBalance, adjustmentTransactions,
+ maturityDate, tillDate, currency);
};
+ }
+
+ private static Money calculateTotalAmortizationTillDateEqualAmortization(LoanCapitalizedIncomeBalance balance,
+ List<LoanTransaction> adjustmentTransactions, LocalDate maturityDate, LocalDate tillDate, MonetaryCurrency currency) {
+
+ BigDecimal unrecognizedAmount = balance.getAmount();
+ BigDecimal totalAmortizationAmount = BigDecimal.ZERO;
+ BigDecimal overAmortizationCorrection = BigDecimal.ZERO;
+
+ List<LoanTransaction> sortedAdjustmentTransactions = adjustmentTransactions.stream()
+ .sorted(Comparator.comparing(LoanTransaction::getDateOf)).toList();
+ LocalDate periodStart = balance.getDate();
+ for (LoanTransaction adjustmentTransaction : sortedAdjustmentTransactions) {
+ long daysUntilMaturity = DateUtils.getDifferenceInDays(periodStart, maturityDate);
+ long daysOfPeriod = DateUtils.getDifferenceInDays(periodStart, adjustmentTransaction.getDateOf());
+ BigDecimal periodAmortization = daysUntilMaturity == 0L ? BigDecimal.ZERO
+ : unrecognizedAmount.multiply(BigDecimal.valueOf(daysOfPeriod)).divide(BigDecimal.valueOf(daysUntilMaturity),
+ MoneyHelper.getMathContext());
+
+ totalAmortizationAmount = totalAmortizationAmount.add(periodAmortization);
+ unrecognizedAmount = unrecognizedAmount.subtract(periodAmortization).subtract(adjustmentTransaction.getAmount());
+ if (MathUtil.isLessThanZero(unrecognizedAmount)) {
+ overAmortizationCorrection = overAmortizationCorrection.add(unrecognizedAmount);
+ unrecognizedAmount = BigDecimal.ZERO;
+ }
+ periodStart = adjustmentTransaction.getDateOf();
+ }
+ if (periodStart.isBefore(tillDate)) {
+ long daysUntilMaturity = DateUtils.getDifferenceInDays(periodStart, maturityDate);
+ long daysOfPeriod = DateUtils.getDifferenceInDays(periodStart, tillDate);
+ BigDecimal periodAmortization = unrecognizedAmount.multiply(BigDecimal.valueOf(daysOfPeriod))
+ .divide(BigDecimal.valueOf(daysUntilMaturity), MoneyHelper.getMathContext());
+ totalAmortizationAmount = totalAmortizationAmount.add(periodAmortization);
+ } else if (balance.getDate().equals(maturityDate)) {
+ totalAmortizationAmount = totalAmortizationAmount.add(unrecognizedAmount);
+ }
- return Money.of(currencyData, amortization);
+ return Money.of(currency, totalAmortizationAmount.add(overAmortizationCorrection));
}
}
diff --git a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtilTest.java b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtilTest.java
deleted file mode 100644
index 6d3c6d770f..0000000000
--- a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtilTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.fineract.portfolio.loanaccount.util;
-
-import java.math.BigDecimal;
-import java.math.MathContext;
-import java.math.RoundingMode;
-import org.apache.fineract.organisation.monetary.data.CurrencyData;
-import org.apache.fineract.organisation.monetary.domain.Money;
-import org.apache.fineract.organisation.monetary.domain.MoneyHelper;
-import org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeStrategy;
-import org.junit.jupiter.api.AfterAll;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.Test;
-import org.mockito.MockedStatic;
-import org.mockito.Mockito;
-
-class CapitalizedIncomeAmortizationUtilTest {
-
- private static final MockedStatic<MoneyHelper> MONEY_HELPER = Mockito.mockStatic(MoneyHelper.class);
-
- @BeforeAll
- public static void init() {
- MONEY_HELPER.when(MoneyHelper::getMathContext).thenReturn(new MathContext(19, RoundingMode.HALF_EVEN));
- MONEY_HELPER.when(MoneyHelper::getRoundingMode).thenReturn(RoundingMode.HALF_EVEN);
- }
-
- @AfterAll
- public static void deregister() {
- MONEY_HELPER.close();
- }
-
- @Test
- void calculateDailyAmortizationEqualAmortization() {
- CurrencyData currency = new CurrencyData("USD", 2, null);
-
- BigDecimal remaining = BigDecimal.valueOf(50.0);
- Money dailyAmortization = CapitalizedIncomeAmortizationUtil
- .calculateDailyAmortization(LoanCapitalizedIncomeStrategy.EQUAL_AMORTIZATION, 91L, remaining, currency);
-
- Assertions.assertEquals(BigDecimal.valueOf(0.55), dailyAmortization.getAmount());
-
- BigDecimal remaining2 = BigDecimal.valueOf(8.2);
- Money dailyAmortization2 = CapitalizedIncomeAmortizationUtil
- .calculateDailyAmortization(LoanCapitalizedIncomeStrategy.EQUAL_AMORTIZATION, 15L, remaining2, currency);
-
- Assertions.assertEquals(BigDecimal.valueOf(0.55), dailyAmortization2.getAmount());
- }
-}
diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanCapitalizedIncomeTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanCapitalizedIncomeTest.java
index 88e6750325..a71edc5801 100644
--- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanCapitalizedIncomeTest.java
+++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanCapitalizedIncomeTest.java
@@ -232,6 +232,7 @@ public class LoanCapitalizedIncomeTest extends BaseLoanIntegrationTest {
public void testLoanCapitalizedIncomeAdjustmentWithAmortizationAccounting() {
final AtomicReference<Long> loanIdRef = new AtomicReference<>();
final AtomicReference<Long> capitalizedIncomeIdRef = new AtomicReference<>();
+ final AtomicReference<Long> capitalizedIncomeAdjustmentTransactionIdRef = new AtomicReference<>();
final PostClientsResponse client = clientHelper.createClient(ClientHelper.defaultClientCreationRequest());
@@ -290,6 +291,11 @@ public class LoanCapitalizedIncomeTest extends BaseLoanIntegrationTest {
Long capitalizedIncomeAdjustmentTransactionId = loanTransactionHelper
.capitalizedIncomeAdjustment(loanId, capitalizedIncomeIdRef.get(), "3 January 2024", 100.0).getResourceId();
+ capitalizedIncomeAdjustmentTransactionIdRef.set(capitalizedIncomeAdjustmentTransactionId);
+ });
+ runAt("4 January 2024", () -> {
+ Long loanId = loanIdRef.get();
+ executeInlineCOB(loanId);
verifyTransactions(loanId, //
transaction(100.0, "Disbursement", "01 January 2024"), //
@@ -297,7 +303,9 @@ public class LoanCapitalizedIncomeTest extends BaseLoanIntegrationTest {
transaction(1.10, "Capitalized Income Amortization", "01 January 2024"), //
transaction(0.04, "Accrual", "02 January 2024"), //
transaction(1.10, "Capitalized Income Amortization", "02 January 2024"), //
- transaction(100.0, "Capitalized Income Adjustment", "03 January 2024") //
+ transaction(100.0, "Capitalized Income Adjustment", "03 January 2024"), //
+ transaction(0.04, "Accrual", "03 January 2024"), //
+ transaction(2.20, "Capitalized Income Amortization Adjustment", "03 January 2024") //
);
verifyJournalEntries(loanId, //
@@ -313,8 +321,11 @@ public class LoanCapitalizedIncomeTest extends BaseLoanIntegrationTest {
journalEntry(1.10, feeIncomeAccount, "CREDIT"), //
journalEntry(99.92, loansReceivableAccount, "CREDIT"), //
journalEntry(0.08, interestReceivableAccount, "CREDIT"), //
+ journalEntry(100.0, deferredIncomeLiabilityAccount, "DEBIT"), //
+ journalEntry(0.04, interestReceivableAccount, "DEBIT"), //
+ journalEntry(0.04, interestIncomeAccount, "CREDIT"), //
journalEntry(2.20, feeIncomeAccount, "DEBIT"), //
- journalEntry(97.80, deferredIncomeLiabilityAccount, "DEBIT") //
+ journalEntry(2.20, deferredIncomeLiabilityAccount, "CREDIT") //
);
// Reverse-replay
@@ -328,19 +339,16 @@ public class LoanCapitalizedIncomeTest extends BaseLoanIntegrationTest {
verifyTRJournalEntries(replayedCapitalizedIncomeAdjustmentOpt.get().getId(), //
journalEntry(99.98, loansReceivableAccount, "CREDIT"), //
journalEntry(0.02, interestReceivableAccount, "CREDIT"), //
- journalEntry(2.20, feeIncomeAccount, "DEBIT"), //
- journalEntry(97.80, deferredIncomeLiabilityAccount, "DEBIT") //
+ journalEntry(100.0, deferredIncomeLiabilityAccount, "DEBIT") //
);
- verifyTRJournalEntries(capitalizedIncomeAdjustmentTransactionId, //
+ verifyTRJournalEntries(capitalizedIncomeAdjustmentTransactionIdRef.get(), //
journalEntry(99.92, loansReceivableAccount, "CREDIT"), //
journalEntry(0.08, interestReceivableAccount, "CREDIT"), //
- journalEntry(2.20, feeIncomeAccount, "DEBIT"), //
- journalEntry(97.80, deferredIncomeLiabilityAccount, "DEBIT"), //
+ journalEntry(100.0, deferredIncomeLiabilityAccount, "DEBIT"), //
journalEntry(99.92, loansReceivableAccount, "DEBIT"), //
journalEntry(0.08, interestReceivableAccount, "DEBIT"), //
- journalEntry(2.20, feeIncomeAccount, "CREDIT"), //
- journalEntry(97.80, deferredIncomeLiabilityAccount, "CREDIT") //
+ journalEntry(100.0, deferredIncomeLiabilityAccount, "CREDIT") //
);
});
}
@@ -486,12 +494,18 @@ public class LoanCapitalizedIncomeTest extends BaseLoanIntegrationTest {
loanTransactionHelper.reverseLoanTransaction(loanId, capitalizedIncomeTransactionIdRef.get(), "3 January 2024");
+ });
+ runAt("4 January 2024", () -> {
+ Long loanId = loanIdRef.get();
+ executeInlineCOB(loanId);
+
verifyTransactions(loanId, //
transaction(100.0, "Disbursement", "01 January 2024"), //
transaction(50.0, "Capitalized Income", "01 January 2024"), //
transaction(0.55, "Capitalized Income Amortization", "01 January 2024"), //
transaction(0.03, "Accrual", "02 January 2024"), //
transaction(0.55, "Capitalized Income Amortization", "02 January 2024"), //
+ transaction(0.01, "Accrual", "03 January 2024"), //
transaction(1.10, "Capitalized Income Amortization Adjustment", "03 January 2024") //
);
@@ -508,6 +522,8 @@ public class LoanCapitalizedIncomeTest extends BaseLoanIntegrationTest {
journalEntry(0.55, feeIncomeAccount, "CREDIT"), //
journalEntry(50, deferredIncomeLiabilityAccount, "DEBIT"), //
journalEntry(50, loansReceivableAccount, "CREDIT"), //
+ journalEntry(0.01, interestReceivableAccount, "DEBIT"), //
+ journalEntry(0.01, interestIncomeAccount, "CREDIT"), //
journalEntry(1.10, feeIncomeAccount, "DEBIT"), //
journalEntry(1.10, deferredIncomeLiabilityAccount, "CREDIT") //
);
(fineract) 02/02: FINERACT-2232: added e2e automation tests for capitalized income amortization calculation
Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
commit c490e167b8e6655c1c9c237a23e3c4de89d7b236
Author: MarianaDmytrivBinariks <md...@binariks.com>
AuthorDate: Thu Jun 12 14:56:07 2025 +0300
FINERACT-2232: added e2e automation tests for capitalized income amortization calculation
---
.../test/data/loanproduct/DefaultLoanProduct.java | 1 +
.../global/LoanProductGlobalInitializerStep.java | 49 ++
.../fineract/test/stepdef/loan/LoanStepDef.java | 24 +
.../fineract/test/support/TestContextKey.java | 1 +
.../features/LoanCapitalizedIncome.feature | 506 ++++++++++++++++++++-
5 files changed, 580 insertions(+), 1 deletion(-)
diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java
index cbb05880fb..eb68c37cad 100644
--- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java
+++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java
@@ -132,6 +132,7 @@ public enum DefaultLoanProduct implements LoanProduct {
LP2_ADV_PYMNT_360_30_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_ACCRUAL_ACTIVITY, //
LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_CONTRACT_TERMINATION, //
LP2_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME, //
+ LP2_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC, //
;
@Override
diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java
index 40ca25d7ec..db0e310942 100644
--- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java
+++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java
@@ -2779,6 +2779,55 @@ public class LoanProductGlobalInitializerStep implements FineractGlobalInitializ
TestContext.INSTANCE.set(
TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_DOWNPAYMENT_AUTO_ADVANCED_CUSTOM_PAYMENT_ALLOCATION,
responseLoanProductsRequestDownPaymentAutoAdvCustomPaymentAllocation);
+
+ // LP2 with progressive loan schedule + horizontal + interest EMI + 360/30
+ // + interest recalculation, preClosureInterestCalculationStrategy= till preclose,
+ // Frequency for recalculate Outstanding Principal: Daily, Frequency Interval for recalculation: 1
+ // multidisbursal
+ // capitalized income enabled
+ final String name110 = DefaultLoanProduct.LP2_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC
+ .getName();
+ final PostLoanProductsRequest loanProductsRequestLP2ProgressiveAdvPymnt36030InterestRecalcMultidisbursalCapitalizedIncomeAdjCustomAlloc = loanProductsRequestFactory
+ .defaultLoanProductsRequestLP2EmiCapitalizedIncome()//
+ .name(name110)//
+ .daysInYearType(DaysInYearType.DAYS360.value)//
+ .daysInMonthType(DaysInMonthType.DAYS30.value)//
+ .isInterestRecalculationEnabled(true)//
+ .preClosureInterestCalculationStrategy(1)//
+ .rescheduleStrategyMethod(4)//
+ .interestRecalculationCompoundingMethod(0)//
+ .recalculationRestFrequencyType(2)//
+ .recalculationRestFrequencyInterval(1)//
+ .paymentAllocation(List.of(//
+ createPaymentAllocation("DEFAULT", "NEXT_INSTALLMENT"), //
+ createPaymentAllocation("GOODWILL_CREDIT", "LAST_INSTALLMENT"), //
+ createPaymentAllocation("MERCHANT_ISSUED_REFUND", "REAMORTIZATION"), //
+ createPaymentAllocation("CAPITALIZED_INCOME_ADJUSTMENT", "NEXT_INSTALLMENT",
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PRINCIPAL, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_INTEREST, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_FEE, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PENALTY, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PRINCIPAL, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_INTEREST, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_FEE, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PENALTY, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PRINCIPAL, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_INTEREST, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_FEE, //
+ LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PENALTY), //
+ createPaymentAllocation("PAYOUT_REFUND", "NEXT_INSTALLMENT"))) //
+ .multiDisburseLoan(true)//
+ .disallowExpectedDisbursements(true)//
+ .maxTrancheCount(10)//
+ .outstandingLoanBalance(10000.0);//
+ final Response<PostLoanProductsResponse> responseLoanProductsRequestLP2ProgressiveAdvPymnt36030InterestRecalcMultidisbursalCapitalizedIncomeAdjCustomAlloc = loanProductsApi
+ .createLoanProduct(
+ loanProductsRequestLP2ProgressiveAdvPymnt36030InterestRecalcMultidisbursalCapitalizedIncomeAdjCustomAlloc)
+ .execute();
+ TestContext.INSTANCE.set(
+ TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC,
+ responseLoanProductsRequestLP2ProgressiveAdvPymnt36030InterestRecalcMultidisbursalCapitalizedIncomeAdjCustomAlloc);
+
}
public static AdvancedPaymentData createPaymentAllocation(String transactionType, String futureInstallmentAllocationRule,
diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java
index 2151ba49e0..ce94999490 100644
--- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java
+++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java
@@ -4267,6 +4267,30 @@ public class LoanStepDef extends AbstractStepDef {
log.info("Capitalized Income Adjustment created: Transaction ID {}", adjustmentResponse.body().getResourceId());
}
+ @And("Admin adds capitalized income adjustment with {string} payment type to the loan on {string} with {string} EUR trn amount with {string} date for capitalized income")
+ public void adminAddsCapitalizedIncomeAdjustmentToTheLoanWithCapitalizedIncomeDate(final String transactionPaymentType,
+ final String transactionDate, final String amount, final String capitalizedIncomeTrnsDate) throws IOException {
+ final Response<PostLoansResponse> loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);
+ final long loanId = loanResponse.body().getLoanId();
+
+ final Response<GetLoansLoanIdResponse> loanDetailsResponse = loansApi.retrieveLoan(loanId, false, "transactions", "", "").execute();
+ ErrorHelper.checkSuccessfulApiCall(loanDetailsResponse);
+
+ final List<GetLoansLoanIdTransactions> transactions = loanDetailsResponse.body().getTransactions();
+ final GetLoansLoanIdTransactions capitalizedIncomeTransaction = transactions.stream()
+ .filter(t -> "Capitalized Income".equals(t.getType().getValue()))
+ .filter(t -> FORMATTER.format(t.getDate()).equals(capitalizedIncomeTrnsDate)).findFirst()
+ .orElseThrow(() -> new IllegalStateException("No Capitalized Income transaction found for loan " + loanId));
+
+ final Response<PostLoansLoanIdTransactionsResponse> adjustmentResponse = adjustCapitalizedIncome(transactionPaymentType,
+ transactionDate, amount, capitalizedIncomeTransaction.getId());
+
+ testContext().set(TestContextKey.LOAN_CAPITALIZED_INCOME_ADJUSTMENT_RESPONSE, adjustmentResponse);
+ ErrorHelper.checkSuccessfulApiCall(adjustmentResponse);
+
+ log.info("Capitalized Income Adjustment created: Transaction ID {}", adjustmentResponse.body().getResourceId());
+ }
+
@And("Admin adds invalid capitalized income adjustment with {string} payment type to the loan on {string} with {string} EUR transaction amount")
public void adminAddsArbitraryCapitalizedIncomeAdjustmentToTheLoan(final String transactionPaymentType, final String transactionDate,
final String amount) throws IOException {
diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java
index 84a31ccfea..f3ae668d79 100644
--- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java
+++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java
@@ -74,6 +74,7 @@ public abstract class TestContextKey {
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_INTEREST_DECLINING_BALANCE_DAILY_RECALCULATION_COMPOUNDING_NONE_ACCRUAL_ACTIVITY = "loanProductCreateResponseLP1InterestDecliningBalanceRecalculationCompoundingNoneAccrualActivity";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION = "loanProductCreateResponseLP2DownPaymentAutoAdvancedPaymentAllocation";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_DOWNPAYMENT_AUTO_ADVANCED_CUSTOM_PAYMENT_ALLOCATION = "loanProductCreateResponseLP2DownPaymentAutoAdvancedCustomPaymentAllocation";
+ public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC = "loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationDailyMultidisbursalCapitalizedIncomeAdjCustomAlloc";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_DOWNPAYMENT_AUTO_ADVANCED_REPAYMENT_ALLOCATION_PAYMENT_START_SUBMITTED = "loanProductCreateResponseLP2DownPaymentAutoAdvancedPaymentAllocationPaymentStartSubmitted";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_DOWNPAYMENT_ADVANCED_PAYMENT_ALLOCATION = "loanProductCreateResponseLP2DownPaymentAdvancedPaymentAllocation";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_DOWNPAYMENT = "loanProductCreateResponseLP2DownPayment";
diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanCapitalizedIncome.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanCapitalizedIncome.feature
index e86ec28ac5..e983cf545c 100644
--- a/fineract-e2e-tests-runner/src/test/resources/features/LoanCapitalizedIncome.feature
+++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanCapitalizedIncome.feature
@@ -3628,6 +3628,75 @@ Feature: Capitalized Income
| ASSET | 112603 | Interest/Fee Receivable | 0.25 | |
| LIABILITY | 145024 | Deferred Capitalized Income | | 55.0 |
+ @TestRailId:C3756
+ Scenario: Verify Capitalised Income Adjustment reversed on same biz date when added - UC4
+ When Admin sets the business date to "01 January 2024"
+ And Admin creates a client with random data
+ When Admin creates a fully customized loan with the following data:
+ | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
+ | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024"
+ And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 66.86 | 33.14 | 0.58 | 0.0 | 0.0 | 33.72 | 0.0 | 0.0 | 0.0 | 33.72 |
+ | 2 | 29 | 01 March 2024 | | 33.53 | 33.33 | 0.39 | 0.0 | 0.0 | 33.72 | 0.0 | 0.0 | 0.0 | 33.72 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 33.53 | 0.2 | 0.0 | 0.0 | 33.73 | 0.0 | 0.0 | 0.0 | 33.73 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 100.0 | 1.17 | 0.00 | 0.00 | 101.17 | 0.0 | 0.0 | 0.0 | 101.17 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 January 2024" with "100" EUR transaction amount
+ When Admin sets the business date to "02 January 2024"
+ And Admin runs inline COB job for Loan
+ When Admin sets the business date to "03 January 2024"
+ And Admin runs inline COB job for Loan
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 200.0 | false | false |
+ | 01 January 2024 | Capitalized Income Amortization | 1.1 | 0.0 | 1.1 | 0.0 | 0.0 | 0.0 | false | false |
+ | 02 January 2024 | Accrual | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | false |
+ | 02 January 2024 | Capitalized Income Amortization | 1.1 | 0.0 | 1.1 | 0.0 | 0.0 | 0.0 | false | false |
+ And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "03 January 2024" with "100" EUR trn amount with "01 January 2024" date for capitalized income
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 200.0 | false | false |
+ | 01 January 2024 | Capitalized Income Amortization | 1.1 | 0.0 | 1.1 | 0.0 | 0.0 | 0.0 | false | false |
+ | 02 January 2024 | Accrual | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | false |
+ | 02 January 2024 | Capitalized Income Amortization | 1.1 | 0.0 | 1.1 | 0.0 | 0.0 | 0.0 | false | false |
+ | 03 January 2024 | Capitalized Income Adjustment | 100.0 | 99.92 | 0.08 | 0.0 | 0.0 | 100.08 | false | false |
+# -- undo Capitalized Income Adjustment transaction at the same biz date when it was added -- #
+ When Customer undo "1"th "Capitalized Income Adjustment" transaction made on "03 January 2024"
+ When Admin sets the business date to "05 January 2024"
+ And Admin runs inline COB job for Loan
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 133.72 | 66.28 | 1.17 | 0.0 | 0.0 | 67.45 | 0.0 | 0.0 | 0.0 | 67.45 |
+ | 2 | 29 | 01 March 2024 | | 67.05 | 66.67 | 0.78 | 0.0 | 0.0 | 67.45 | 0.0 | 0.0 | 0.0 | 67.45 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 67.05 | 0.39 | 0.0 | 0.0 | 67.44 | 0.0 | 0.0 | 0.0 | 67.44 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 200.0 | 2.34 | 0.00 | 0.00 | 202.34 | 0.0 | 0.0 | 0.0 | 202.34 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 100.0 | 100.0 | 0.0 | 0.0 | 0.0 | 200.0 | false | false |
+ | 01 January 2024 | Capitalized Income Amortization | 1.1 | 0.0 | 1.1 | 0.0 | 0.0 | 0.0 | false | false |
+ | 02 January 2024 | Accrual | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | false |
+ | 02 January 2024 | Capitalized Income Amortization | 1.1 | 0.0 | 1.1 | 0.0 | 0.0 | 0.0 | false | false |
+ | 03 January 2024 | Capitalized Income Adjustment | 100.0 | 99.92 | 0.08 | 0.0 | 0.0 | 100.08 | true | false |
+ | 03 January 2024 | Accrual | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | false |
+ | 03 January 2024 | Capitalized Income Amortization | 1.1 | 0.0 | 1.1 | 0.0 | 0.0 | 0.0 | false | false |
+ | 04 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
+ | 04 January 2024 | Capitalized Income Amortization | 1.1 | 0.0 | 1.1 | 0.0 | 0.0 | 0.0 | false | false |
+
@TestRailId:C3708
Scenario: Verify capitalized income reversed after repayment - UC1
When Admin sets the business date to "1 January 2024"
@@ -4148,4 +4217,439 @@ Feature: Capitalized Income
| 08 January 2024 | Capitalized Income Amortization Adjustment | 300.0 | 0.0 | 300.0 | 0.0 | 0.0 | 0.0 | false | false |
| 08 January 2024 | Accrual Adjustment | 0.17 | 0.0 | 0.17 | 0.0 | 0.0 | 0.0 | false | false |
And Loan has 0.0 outstanding amount
- And Loan has 398.53 overpaid amount
\ No newline at end of file
+ And Loan has 398.53 overpaid amount
+
+ @TestRailId:C3747
+ Scenario: Verify Capitalized Income Amortization validation while run COB a month after Capitalized Income trn - UC1
+ When Admin sets the business date to "01 January 2024"
+ And Admin creates a client with random data
+ When Admin creates a fully customized loan with the following data:
+ | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
+ | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024"
+ And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 January 2024" with "50" EUR transaction amount
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 100.29 | 49.71 | 0.87 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 2 | 29 | 01 March 2024 | | 50.3 | 49.99 | 0.59 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 50.3 | 0.29 | 0.0 | 0.0 | 50.59 | 0.0 | 0.0 | 0.0 | 50.59 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 150.0 | 1.75 | 0.00 | 0.00 | 151.75 | 0.0 | 0.0 | 0.0 | 151.75 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ When Admin sets the business date to "01 February 2024"
+ And Admin runs inline COB job for Loan
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 31 January 2024 | Accrual | 0.85 | 0.0 | 0.85 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 17.03 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | false | false |
+
+ @TestRailId:C3748
+ Scenario: Verify Capitalized Income Amortization while run COB a month after Capitalized Income with Adjustment trns - UC2
+ When Admin sets the business date to "01 January 2024"
+ And Admin creates a client with random data
+ When Admin creates a fully customized loan with the following data:
+ | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
+ | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024"
+ And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 January 2024" with "50" EUR transaction amount
+ And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 January 2024" with "40" EUR transaction amount
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 100.06 | 49.94 | 0.64 | 0.0 | 0.0 | 50.58 | 40.0 | 40.0 | 0.0 | 10.58 |
+ | 2 | 29 | 01 March 2024 | | 50.06 | 50.0 | 0.58 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 50.06 | 0.29 | 0.0 | 0.0 | 50.35 | 0.0 | 0.0 | 0.0 | 50.35 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 150.0 | 1.51 | 0.00 | 0.00 | 151.51 | 40.0 | 40.0 | 0.0 | 111.51 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 01 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ When Admin sets the business date to "01 February 2024"
+ And Admin runs inline COB job for Loan
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 01 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ | 31 January 2024 | Accrual | 0.62 | 0.0 | 0.62 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 3.41 | 0.0 | 3.41 | 0.0 | 0.0 | 0.0 | false | false |
+
+ @TestRailId:C3749
+ Scenario: Verify backdated Capitalized Income Amortization while add Capitalised Income trn with a month earlier date - UC3
+ When Admin sets the business date to "01 January 2024"
+ And Admin creates a client with random data
+ When Admin creates a fully customized loan with the following data:
+ | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
+ | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024"
+ And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 66.86 | 33.14 | 0.58 | 0.0 | 0.0 | 33.72 | 0.0 | 0.0 | 0.0 | 33.72 |
+ | 2 | 29 | 01 March 2024 | | 33.53 | 33.33 | 0.39 | 0.0 | 0.0 | 33.72 | 0.0 | 0.0 | 0.0 | 33.72 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 33.53 | 0.2 | 0.0 | 0.0 | 33.73 | 0.0 | 0.0 | 0.0 | 33.73 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 100.0 | 1.17 | 0.00 | 0.00 | 101.17 | 0.0 | 0.0 | 0.0 | 101.17 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ When Admin sets the business date to "01 February 2024"
+ And Admin runs inline COB job for Loan
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 January 2024" with "50" EUR transaction amount
+ When Admin sets the business date to "02 February 2024"
+ And Admin runs inline COB job for Loan
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 100.29 | 49.71 | 0.87 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 2 | 29 | 01 March 2024 | | 50.31 | 49.98 | 0.6 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 50.31 | 0.29 | 0.0 | 0.0 | 50.6 | 0.0 | 0.0 | 0.0 | 50.6 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 150.0 | 1.76 | 0.00 | 0.00 | 151.76 | 0.0 | 0.0 | 0.0 | 151.76 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.58 | 0.0 | 17.58 | 0.0 | 0.0 | 0.0 | false | false |
+
+ @TestRailId:C3750
+ Scenario: Verify backdated Capitalized Income Amortization while add Capitalised Income and Adjustment trns with earlier date - UC4
+ When Admin sets the business date to "01 January 2024"
+ And Admin creates a client with random data
+ When Admin creates a fully customized loan with the following data:
+ | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
+ | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024"
+ And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 66.86 | 33.14 | 0.58 | 0.0 | 0.0 | 33.72 | 0.0 | 0.0 | 0.0 | 33.72 |
+ | 2 | 29 | 01 March 2024 | | 33.53 | 33.33 | 0.39 | 0.0 | 0.0 | 33.72 | 0.0 | 0.0 | 0.0 | 33.72 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 33.53 | 0.2 | 0.0 | 0.0 | 33.73 | 0.0 | 0.0 | 0.0 | 33.73 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 100.0 | 1.17 | 0.00 | 0.00 | 101.17 | 0.0 | 0.0 | 0.0 | 101.17 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ When Admin sets the business date to "01 February 2024"
+ And Admin runs inline COB job for Loan
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "02 January 2024" with "50" EUR transaction amount
+ And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "02 January 2024" with "40" EUR transaction amount
+ When Admin sets the business date to "02 February 2024"
+ And Admin runs inline COB job for Loan
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 02 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 100.06 | 49.94 | 0.64 | 0.0 | 0.0 | 50.58 | 40.0 | 40.0 | 0.0 | 10.58 |
+ | 2 | 29 | 01 March 2024 | | 50.07 | 49.99 | 0.59 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 50.07 | 0.29 | 0.0 | 0.0 | 50.36 | 0.0 | 0.0 | 0.0 | 50.36 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 150.0 | 1.52 | 0.00 | 0.00 | 151.52 | 40.0 | 40.0 | 0.0 | 111.52 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 02 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 02 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Accrual | 0.08 | 0.0 | 0.08 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Capitalized Income Amortization | 3.44 | 0.0 | 3.44 | 0.0 | 0.0 | 0.0 | false | false |
+
+ @TestRailId:C3751
+ Scenario: Verify Capitalized Income Amortization while add additional Capitalized Income trn with earlier date - UC5
+ When Admin sets the business date to "01 January 2024"
+ And Admin creates a client with random data
+ When Admin creates a fully customized loan with the following data:
+ | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
+ | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024"
+ And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 January 2024" with "50" EUR transaction amount
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 100.29 | 49.71 | 0.87 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 2 | 29 | 01 March 2024 | | 50.3 | 49.99 | 0.59 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 50.3 | 0.29 | 0.0 | 0.0 | 50.59 | 0.0 | 0.0 | 0.0 | 50.59 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 150.0 | 1.75 | 0.00 | 0.00 | 151.75 | 0.0 | 0.0 | 0.0 | 151.75 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ When Admin sets the business date to "01 February 2024"
+ And Admin runs inline COB job for Loan
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 31 January 2024 | Accrual | 0.85 | 0.0 | 0.85 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 17.03 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | false | false |
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "02 January 2024" with "50" EUR transaction amount
+ When Admin sets the business date to "02 February 2024"
+ And Admin runs inline COB job for Loan
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 133.72 | 66.28 | 1.16 | 0.0 | 0.0 | 67.44 | 0.0 | 0.0 | 0.0 | 67.44 |
+ | 2 | 29 | 01 March 2024 | | 67.07 | 66.65 | 0.79 | 0.0 | 0.0 | 67.44 | 0.0 | 0.0 | 0.0 | 67.44 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 67.07 | 0.39 | 0.0 | 0.0 | 67.46 | 0.0 | 0.0 | 0.0 | 67.46 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 200.0 | 2.34 | 0.00 | 0.00 | 202.34 | 0.0 | 0.0 | 0.0 | 202.34 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 02 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 200.0 | false | false |
+ | 31 January 2024 | Accrual | 0.85 | 0.0 | 0.85 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 17.03 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.77 | 0.0 | 17.77 | 0.0 | 0.0 | 0.0 | false | false |
+
+ @TestRailId:C3752
+ Scenario: Verify Capitalized Income Amortization while add additional Capitalized Income trn with earlier date after Adjustment trn - UC6
+ When Admin sets the business date to "01 January 2024"
+ And Admin creates a client with random data
+ When Admin creates a fully customized loan with the following data:
+ | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
+ | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC | 01 January 2024 | 300 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "01 January 2024" with "300" amount and expected disbursement date on "01 January 2024"
+ And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 January 2024" with "50" EUR transaction amount
+ And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 January 2024" with "40" EUR transaction amount
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 100.06 | 49.94 | 0.64 | 0.0 | 0.0 | 50.58 | 40.0 | 40.0 | 0.0 | 10.58 |
+ | 2 | 29 | 01 March 2024 | | 50.06 | 50.0 | 0.58 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 50.06 | 0.29 | 0.0 | 0.0 | 50.35 | 0.0 | 0.0 | 0.0 | 50.35 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 150.0 | 1.51 | 0.00 | 0.00 | 151.51 | 40.0 | 40.0 | 0.0 | 111.51 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 01 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ When Admin sets the business date to "01 February 2024"
+ And Admin runs inline COB job for Loan
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 01 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ | 31 January 2024 | Accrual | 0.62 | 0.0 | 0.62 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 3.41 | 0.0 | 3.41 | 0.0 | 0.0 | 0.0 | false | false |
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "02 January 2024" with "50" EUR transaction amount
+ When Admin sets the business date to "02 February 2024"
+ And Admin runs inline COB job for Loan
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 02 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 133.48 | 66.52 | 0.92 | 0.0 | 0.0 | 67.44 | 40.0 | 40.0 | 0.0 | 27.44 |
+ | 2 | 29 | 01 March 2024 | | 66.82 | 66.66 | 0.78 | 0.0 | 0.0 | 67.44 | 0.0 | 0.0 | 0.0 | 67.44 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 66.82 | 0.39 | 0.0 | 0.0 | 67.21 | 0.0 | 0.0 | 0.0 | 67.21 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 200.0 | 2.09 | 0.00 | 0.00 | 202.09 | 40.0 | 40.0 | 0.0 | 162.09 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 01 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ | 02 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 160.0 | false | false |
+ | 31 January 2024 | Accrual | 0.62 | 0.0 | 0.62 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 3.41 | 0.0 | 3.41 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Accrual | 0.3 | 0.0 | 0.3 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.33 | 0.0 | 17.33 | 0.0 | 0.0 | 0.0 | false | false |
+
+ @TestRailId:C3753
+ Scenario: Verify Capitalized Income Amortization while add additional Capitalized Income with Adjustment trns with earlier date after Adjustment trn - UC7
+ When Admin sets the business date to "01 January 2024"
+ And Admin creates a client with random data
+ When Admin creates a fully customized loan with the following data:
+ | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
+ | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC | 01 January 2024 | 300 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "01 January 2024" with "300" amount and expected disbursement date on "01 January 2024"
+ And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 January 2024" with "50" EUR transaction amount
+ And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 January 2024" with "40" EUR transaction amount
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 100.06 | 49.94 | 0.64 | 0.0 | 0.0 | 50.58 | 40.0 | 40.0 | 0.0 | 10.58 |
+ | 2 | 29 | 01 March 2024 | | 50.06 | 50.0 | 0.58 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 50.06 | 0.29 | 0.0 | 0.0 | 50.35 | 0.0 | 0.0 | 0.0 | 50.35 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 150.0 | 1.51 | 0.00 | 0.00 | 151.51 | 40.0 | 40.0 | 0.0 | 111.51 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 01 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ When Admin sets the business date to "01 February 2024"
+ And Admin runs inline COB job for Loan
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 01 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ | 31 January 2024 | Accrual | 0.62 | 0.0 | 0.62 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 3.41 | 0.0 | 3.41 | 0.0 | 0.0 | 0.0 | false | false |
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "02 January 2024" with "70" EUR transaction amount
+ And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "02 January 2024" with "60" EUR trn amount with "02 January 2024" date for capitalized income
+ When Admin sets the business date to "02 February 2024"
+ And Admin runs inline COB job for Loan
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 02 January 2024 | | 70.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | 02 January 2024 | 145.83 | 74.17 | 0.02 | 0.0 | 0.0 | 74.19 | 74.19 | 74.19 | 0.0 | 0.0 |
+ | 2 | 29 | 01 March 2024 | | 73.02 | 72.81 | 1.38 | 0.0 | 0.0 | 74.19 | 25.81 | 25.81 | 0.0 | 48.38 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 73.02 | 0.43 | 0.0 | 0.0 | 73.45 | 0.0 | 0.0 | 0.0 | 73.45 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 220.0 | 1.83 | 0.00 | 0.00 | 221.83 | 100.0 | 100.0 | 0.0 | 121.83 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 01 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ | 02 January 2024 | Capitalized Income | 70.0 | 70.0 | 0.0 | 0.0 | 0.0 | 180.0 | false | false |
+ | 02 January 2024 | Capitalized Income Adjustment | 60.0 | 59.98 | 0.02 | 0.0 | 0.0 | 120.02 | false | false |
+ | 31 January 2024 | Accrual | 0.62 | 0.0 | 0.62 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 3.41 | 0.0 | 3.41 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Accrual | 0.08 | 0.0 | 0.08 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Capitalized Income Amortization | 3.55 | 0.0 | 3.55 | 0.0 | 0.0 | 0.0 | false | false |
+
+ @TestRailId:C3754
+ Scenario: Verify Capitalized Income Amortization while run COB a month after Capitalized Income with Adjustment trns for multidisbursl loan - UC8
+ When Admin sets the business date to "01 January 2024"
+ And Admin creates a client with random data
+ When Admin creates a fully customized loan with the following data:
+ | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
+ | LP2_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024"
+ And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 January 2024" with "50" EUR transaction amount
+ And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 January 2024" with "40" EUR transaction amount
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 100.06 | 49.94 | 0.64 | 0.0 | 0.0 | 50.58 | 40.0 | 40.0 | 0.0 | 10.58 |
+ | 2 | 29 | 01 March 2024 | | 50.06 | 50.0 | 0.58 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 50.06 | 0.29 | 0.0 | 0.0 | 50.35 | 0.0 | 0.0 | 0.0 | 50.35 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 150.0 | 1.51 | 0.00 | 0.00 | 151.51 | 40.0 | 40.0 | 0.0 | 111.51 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 01 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ When Admin sets the business date to "01 February 2024"
+ And Admin runs inline COB job for Loan
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 01 January 2024 | Capitalized Income Adjustment | 40.0 | 40.0 | 0.0 | 0.0 | 0.0 | 110.0 | false | false |
+ | 31 January 2024 | Accrual | 0.62 | 0.0 | 0.62 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 3.41 | 0.0 | 3.41 | 0.0 | 0.0 | 0.0 | false | false |
+
+ @TestRailId:C3755
+ Scenario: Verify Capitalized Income Amortization while add additional Capitalized Income trn with earlier date for multidisbursl loan - UC9
+ When Admin sets the business date to "01 January 2024"
+ And Admin creates a client with random data
+ When Admin creates a fully customized loan with the following data:
+ | LoanProduct | submitted on date | with Principal | ANNUAL interest rate % | interest type | interest calculation period | amortization type | loanTermFrequency | loanTermFrequencyType | repaymentEvery | repaymentFrequencyType | numberOfRepayments | graceOnPrincipalPayment | graceOnInterestPayment | interest free period | Payment strategy |
+ | LP2_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 3 | MONTHS | 1 | MONTHS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024"
+ And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 January 2024" with "50" EUR transaction amount
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 100.29 | 49.71 | 0.87 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 2 | 29 | 01 March 2024 | | 50.3 | 49.99 | 0.59 | 0.0 | 0.0 | 50.58 | 0.0 | 0.0 | 0.0 | 50.58 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 50.3 | 0.29 | 0.0 | 0.0 | 50.59 | 0.0 | 0.0 | 0.0 | 50.59 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 150.0 | 1.75 | 0.00 | 0.00 | 151.75 | 0.0 | 0.0 | 0.0 | 151.75 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ When Admin sets the business date to "01 February 2024"
+ And Admin runs inline COB job for Loan
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 31 January 2024 | Accrual | 0.85 | 0.0 | 0.85 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 17.03 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | false | false |
+ And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "02 January 2024" with "50" EUR transaction amount
+ When Admin sets the business date to "02 February 2024"
+ And Admin runs inline COB job for Loan
+ Then Loan Repayment schedule has 3 periods, with the following data for periods:
+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | | | 01 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | |
+ | 1 | 31 | 01 February 2024 | | 133.72 | 66.28 | 1.16 | 0.0 | 0.0 | 67.44 | 0.0 | 0.0 | 0.0 | 67.44 |
+ | 2 | 29 | 01 March 2024 | | 67.07 | 66.65 | 0.79 | 0.0 | 0.0 | 67.44 | 0.0 | 0.0 | 0.0 | 67.44 |
+ | 3 | 31 | 01 April 2024 | | 0.0 | 67.07 | 0.39 | 0.0 | 0.0 | 67.46 | 0.0 | 0.0 | 0.0 | 67.46 |
+ And Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
+ | 200.0 | 2.34 | 0.00 | 0.00 | 202.34 | 0.0 | 0.0 | 0.0 | 202.34 |
+ And Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
+ | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
+ | 01 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false |
+ | 02 January 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 200.0 | false | false |
+ | 31 January 2024 | Accrual | 0.85 | 0.0 | 0.85 | 0.0 | 0.0 | 0.0 | false | false |
+ | 31 January 2024 | Capitalized Income Amortization | 17.03 | 0.0 | 17.03 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Accrual | 0.31 | 0.0 | 0.31 | 0.0 | 0.0 | 0.0 | false | false |
+ | 01 February 2024 | Capitalized Income Amortization | 17.77 | 0.0 | 17.77 | 0.0 | 0.0 | 0.0 | false | false |