peter-kovacs-dpc commented on code in PR #6432:
URL: https://github.com/apache/fineract/pull/6432#discussion_r3995609519
##########
fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalAmortizationScheduleMatrixPt1.feature:
##########
@@ -0,0 +1,385 @@
+@WorkingCapital
+@WorkingCapitalAmortizationScheduleMatrixPt1Feature
+Feature: WorkingCapitalAmortizationScheduleMatrixPt1
+
+ #
=============================================================================
+ # Scope 1: Amortization schedule & EIR math (S1-S4)
+ # Matrix variations: accounting NONE/ACC_DEF_REV_AM, NPV 360/365,
+ # period payment frequency DAYS(1/7/30)/DAYS(7)/MONTHS,
+ # discount modes, business date enabled/disabled +
timezone.
+ #
=============================================================================
+
+ @TestRailId:C102481
+ Scenario: Verify amortization schedule & EIR math - UC1: baseline daily, NPV
360, NONE accounting, business date enabled, UTC
+ When Admin sets the business date to "01 January 2026"
+ And Admin creates a client with random data
+ And Admin creates a working capital loan with the following data:
+ | LoanProduct | submittedOnDate | expectedDisbursementDate |
principalAmount | totalPaymentVolume | periodPaymentRate | discount |
+ | WCLP | 01 January 2026 | 01 January 2026 | 9000
| 100000 | 18 | 1000 |
+ When Admin successfully approves the working capital loan on "01 January
2026" with "9000" amount and "1000" discount amount and expected disbursement
date on "01 January 2026"
+ And Admin successfully disburse the Working Capital loan on "01 January
2026" with "9000" EUR transaction amount and "1000" discount amount
+ And Admin retrieves the projected amortization schedule
+ Then The retrieved amortization schedule has the following summary fields:
+ | discountFeeAmount | netDisbursementAmount | totalPaymentVolume |
periodPaymentRate | npvDayCount | expectedPaymentAmount | originalPaymentNumber
|
+ | 1000.00 | 9000.00 | 100000.00 | 18
| 360 | 50.00 | 200 |
+ And The retrieved amortization schedule has payments with the following
details for the listed payment numbers:
+ | paymentNo | date | expectedPaymentAmount | expectedBalance |
expectedAmortizationAmount | actualPaymentAmount | actualAmortizationAmount |
expectedDiscountFeeBalance | actualBalance | actualDiscountFeeBalance |
+ | 0 | 2026-01-01 | -9000.00 | 9000.00 |
| | |
1000.00 | 9000.00 | 1000.00 |
+ | 1 | 2026-01-02 | 50.00 | 8959.61 |
9.61 | | |
990.39 | | |
+ | 2 | 2026-01-03 | 50.00 | 8919.18 |
9.57 | | |
980.82 | | |
+
+ @TestRailId:C102482
+ Scenario: Verify amortization schedule & EIR math - UC2: daily, NPV 365
+ When Admin sets the business date to "01 January 2026"
+ And Admin creates a client with random data
+ And Admin creates a new Working Capital Loan Product with the following
matrix data:
+ | accountingRule | npvDayCount | repaymentFrequencyType | repaymentEvery
|
+ | NONE | 365 | DAYS | 1
|
+ And Admin creates a working capital loan using created product with the
following data:
+ | submittedOnDate | expectedDisbursementDate | principalAmount |
totalPaymentVolume | periodPaymentRate | discount |
+ | 01 January 2026 | 01 January 2026 | 9000 | 100000
| 18 | 1000 |
+ When Admin successfully approves the working capital loan on "01 January
2026" with "9000" amount and "1000" discount amount and expected disbursement
date on "01 January 2026"
+ And Admin successfully disburse the Working Capital loan on "01 January
2026" with "9000" EUR transaction amount and "1000" discount amount
+ And Admin retrieves the projected amortization schedule
+ Then The retrieved amortization schedule has the following summary fields:
+ | discountFeeAmount | netDisbursementAmount | totalPaymentVolume |
periodPaymentRate | npvDayCount | expectedPaymentAmount | originalPaymentNumber
|
+ | 1000.00 | 9000.00 | 100000.00 | 18
| 365 | 49.32 | 203 |
+ And The retrieved amortization schedule has payments with the following
details for the listed payment numbers:
+ | paymentNo | date | expectedPaymentAmount | expectedBalance |
expectedDiscountFeeBalance |
+ | 0 | 2026-01-01 | -9000.00 | 9000.00 |
1000.00 |
+ | 1 | 2026-01-02 | 49.32 | 8960.16 |
990.52 |
+
+ # repaymentFrequencyType/repaymentEvery is not consumed by the amortization
schedule calculation (it walks daily
+ # regardless), so this scenario is redundant with UC1/UC6 for schedule math
- skipped pending re-scope.
+ @Skip @TestRailId:C102483
+ Scenario: Verify amortization schedule & EIR math - UC3: DAYS(7) frequency,
NPV 360
+ When Admin sets the business date to "01 January 2026"
+ And Admin creates a client with random data
+ And Admin creates a new Working Capital Loan Product with the following
matrix data:
+ | accountingRule | npvDayCount | repaymentFrequencyType | repaymentEvery
|
+ | NONE | 360 | DAYS | 7
|
+ And Admin creates a working capital loan using created product with the
following data:
+ | submittedOnDate | expectedDisbursementDate | principalAmount |
totalPaymentVolume | periodPaymentRate | discount |
+ | 01 January 2026 | 01 January 2026 | 9000 | 100000
| 18 | 1000 |
+ When Admin successfully approves the working capital loan on "01 January
2026" with "9000" amount and "1000" discount amount and expected disbursement
date on "01 January 2026"
+ And Admin successfully disburse the Working Capital loan on "01 January
2026" with "9000" EUR transaction amount and "1000" discount amount
+ And Admin retrieves the projected amortization schedule
+ Then The retrieved amortization schedule has the following summary fields:
+ | discountFeeAmount | netDisbursementAmount | totalPaymentVolume |
periodPaymentRate | npvDayCount | expectedPaymentAmount | originalPaymentNumber
|
+ | 1000.00 | 9000.00 | 100000.00 | 18
| 360 | 50.00 | 200 |
+ And The retrieved amortization schedule has payments with the following
details for the listed payment numbers:
+ | paymentNo | date | expectedPaymentAmount | expectedBalance |
expectedDiscountFeeBalance |
+ | 0 | 2026-01-01 | -9000.00 | 9000.00 |
1000.00 |
+ | 1 | 2026-01-08 | 50.00 | 8959.61 |
990.39 |
+
+ # repaymentFrequencyType/repaymentEvery is not consumed by the amortization
schedule calculation (it walks daily
+ # regardless), so this scenario is redundant with UC1/UC6 for schedule math
- skipped pending re-scope.
+ @Skip @TestRailId:C102484
Review Comment:
removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]