FINERACT-2232: Added e2e test covering capitalized income adjustment

This commit is contained in:
Rustam Zeinalov
2025-05-29 16:19:29 +02:00
committed by Adam Saghy
parent 82eafad8dd
commit 7051fe94aa
6 changed files with 1059 additions and 5 deletions
@@ -123,6 +123,7 @@ public enum DefaultLoanProduct implements LoanProduct {
LP2_ADV_PYMNT_INT_DAILY_EMI_ACTUAL_ACTUAL_NO_INTEREST_RECALC_INT_REFUND_FULL_ACC_MATUR_CHARGE_OFF, //
LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_REST_FREQUENCY_DATE_LAST_INSTALLMENT, //
LP2_PROGRESSIVE_ADVANCED_PAYMENT_ALLOCATION_CAPITALIZED_INCOME, //
LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC, //
LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME, //
LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_FEE, //
LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSAL_CAPITALIZED_INCOME, //
@@ -58,4 +58,8 @@ public class BusinessDateHelper {
public BusinessDateRequest defaultBusinessDateRequest() {
return new BusinessDateRequest().type(BUSINESS_DATE_REQUEST_TYPE).dateFormat(DATE_FORMAT).locale(DEFAULT_LOCALE);
}
public String getBusinessDate() throws IOException {
return businessDateManagementApi.getBusinessDate(DATE_FORMAT).toString();
}
}
@@ -2623,6 +2623,50 @@ public class LoanProductGlobalInitializerStep implements FineractGlobalInitializ
TestContext.INSTANCE.set(
TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_360_30_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_ACCRUAL_ACTIVITY,
responseLoanProductsRequestAdvInterestRecalculationZeroInterestChargeOffBehaviourAccrualActivity);
// LP2 with progressive loan schedule + horizontal + interest EMI + 360/30 + custom allocation capital
// adjustment
// + interest recalculation, preClosureInterestCalculationStrategy= till preclose,
// Frequency for recalculate Outstanding Principal: Daily, Frequency Interval for recalculation: 1
// capitalized income enabled + income type - fee
final String name106 = DefaultLoanProduct.LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC
.getName();
final PostLoanProductsRequest loanProductsRequestLP2ProgressiveAdvPayment36030InterestRecalcCapitalizedIncomeAdjCustomAlloc = loanProductsRequestFactory
.defaultLoanProductsRequestLP2EmiCapitalizedIncome()//
.name(name106)//
.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")));//
final Response<PostLoanProductsResponse> responseLoanProductsRequestLP2ProgressiveAdvPayment36030InterestRecalcCapitalizedIncomeAdjCustomAlloc = loanProductsApi
.createLoanProduct(loanProductsRequestLP2ProgressiveAdvPayment36030InterestRecalcCapitalizedIncomeAdjCustomAlloc).execute();
TestContext.INSTANCE.set(
TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC,
responseLoanProductsRequestLP2ProgressiveAdvPayment36030InterestRecalcCapitalizedIncomeAdjCustomAlloc);
}
public static AdvancedPaymentData createPaymentAllocation(String transactionType, String futureInstallmentAllocationRule,
@@ -121,11 +121,7 @@ import org.apache.fineract.test.data.loanproduct.LoanProductResolver;
import org.apache.fineract.test.data.paymenttype.DefaultPaymentType;
import org.apache.fineract.test.data.paymenttype.PaymentTypeResolver;
import org.apache.fineract.test.factory.LoanRequestFactory;
import org.apache.fineract.test.helper.CodeHelper;
import org.apache.fineract.test.helper.ErrorHelper;
import org.apache.fineract.test.helper.ErrorMessageHelper;
import org.apache.fineract.test.helper.ErrorResponse;
import org.apache.fineract.test.helper.Utils;
import org.apache.fineract.test.helper.*;
import org.apache.fineract.test.initializer.global.LoanProductGlobalInitializerStep;
import org.apache.fineract.test.messaging.EventAssertion;
import org.apache.fineract.test.messaging.config.EventProperties;
@@ -161,6 +157,10 @@ public class LoanStepDef extends AbstractStepDef {
private static final Gson GSON = new JSON().getGson();
private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern(DATE_FORMAT);
private static final DateTimeFormatter FORMATTER_EVENTS = DateTimeFormatter.ofPattern(DATE_FORMAT_EVENTS);
private static final String TRANSACTION_DATE_FORMAT = "dd MMMM yyyy";
@Autowired
private BusinessDateHelper businessDateHelper;
@Autowired
private LoansApi loansApi;
@@ -4112,6 +4112,26 @@ public class LoanStepDef extends AbstractStepDef {
ErrorHelper.checkSuccessfulApiCall(capitalizedIncomeResponse);
}
public Response<PostLoansLoanIdTransactionsResponse> adjustCapitalizedIncome(final String transactionPaymentType,
final String transactionDate, final String amount, final Long transactionId) throws IOException {
final Response<PostLoansResponse> loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);
final long loanId = loanResponse.body().getLoanId();
final DefaultPaymentType paymentType = DefaultPaymentType.valueOf(transactionPaymentType);
final Long paymentTypeValue = paymentTypeResolver.resolve(paymentType);
final PostLoansLoanIdTransactionsTransactionIdRequest capitalizedIncomeRequest = new PostLoansLoanIdTransactionsTransactionIdRequest()
.transactionDate(transactionDate).dateFormat("dd MMMM yyyy").locale("en").transactionAmount(Double.valueOf(amount))
.paymentTypeId(paymentTypeValue).externalId("EXT-CAP-INC-ADJ-" + UUID.randomUUID());
// Use adjustLoanTransaction with the transaction ID and command
final Response<PostLoansLoanIdTransactionsResponse> capitalizedIncomeResponse = loanTransactionsApi
.adjustLoanTransaction(loanId, transactionId, capitalizedIncomeRequest, "capitalizedIncomeAdjustment").execute();
return capitalizedIncomeResponse;
}
@Then("Capitalized income with payment type {string} on {string} is forbidden with amount {string} while exceed approved amount")
public void capitalizedIncomeForbiddenExceedApprovedAmount(final String transactionPaymentType, final String transactionDate,
final String amount) throws IOException {
@@ -4143,4 +4163,59 @@ public class LoanStepDef extends AbstractStepDef {
eventAssertion.assertEventRaised(LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent.class,
finalAmortizationTransactionId);
}
@And("Admin adds capitalized income adjustment with {string} payment type to the loan on {string} with {string} EUR transaction amount")
public void adminAddsCapitalizedIncomeAdjustmentToTheLoan(final String transactionPaymentType, final String transactionDate,
final String amount) throws IOException {
final Response<PostLoansResponse> loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);
final long loanId = loanResponse.body().getLoanId();
final DefaultPaymentType paymentType = DefaultPaymentType.valueOf(transactionPaymentType);
final Long paymentTypeValue = paymentTypeResolver.resolve(paymentType);
// Get current business date to ensure we're not creating backdated transactions
String currentBusinessDate = businessDateHelper.getBusinessDate();
log.info("Current business date: {}, Transaction date: {}", currentBusinessDate, transactionDate);
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())).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 {
final Response<PostLoansResponse> loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE);
final long loanId = loanResponse.body().getLoanId();
// Get current business date to ensure we're not creating backdated transactions
String currentBusinessDate = businessDateHelper.getBusinessDate();
log.info("Current business date: {}, Transaction date: {}", currentBusinessDate, transactionDate);
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())).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.checkFailedApiCall(adjustmentResponse,400);
}
}
@@ -147,6 +147,7 @@ public abstract class TestContextKey {
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE = "loanProductCreateResponseLP2AdvancedPaymentInterestRecalculationDailyEmi36030Multidisburse";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CASH_ACCOUNTING_DISBURSEMENT_CHARGES = "loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationDailyCashBasedDisbursementCharge";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_PROGRESSIVE_ADV_PYMNT_CAPITALIZED_INCOME = "loanProductCreateResponseLP2ProgressiveAdvancedPaymentCapitalizedIncome";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_ADJ_CUSTOM_ALLOC = "loanProductCreateResponseLP2AdvancedPaymentInterestDailyEmi36030InterestRecalculationDailyCapitalizedIncomeAdjCustomAlloc";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME = "loanProductCreateResponseLP2ProgressiveAdvPayment36030InterestRecalcCapitalizedIncome";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_CAPITALIZED_INCOME_FEE = "loanProductCreateResponseLP2ProgressiveAdvPayment36030InterestRecalcCapitalizedIncomeFee";
public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSAL_CAPITALIZED_INCOME = "loanProductCreateResponseLP2ProgressiveAdvPayment36030InterestRecalcMultidisbursalCapitalizedIncome";
@@ -217,4 +218,5 @@ public abstract class TestContextKey {
public static final String LOAN_CAPITALIZED_INCOME_RESPONSE = "loanCapitalizedIncomeResponse";
public static final String LOAN_DISBURSEMENT_DETAIL_RESPONSE = "loanDisbursementDetailResponse";
public static final String LOAN_CAPITALIZED_INCOME_AMORTIZATION_ID = "loanCapitalizedIncomeAmortizationId";
public static final String LOAN_CAPITALIZED_INCOME_ADJUSTMENT_RESPONSE = "loanCapitalizedIncomeAdjustmentResponse";
}
@@ -1909,3 +1909,931 @@ Feature: Capitalized Income
| 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 |
@TestRailId:C3665
Scenario: Verify Capitalized Income Adjustment with partial amortization and allocation strategy - Credit Adj < Bal - 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 | 150 | 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 "150" 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 status will be "ACTIVE"
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 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 |
# Journal entry checks for initial transactions
Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | 100.0 | |
| LIABILITY | 145023 | Suspense/Clearing account | | 100.0 |
Then Loan Transactions tab has a "CAPITALIZED_INCOME" transaction with date "01 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | 50.0 | |
| LIABILITY | 145024 | Deferred Capitalized Income | | 50.0 |
When Admin sets the business date to "01 February 2024"
When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 February 2024" with 50.58 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 |
| 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 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
# Journal entry check for repayment
Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 49.71 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.87 |
| LIABILITY | 145023 | Suspense/Clearing account | 50.58 | |
When Admin sets the business date to "02 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 |
| 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 | 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:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112603 | Interest/Fee Receivable | 0.87 | |
| INCOME | 404000 | Interest Income | | 0.87 |
# 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 | |
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:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 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 | 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
Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 March 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 49.99 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.59 |
| LIABILITY | 145023 | Suspense/Clearing account | 50.58 | |
And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 March 2024" with "10" EUR transaction amount
# 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 |
| ASSET | 112601 | Loans Receivable | | 10.0 |
| LIABILITY | 145024 | Deferred Capitalized Income | 10.0 | |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 01 January 2024 | Disbursement | 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 | 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 |
When Admin sets the business date to "01 April 2024"
And Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 April 2024" with 40.54 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 |
| 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 | 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 | 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 |
# 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 |
| ASSET | 112601 | Loans Receivable | | 40.3 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.24 |
| LIABILITY | 145023 | Suspense/Clearing account | 40.54 | |
# Journal entry check for final accrual
Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 April 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112603 | Interest/Fee Receivable | 0.83 | |
| INCOME | 404000 | Interest Income | | 0.83 |
# 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 | |
# 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 |
| ASSET | 112601 | Loans Receivable | | 10.0 |
| LIABILITY | 145024 | Deferred Capitalized Income | 10.0 | |
@TestRailId:C3707
Scenario: Verify Capitalized Income Adjustment with partial amortization and allocation strategy - Credit Adj > Bal - 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 | 150 | 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 "150" 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 status will be "ACTIVE"
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 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 |
# Journal entry checks for initial transactions
Then Loan Transactions tab has a "DISBURSEMENT" transaction with date "01 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | 100.0 | |
| LIABILITY | 145023 | Suspense/Clearing account | | 100.0 |
Then Loan Transactions tab has a "CAPITALIZED_INCOME" transaction with date "01 January 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | 50.0 | |
| LIABILITY | 145024 | Deferred Capitalized Income | | 50.0 |
When Admin sets the business date to "01 February 2024"
When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 February 2024" with 50.58 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 |
| 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 | Repayment | 50.58 | 49.71 | 0.87 | 0.0 | 0.0 | 100.29 | false |
# Journal entry check for February repayment
Then Loan Transactions tab has a "REPAYMENT" transaction with date "01 February 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 49.71 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.87 |
| LIABILITY | 145023 | Suspense/Clearing account | 50.58 | |
When Admin sets the business date to "02 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 |
| 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 | 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 |
# 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 |
| ASSET | 112603 | Interest/Fee Receivable | 0.87 | |
| INCOME | 404000 | Interest Income | | 0.87 |
# 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 | |
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:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 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 | 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 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:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 49.99 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.59 |
| LIABILITY | 145023 | Suspense/Clearing account | 50.58 | |
And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 March 2024" with "10" EUR transaction amount
# Journal entry checks for 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 |
| ASSET | 112601 | Loans Receivable | | 10.0 |
| LIABILITY | 145024 | Deferred Capitalized Income | 10.0 | |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 01 January 2024 | Disbursement | 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 | 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 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"
# Journal entry checks for Capitalized Income Adjustment
And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "15 March 2024" with "5" EUR transaction amount
Then Loan Transactions tab has a "CAPITALIZED_INCOME_ADJUSTMENT" transaction with date "15 March 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 5.0 |
| LIABILITY | 145024 | Deferred Capitalized Income | 5.0 | |
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 01 January 2024 | Disbursement | 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 | 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 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 |
When Admin sets the business date to "01 April 2024"
And Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 April 2024" with 35.52 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 |
| 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 | 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 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 |
# 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 |
| ASSET | 112601 | Loans Receivable | | 35.3 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.22 |
| LIABILITY | 145023 | Suspense/Clearing account | 35.52 | |
# Journal entry check for final April accrual
Then Loan Transactions tab has a "ACCRUAL" transaction with date "01 April 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112603 | Interest/Fee Receivable | 0.81 | |
| INCOME | 404000 | Interest Income | | 0.81 |
# 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 | |
# 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 |
| ASSET | 112601 | Loans Receivable | | 10.0 |
| LIABILITY | 145024 | Deferred Capitalized Income | 10.0 | |
Then Loan Transactions tab has a "CAPITALIZED_INCOME_ADJUSTMENT" transaction with date "15 March 2024" which has the following Journal entries:
| Type | Account code | Account name | Debit | Credit |
| ASSET | 112601 | Loans Receivable | | 5.0 |
| LIABILITY | 145024 | Deferred Capitalized Income | 5.0 | |
Then Loan status will be "CLOSED_OBLIGATIONS_MET"
@TestRailId:C3702
Scenario: Verify Capitalized Income adjustment reverse replay with backdated repayment transaction
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 | 150 | 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 "150" 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
When Admin sets the business date to "02 January 2024"
And Admin runs inline COB job for Loan
Then Loan status will be "ACTIVE"
When Admin sets the business date to "01 March 2024"
And Admin runs inline COB job for Loan
And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 March 2024" with "50" EUR transaction amount
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
| 01 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.55 | 0.0 | 0.0 | 0.0 | false | false |
| 02 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 02 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 03 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 03 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 04 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 05 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 05 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 06 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 06 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 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.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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.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 |
| 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 |
| 12 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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 |
| 14 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 15 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 15 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 16 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 17 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 18 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 18 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 19 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 19 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 20 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 20 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 21 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 22 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 22 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 23 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 23 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 24 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 24 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 25 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 25 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 26 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 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 | 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 |
| 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 |
| 30 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 31 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 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 |
| 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 01 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 02 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 02 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 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.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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 |
| 06 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 07 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 07 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 08 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 08 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 09 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 10 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 11 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 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.03 | 0.0 | 0.03 | 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.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 |
| 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 |
| 17 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 18 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 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 |
| 19 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 19 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 20 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 20 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 21 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 21 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 22 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 22 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 23 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 23 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 24 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 24 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 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.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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 |
| 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.71 | 0.29 | 0.0 | 0.0 | 100.29 | 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 | | 49.71 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.29 |
| INCOME | 404000 | Interest Income | 33.0 | |
| LIABILITY | 145024 | Deferred Capitalized Income | 17.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 |
| 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.55 | 0.0 | 0.0 | 0.0 | false | false |
| 02 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 02 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 03 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 03 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 04 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 04 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 05 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 05 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 06 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 06 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 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.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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.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 |
| 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 |
| 12 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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 |
| 14 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 15 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 15 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 16 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 16 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 17 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 17 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 18 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 18 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 19 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 19 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 20 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 20 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 21 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 21 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 22 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 22 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 23 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 23 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 24 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 24 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 25 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 25 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 26 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 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 | 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 |
| 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 |
| 30 January 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 31 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 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 |
| 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 01 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 01 February 2024 | Repayment | 33.72 | 33.72 | 0.0 | 0.0 | 0.0 | 116.28 | false | false |
| 02 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 02 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 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.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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 |
| 06 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 07 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 07 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 08 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 08 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 09 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 10 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 10 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 11 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 12 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 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.03 | 0.0 | 0.03 | 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.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 |
| 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 |
| 17 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 18 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 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 |
| 19 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 19 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 20 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 20 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 21 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 21 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 22 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 22 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 23 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 23 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 24 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 24 February 2024 | Capitalized Income Amortization | 0.55 | 0.0 | 0.55 | 0.0 | 0.0 | 0.0 | false | false |
| 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.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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.55 | 0.0 | 0.55 | 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 |
| 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 |
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 | |
@TestRailId:C3703
Scenario: Verify Capitalized Income adjustment reverse replay with backdated charge
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 | 151 | 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 "151" 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 "51" EUR transaction amount
When Admin sets the business date to "02 January 2024"
And Admin runs inline COB job for Loan
Then Loan status will be "ACTIVE"
When Admin sets the business date to "01 March 2024"
And Admin runs inline COB job for Loan
And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 March 2024" with "51" EUR transaction amount
Then Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed |
| 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
| 01 January 2024 | Capitalized Income | 51.0 | 51.0 | 0.0 | 0.0 | 0.0 | 151.0 | false | false |
| 01 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 02 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 02 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 03 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 03 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 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 | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 05 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 06 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 06 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 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.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 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 |
| 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 |
| 14 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 15 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 15 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 16 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 16 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 17 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 18 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 18 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 19 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 19 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 20 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 20 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 21 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 21 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 22 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 22 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 23 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 23 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 24 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 25 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 25 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 26 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 26 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 31 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 31 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 01 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 01 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 02 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 02 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 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 |
| 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 |
| 06 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 07 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 07 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 08 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 08 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 09 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 10 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 10 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 11 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 12 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 12 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 13 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 13 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 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.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Accrual | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 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 |
| 17 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 18 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 18 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 19 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 19 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 20 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 20 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 21 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 21 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 22 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 22 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 23 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 23 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 24 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 24 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 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 |
| 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 |
| 28 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 01 March 2024 | Capitalized Income Adjustment | 51.0 | 50.12 | 0.88 | 0.0 | 0.0 | 100.88 | 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 | | 50.12 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.88 |
| INCOME | 404000 | Interest Income | 33.6 | |
| LIABILITY | 145024 | Deferred Capitalized Income | 17.4 | |
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 |
| 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false |
| 01 January 2024 | Capitalized Income | 51.0 | 51.0 | 0.0 | 0.0 | 0.0 | 151.0 | false | false |
| 01 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 02 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 02 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 03 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 03 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 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 | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 05 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 05 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 06 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 06 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 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.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 10 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 11 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 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 |
| 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 |
| 14 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 15 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 15 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 16 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 16 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 17 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 17 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 18 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 18 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 19 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 19 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 20 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 20 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 21 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 21 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 22 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 22 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 23 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 23 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 24 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 24 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 25 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 25 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 26 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 26 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 27 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false |
| 30 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 31 January 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 31 January 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 01 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 01 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 02 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 02 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 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 |
| 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 |
| 06 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 07 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 07 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 08 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 08 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 09 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 09 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 10 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 10 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 11 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 11 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 12 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 12 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 13 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 13 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 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.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Accrual | 0.04 | 0.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | false |
| 15 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 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 |
| 17 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 18 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 18 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 19 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 19 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 20 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 20 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 21 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 21 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 22 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 22 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 23 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 23 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 24 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false |
| 24 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 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 |
| 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 |
| 28 February 2024 | Capitalized Income Amortization | 0.56 | 0.0 | 0.56 | 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.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false |
| 01 March 2024 | Capitalized Income Adjustment | 51.0 | 50.04 | 0.88 | 0.08 | 0.0 | 100.96 | 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 | | 50.04 |
| ASSET | 112603 | Interest/Fee Receivable | | 0.96 |
| INCOME | 404000 | Interest Income | 33.6 | |
| LIABILITY | 145024 | Deferred Capitalized Income | 17.4 | |
@TestRailId:C3712
Scenario: Verify Capitalized Income Adjustment validation - Total adjustment amount cannot exceed original transaction amount
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 | 150 | 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 "150" 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 status will be "ACTIVE"
When Admin sets the business date to "01 February 2024"
# Try to adjust more than original capitalized income amount (50 EUR) - should fail
And Admin adds invalid capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 February 2024" with "60" EUR transaction amount
@TestRailId:C3713
Scenario: Verify Capitalized Income Adjustment validation - Adjustment transaction date cannot be earlier than original transaction date
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 | 150 | 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 "150" 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 status will be "ACTIVE"
When Admin sets the business date to "01 February 2024"
# Try to adjust with date earlier than original transaction (31 December 2023) - should fail
And Admin adds invalid capitalized income adjustment with "AUTOPAY" payment type to the loan on "31 December 2024" with "60" EUR transaction amount
@TestRailId:C3714
Scenario: Verify Capitalized Income Adjustment validation - Multiple adjustments cannot exceed original amount
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 | 150 | 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 "150" 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 status will be "ACTIVE"
When Admin sets the business date to "01 February 2024"
And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 February 2024" with "30" EUR transaction amount
When Admin sets the business date to "01 March 2024"
# Try to add another adjustment that would exceed total
And Admin adds invalid capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 Marcj 2024" with "25" EUR transaction amount
@TestRailId:C3715
Scenario: Verify Capitalized Income Adjustment - Balance cannot go negative, set to zero instead
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 | 150 | 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 "150" 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
When Admin sets the business date to "01 February 2024"
When Customer makes "REPAYMENT" transaction with "AUTOPAY" payment type on "01 February 2024" with 50.58 EUR transaction amount and system-generated Idempotency key
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 | 01 February 2024 | 100.29 | 49.71 | 0.87 | 0.0 | 0.0 | 50.58 | 50.58 | 0.0 | 0.0 | 0.0 |
| 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 | 50.58 | 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 |
| 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 | 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 |
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"
And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "02 March 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 | 01 February 2024 | 100.29 | 49.71 | 0.87 | 0.0 | 0.0 | 50.58 | 50.58 | 0.0 | 0.0 | 0.0 |
| 2 | 29 | 01 March 2024 | 01 March 2024 | 50.3 | 49.99 | 0.59 | 0.0 | 0.0 | 50.58 | 50.58 | 0.0 | 0.0 | 0.0 |
| 3 | 31 | 01 April 2024 | 02 March 2024 | 0.0 | 50.3 | 0.01 | 0.0 | 0.0 | 50.31 | 50.31 | 50.31 | 0.0 | 0.0 |
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.47 | 0.00 | 0.00 | 151.47 | 151.47 | 50.31 | 0.0 | 0.0 |
And Loan Transactions tab has the following data:
| Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
| 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 | 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 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 |