peter-kovacs-dpc commented on code in PR #6432:
URL: https://github.com/apache/fineract/pull/6432#discussion_r3995801592
##########
fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalAmortizationScheduleMatrixPt2.feature:
##########
@@ -0,0 +1,431 @@
+@WorkingCapital
+@WorkingCapitalAmortizationScheduleMatrixPt2Feature
+Feature: WorkingCapitalAmortizationScheduleMatrixPt2
+
+ #
=============================================================================
+ # Scope 6: Tiny rate (many rows)
+ #
=============================================================================
+
+ @TestRailId:C102498
+ Scenario: Verify tiny rate schedule - UC1: low periodPaymentRate produces
many rows and sampled values still sum correctly
+ 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 | 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 | 90 | 10000
| 0.36 | 10 |
+ When Admin successfully approves the working capital loan on "01 January
2026" with "90" amount and "10" discount amount and expected disbursement date
on "01 January 2026"
+ And Admin successfully disburse the Working Capital loan on "01 January
2026" with "90" EUR transaction amount and "10" discount amount
+ And Admin retrieves the projected amortization schedule
+ Then The retrieved amortization schedule has at least 1000 payment rows
+ 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 | -90.00 | 90.00 |
10.00 |
+ And The retrieved amortization schedule expected amortization sums to the
discount fee and both expected balances close to zero
+
+ #
=============================================================================
+ # Scope 7: 0.005 rounding boundaries
+ #
=============================================================================
+
+ @TestRailId:C102499
+ Scenario: Verify 0.005 rounding boundary - UC1: 3-decimal currency leaves
exactly 0.005 residual on 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
| digitsAfterDecimal |
+ | NONE | 365 | DAYS | 1
| 3 |
+ 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
| 17 | 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
+ When Admin sets the business date to "03 January 2026"
+ And Customer makes repayment on "03 January 2026" with 46 transaction
amount on Working Capital loan
+ When Admin sets the business date to "04 January 2026"
+ And Customer makes repayment on "04 January 2026" with 46 transaction
amount on Working Capital loan
+ And Customer makes repayment on "02 January 2026" with 9907.995
transaction amount on Working Capital loan
+ Then Working Capital loan balance payload contains the following fields:
+ | field | value |
+ | principalOutstanding | 0.005 |
+ When Admin retrieves the projected amortization schedule
+ Then The retrieved amortization schedule has payments with the following
details for the listed payment numbers:
+ | paymentNo | expectedPaymentAmount | expectedBalance | actualBalance |
actualDiscountFeeBalance |
+ | 4 | 0.005 | 0.000 | |
|
+ And The retrieved amortization schedule actual amortization total is "1000"
+ And The retrieved amortization schedule has no negative monetary amounts
+
+ @TestRailId:C102500
+ Scenario: Verify 0.005 rounding boundary - UC2: 3-decimal currency residual
0.006 is rounded to 0.01 and closed
Review Comment:
rewritten
--
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]