peter-kovacs-dpc commented on code in PR #6432:
URL: https://github.com/apache/fineract/pull/6432#discussion_r3996370116


##########
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
+    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.994 
transaction amount on Working Capital loan
+    Then Working Capital loan balance payload contains the following fields:
+      | field                | value |
+      | principalOutstanding | 0.006 |
+    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.006                 | 0.000           |               |  
                        |
+    And The retrieved amortization schedule actual amortization total is "1000"
+    And The retrieved amortization schedule has no negative monetary amounts
+
+  # 
=============================================================================
+  # Scope 8: Expected vs actual columns (PS-3240)
+  # 
=============================================================================
+
+  @TestRailId:C102501
+  Scenario: Verify expected vs actual columns - UC1: exact on-time payments 
keep columns aligned
+    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
+    When Admin sets the business date to "02 January 2026"
+    And Customer makes repayment on "02 January 2026" with 50 transaction 
amount on Working Capital loan
+    When Admin sets the business date to "03 January 2026"
+    And Customer makes repayment on "03 January 2026" with 50 transaction 
amount on Working Capital loan
+    And Admin runs inline COB job for Working Capital Loan by loanId
+    And Admin retrieves the projected amortization schedule
+    Then The retrieved amortization schedule has payments with the following 
details for the listed payment numbers:
+      | paymentNo | date       | expectedPaymentAmount | expectedBalance | 
actualPaymentAmount | actualBalance | actualAmortizationAmount |
+      | 0         | 2026-01-01 | -9000.00              | 9000.00         |     
                | 9000.00       |                          |
+      | 1         | 2026-01-02 | 50.00                 | 8959.61         | 
50.00               | 8959.61       | 9.61                     |
+      | 2         | 2026-01-03 | 50.00                 | 8919.18         | 
50.00               | 8919.18       | 9.57                     |
+    And Every fully paid amortization schedule period has actual amortization 
equal to expected amortization
+    And The retrieved amortization schedule has no negative monetary amounts
+
+  @TestRailId:C102502
+  Scenario: Verify expected vs actual columns - UC2: partial payment leaves 
expected unchanged and actual reduced
+    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
+    When Admin sets the business date to "02 January 2026"
+    And Customer makes repayment on "02 January 2026" with 25 transaction 
amount on Working Capital loan
+    And Admin runs inline COB job for Working Capital Loan by loanId
+    And Admin retrieves the projected amortization schedule
+    Then The retrieved amortization schedule has payments with the following 
details for the listed payment numbers:
+      | paymentNo | date       | expectedPaymentAmount | expectedBalance | 
actualPaymentAmount | actualBalance | actualAmortizationAmount |
+      | 0         | 2026-01-01 | -9000.00              | 9000.00         |     
                | 9000.00       |                          |
+      | 1         | 2026-01-02 | 50.00                 | 8959.61         | 
25.00               | 8979.81       | 4.81                     |
+    And The retrieved amortization schedule has no negative monetary amounts
+
+  @TestRailId:C102503
+  Scenario: Verify expected vs actual columns - UC3: missed payment day leaves 
actual columns blank
+    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
+    When Admin sets the business date to "03 January 2026"
+    And Customer makes repayment on "03 January 2026" with 50 transaction 
amount on Working Capital loan
+    And Admin retrieves the projected amortization schedule
+    Then The retrieved amortization schedule has payments with the following 
details for the listed payment numbers:
+      | paymentNo | date       | expectedPaymentAmount | expectedBalance | 
actualPaymentAmount |
+      | 0         | 2026-01-01 | -9000.00              | 9000.00         |     
                |
+      | 1         | 2026-01-02 | 50.00                 | 8959.61         | 
0.00                |
+      | 2         | 2026-01-03 | 50.00                 | 8959.61         | 
50.00               |
+    And The retrieved amortization schedule has no negative monetary amounts
+
+  # 
=============================================================================
+  # Scope 9: Annual EIR (PS-3218)
+  # 
=============================================================================
+
+  @TestRailId:C102504
+  Scenario: Verify annual EIR - UC1: daily NPV 360
+    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
+    Then Working capital loan details has annual EIR "0.476307952775034048"
+
+  # repaymentFrequencyType/repaymentEvery is not consumed by the amortization 
schedule calculation (it walks daily
+  # regardless), so this scenario is redundant with UC1 for schedule math - 
skipped pending re-scope.
+  @Skip @TestRailId:C102505
+  Scenario: Verify annual EIR - UC2: DAYS(7) 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
+    Then Working capital loan details has annual EIR "0.476307952775034048"
+
+  # 
=============================================================================
+  # Scope 10: Rate changes
+  # 
=============================================================================
+
+  @TestRailId:C102506
+  Scenario: Verify rate change - UC1: single rate decrease and schedule 
reprojects
+    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
+    When Admin sets the business date to "02 January 2026"
+    And Admin update Working Capital period payment rate with "9" value
+    And Admin retrieves the projected amortization schedule
+    Then Working Capital Loan period payment rate in effect is "9"
+    And The retrieved amortization schedule has no negative monetary amounts
+
+  @TestRailId:C102507
+  Scenario: Verify rate change - UC2: single rate increase effective from a 
future date
+    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             | 9                 | 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 update Working Capital period payment rate with "18" value 
effective from "15 January 2026"
+    And Admin retrieves the projected amortization schedule
+    Then Working Capital Loan period payment rate in effect on "01 January 
2026" is "9"
+    And Working Capital Loan period payment rate in effect on "15 January 
2026" is "18"
+    And The retrieved amortization schedule has no negative monetary amounts
+
+  @TestRailId:C102508
+  Scenario: Verify rate change - UC3: multiple sequential rate changes
+    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 update Working Capital period payment rate with "9" value 
effective from "05 January 2026"
+    And Admin update Working Capital period payment rate with "18" value 
effective from "10 January 2026"
+    And Admin retrieves the projected amortization schedule
+    Then Working Capital Loan period payment rate in effect on "01 January 
2026" is "18"
+    And Working Capital Loan period payment rate in effect on "05 January 
2026" is "9"
+    And Working Capital Loan period payment rate in effect on "10 January 
2026" is "18"
+
+  # 
=============================================================================
+  # Scope 11: Persisted model consistency after every transaction (API-only)
+  # 
=============================================================================
+
+  @TestRailId:C102509
+  Scenario: Verify persisted model consistency - UC1: after repayment
+    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
+    When Admin sets the business date to "02 January 2026"
+    And Customer makes repayment on "02 January 2026" with 1234 transaction 
amount on Working Capital loan
+    And Admin runs inline COB job for Working Capital Loan by loanId
+    And Admin retrieves the projected amortization schedule
+    Then The retrieved amortization schedule actual amortization is consistent 
with the loan realized and unrealized income after close of business
+
+  @TestRailId:C102510
+  Scenario: Verify persisted model consistency - UC2: after charge and 
repayment
+    When Admin sets the business date to "01 January 2026"
+    And Admin creates a client with random data and creates-approves-disburses 
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                | 0        |
+    When Admin sets the business date to "10 January 2026"
+    And Admin runs inline COB job for Working Capital Loan by loanId
+    And Admin adds "WORKING_CAPITAL_SPECIFIED_DUE_DATE_FEE" specified due date 
charge to working capital loan with "10 January 2026" due date and 35.0 
transaction amount
+    And Customer makes repayment on "10 January 2026" with 85 transaction 
amount on Working Capital loan
+    And Admin runs inline COB job for Working Capital Loan by loanId
+    And Admin retrieves the projected amortization schedule
+    Then The retrieved amortization schedule actual amortization is consistent 
with the loan realized and unrealized income after close of business
+    And The retrieved amortization schedule has no negative monetary amounts
+
+  @TestRailId:C102511
+  Scenario: Verify persisted model consistency - UC3: after rate change
+    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
+    When Admin sets the business date to "02 January 2026"
+    And Customer makes repayment on "02 January 2026" with 50 transaction 
amount on Working Capital loan
+    And Admin update Working Capital period payment rate with "9" value
+    And Admin runs inline COB job for Working Capital Loan by loanId
+    And Admin retrieves the projected amortization schedule
+    Then The retrieved amortization schedule actual amortization is consistent 
with the loan realized and unrealized income after close of business
+
+  # 
=============================================================================
+  # Matrix dimension: Delinquency
+  # 
=============================================================================
+
+  @TestRailId:C102512
+  Scenario: Verify delinquency - UC1: loan creation start type with grace days 
and flat minimum payment
+    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 Product with custom breach config 
and overrides enabled:
+      | breachFrequency | breachFrequencyType | breachAmountCalculationType | 
breachAmount | delinquencyGraceDays | delinquencyStartType | breachGraceDays | 
breachStartType |
+      | 3               | DAYS                | FLAT                        | 
100          | 5                    | LOAN_CREATION        | 0               | 
LOAN_CREATION   |
+    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
+    Then Working capital loan account has delinquencyGraceDays 5 and 
delinquencyStartType "LOAN_CREATION"
+
+  @TestRailId:C102513
+  Scenario: Verify delinquency - UC2: disbursement start type with breach 
grace days
+    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 Product with custom breach config 
and overrides enabled:
+      | breachFrequency | breachFrequencyType | breachAmountCalculationType | 
breachAmount | delinquencyGraceDays | delinquencyStartType | breachGraceDays | 
breachStartType |
+      | 3               | DAYS                | FLAT                        | 
100          | 0                    | DISBURSEMENT         | 3               | 
DISBURSEMENT    |
+    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
+    Then Working capital loan account has delinquencyGraceDays 0 and 
delinquencyStartType "DISBURSEMENT"
+    And Working capital loan account has breachGraceDays 3
+
+  # 
=============================================================================
+  # Matrix dimension: Breach / near-breach
+  # 
=============================================================================
+
+  @TestRailId:C102514
+  Scenario: Verify breach - UC1: breach only with zero grace days
+    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 Product with breach and near 
breach config and overrides enabled:
+      | breachFrequency | breachFrequencyType | breachAmountCalculationType | 
breachAmount | nearBreachFrequency | nearBreachFrequencyType | 
nearBreachThreshold | delinquencyGraceDays | breachGraceDays | breachStartType |
+      | 2               | MONTHS              | PERCENTAGE                  | 
5.0          | 1                   | MONTHS                  | 70.0             
   | 0                    | 0               | DISBURSEMENT    |
+    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
+    Then Working capital loan account has breachGraceDays 0
+
+  @TestRailId:C102515
+  Scenario: Verify breach - UC2: breach frequency shorter or equal to 
near-breach frequency is rejected
+    When Admin sets the business date to "01 January 2026"
+    And Admin creates a client with random data
+    Then Admin creates a Working Capital Loan Product with breach and near 
breach config and overrides enabled results an error:
+      | breachFrequency | breachFrequencyType | breachAmountCalculationType | 
breachAmount | nearBreachFrequency | nearBreachFrequencyType | 
nearBreachThreshold | expectedStatus | expectedErrorMessage                     
                 |
+      | 1               | MONTHS              | PERCENTAGE                  | 
5.0          | 2                   | MONTHS                  | 70.0             
   | 400            | near.breach.frequency.must.be.lower.than.breach.frequency 
|
+
+  # 
=============================================================================
+  # Matrix dimension: Allocation
+  # 
=============================================================================
+
+  @TestRailId:C102516
+  Scenario: Verify allocation - UC1: DEFAULT allocation with 
DUE_FEE_PRINCIPAL_PENALTY order
+    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 
| paymentAllocation                                                             
           |
+      | NONE           | 360         | DAYS                   | 1              
| 
DUE_FEE,DUE_PRINCIPAL,DUE_PENALTY,IN_ADVANCE_FEE,IN_ADVANCE_PRINCIPAL,IN_ADVANCE_PENALTY
 |
+    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 no negative monetary amounts
+
+  # 
=============================================================================
+  # Matrix dimension: Charges
+  # 
=============================================================================
+
+  @TestRailId:C102517
+  Scenario: Verify charges - UC1: specified due date fee before maturity

Review Comment:
   both 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]

Reply via email to