From 854f466a40c167bdea10c98bdcb5f1507fc48af7 Mon Sep 17 00:00:00 2001 From: Oleksii Novikov Date: Tue, 2 Jun 2026 15:55:11 +0300 Subject: [PATCH 1/2] FINERACT-2455: WC - amend amortization schedule for repayment on disbursement date --- ...WorkingCapitalDiscountAmortization.feature | 327 ++++++++++++++++ .../WorkingCapitalLoanRepayment.feature | 360 +++++++++--------- .../ProjectedAmortizationScheduleModel.java | 63 ++- ...ngCapitalLoanWritePlatformServiceImpl.java | 5 +- 4 files changed, 552 insertions(+), 203 deletions(-) diff --git a/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAmortization.feature b/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAmortization.feature index 95a965ddefd..060da07f687 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAmortization.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAmortization.feature @@ -469,3 +469,330 @@ Feature: WorkingCapitalDiscountFeeAmortization | Type | Account code | Account name | Debit | Credit | | INCOME | 404000 | Interest Income | | 19.18 | | LIABILITY | 240005 | Deferred Interest Revenue | 19.18 | | + + Scenario: Verify Discount Fee Amortization when repayment is made on the disbursement 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | | + Then Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" + Then Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + Then Admin successfully add discount with "1000" amount on Working Capital loan account + And Customer makes repayment on "01 January 2026" with 50 transaction amount on Working Capital loan + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee | 1000.0 | 1000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + 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: + | paymentNo | date | expectedPaymentAmount | expectedBalance | actualBalance | expectedAmortizationAmount | actualPaymentAmount | actualAmortizationAmount | expectedDiscountFeeBalance | actualDiscountFeeBalance | + | 0 | 2026-01-01 | -9000.00 | 9000.00 | 9000.00 | | | | 1000.00 | 1000.00 | + | 1 | 2026-01-01 | 50.00 | 8959.61 | 8959.61 | 9.61 | 50.00 | 9.61 | 990.39 | 990.39 | + | 2 | 2026-01-02 | 50.00 | 8919.18 | | 9.57 | | | 980.82 | | + | 3 | 2026-01-03 | 50.00 | 8878.70 | | 9.52 | | | 971.30 | | + | 4 | 2026-01-04 | 50.00 | 8838.18 | | 9.48 | | | 961.82 | | + | 5 | 2026-01-05 | 50.00 | 8797.62 | | 9.44 | | | 952.38 | | + | 6 | 2026-01-06 | 50.00 | 8757.01 | | 9.39 | | | 942.99 | | + | 7 | 2026-01-07 | 50.00 | 8716.36 | | 9.35 | | | 933.64 | | + | 8 | 2026-01-08 | 50.00 | 8675.67 | | 9.31 | | | 924.33 | | + | 9 | 2026-01-09 | 50.00 | 8634.94 | | 9.26 | | | 915.07 | | + | 10 | 2026-01-10 | 50.00 | 8594.16 | | 9.22 | | | 905.85 | | + | 11 | 2026-01-11 | 50.00 | 8553.33 | | 9.18 | | | 896.67 | | + | 12 | 2026-01-12 | 50.00 | 8512.47 | | 9.13 | | | 887.54 | | + | 13 | 2026-01-13 | 50.00 | 8471.56 | | 9.09 | | | 878.45 | | + | 14 | 2026-01-14 | 50.00 | 8430.60 | | 9.05 | | | 869.40 | | + | 15 | 2026-01-15 | 50.00 | 8389.61 | | 9.00 | | | 860.40 | | + | 16 | 2026-01-16 | 50.00 | 8348.56 | | 8.96 | | | 851.44 | | + | 17 | 2026-01-17 | 50.00 | 8307.48 | | 8.91 | | | 842.53 | | + | 18 | 2026-01-18 | 50.00 | 8266.35 | | 8.87 | | | 833.66 | | + | 19 | 2026-01-19 | 50.00 | 8225.18 | | 8.83 | | | 824.83 | | + | 20 | 2026-01-20 | 50.00 | 8183.96 | | 8.78 | | | 816.05 | | + | 21 | 2026-01-21 | 50.00 | 8142.70 | | 8.74 | | | 807.31 | | + | 22 | 2026-01-22 | 50.00 | 8101.39 | | 8.69 | | | 798.62 | | + | 23 | 2026-01-23 | 50.00 | 8060.04 | | 8.65 | | | 789.97 | | + | 24 | 2026-01-24 | 50.00 | 8018.65 | | 8.61 | | | 781.36 | | + | 25 | 2026-01-25 | 50.00 | 7977.21 | | 8.56 | | | 772.80 | | + | 26 | 2026-01-26 | 50.00 | 7935.73 | | 8.52 | | | 764.28 | | + | 27 | 2026-01-27 | 50.00 | 7894.21 | | 8.47 | | | 755.81 | | + | 28 | 2026-01-28 | 50.00 | 7852.63 | | 8.43 | | | 747.38 | | + | 29 | 2026-01-29 | 50.00 | 7811.02 | | 8.39 | | | 738.99 | | + | 30 | 2026-01-30 | 50.00 | 7769.36 | | 8.34 | | | 730.65 | | + | 31 | 2026-01-31 | 50.00 | 7727.66 | | 8.30 | | | 722.35 | | + | 32 | 2026-02-01 | 50.00 | 7685.91 | | 8.25 | | | 714.10 | | + | 33 | 2026-02-02 | 50.00 | 7644.12 | | 8.21 | | | 705.89 | | + | 34 | 2026-02-03 | 50.00 | 7602.28 | | 8.16 | | | 697.73 | | + | 35 | 2026-02-04 | 50.00 | 7560.40 | | 8.12 | | | 689.61 | | + | 36 | 2026-02-05 | 50.00 | 7518.47 | | 8.07 | | | 681.54 | | + | 37 | 2026-02-06 | 50.00 | 7476.50 | | 8.03 | | | 673.51 | | + | 38 | 2026-02-07 | 50.00 | 7434.48 | | 7.98 | | | 665.53 | | + | 39 | 2026-02-08 | 50.00 | 7392.42 | | 7.94 | | | 657.59 | | + | 40 | 2026-02-09 | 50.00 | 7350.31 | | 7.89 | | | 649.70 | | + | 41 | 2026-02-10 | 50.00 | 7308.16 | | 7.85 | | | 641.85 | | + | 42 | 2026-02-11 | 50.00 | 7265.97 | | 7.80 | | | 634.05 | | + | 43 | 2026-02-12 | 50.00 | 7223.72 | | 7.76 | | | 626.29 | | + | 44 | 2026-02-13 | 50.00 | 7181.44 | | 7.71 | | | 618.58 | | + | 45 | 2026-02-14 | 50.00 | 7139.11 | | 7.67 | | | 610.91 | | + | 46 | 2026-02-15 | 50.00 | 7096.73 | | 7.62 | | | 603.29 | | + | 47 | 2026-02-16 | 50.00 | 7054.31 | | 7.58 | | | 595.71 | | + | 48 | 2026-02-17 | 50.00 | 7011.84 | | 7.53 | | | 588.18 | | + | 49 | 2026-02-18 | 50.00 | 6969.33 | | 7.49 | | | 580.69 | | + | 50 | 2026-02-19 | 50.00 | 6926.77 | | 7.44 | | | 573.25 | | + | 51 | 2026-02-20 | 50.00 | 6884.17 | | 7.40 | | | 565.85 | | + | 52 | 2026-02-21 | 50.00 | 6841.52 | | 7.35 | | | 558.50 | | + | 53 | 2026-02-22 | 50.00 | 6798.82 | | 7.31 | | | 551.19 | | + | 54 | 2026-02-23 | 50.00 | 6756.08 | | 7.26 | | | 543.93 | | + | 55 | 2026-02-24 | 50.00 | 6713.30 | | 7.21 | | | 536.72 | | + | 56 | 2026-02-25 | 50.00 | 6670.47 | | 7.17 | | | 529.55 | | + | 57 | 2026-02-26 | 50.00 | 6627.59 | | 7.12 | | | 522.43 | | + | 58 | 2026-02-27 | 50.00 | 6584.67 | | 7.08 | | | 515.35 | | + | 59 | 2026-02-28 | 50.00 | 6541.70 | | 7.03 | | | 508.32 | | + | 60 | 2026-03-01 | 50.00 | 6498.68 | | 6.99 | | | 501.33 | | + | 61 | 2026-03-02 | 50.00 | 6455.62 | | 6.94 | | | 494.39 | | + | 62 | 2026-03-03 | 50.00 | 6412.51 | | 6.89 | | | 487.50 | | + | 63 | 2026-03-04 | 50.00 | 6369.36 | | 6.85 | | | 480.65 | | + | 64 | 2026-03-05 | 50.00 | 6326.16 | | 6.80 | | | 473.85 | | + | 65 | 2026-03-06 | 50.00 | 6282.92 | | 6.76 | | | 467.09 | | + | 66 | 2026-03-07 | 50.00 | 6239.63 | | 6.71 | | | 460.38 | | + | 67 | 2026-03-08 | 50.00 | 6196.29 | | 6.66 | | | 453.72 | | + | 68 | 2026-03-09 | 50.00 | 6152.91 | | 6.62 | | | 447.10 | | + | 69 | 2026-03-10 | 50.00 | 6109.48 | | 6.57 | | | 440.53 | | + | 70 | 2026-03-11 | 50.00 | 6066.00 | | 6.52 | | | 434.01 | | + | 71 | 2026-03-12 | 50.00 | 6022.48 | | 6.48 | | | 427.53 | | + | 72 | 2026-03-13 | 50.00 | 5978.91 | | 6.43 | | | 421.10 | | + | 73 | 2026-03-14 | 50.00 | 5935.29 | | 6.38 | | | 414.72 | | + | 74 | 2026-03-15 | 50.00 | 5891.63 | | 6.34 | | | 408.38 | | + | 75 | 2026-03-16 | 50.00 | 5847.92 | | 6.29 | | | 402.09 | | + | 76 | 2026-03-17 | 50.00 | 5804.17 | | 6.24 | | | 395.85 | | + | 77 | 2026-03-18 | 50.00 | 5760.36 | | 6.20 | | | 389.65 | | + | 78 | 2026-03-19 | 50.00 | 5716.52 | | 6.15 | | | 383.50 | | + | 79 | 2026-03-20 | 50.00 | 5672.62 | | 6.10 | | | 377.40 | | + | 80 | 2026-03-21 | 50.00 | 5628.68 | | 6.06 | | | 371.34 | | + | 81 | 2026-03-22 | 50.00 | 5584.69 | | 6.01 | | | 365.33 | | + | 82 | 2026-03-23 | 50.00 | 5540.65 | | 5.96 | | | 359.37 | | + | 83 | 2026-03-24 | 50.00 | 5496.57 | | 5.92 | | | 353.45 | | + | 84 | 2026-03-25 | 50.00 | 5452.44 | | 5.87 | | | 347.58 | | + | 85 | 2026-03-26 | 50.00 | 5408.26 | | 5.82 | | | 341.76 | | + | 86 | 2026-03-27 | 50.00 | 5364.03 | | 5.78 | | | 335.98 | | + | 87 | 2026-03-28 | 50.00 | 5319.76 | | 5.73 | | | 330.25 | | + | 88 | 2026-03-29 | 50.00 | 5275.44 | | 5.68 | | | 324.57 | | + | 89 | 2026-03-30 | 50.00 | 5231.08 | | 5.63 | | | 318.94 | | + | 90 | 2026-03-31 | 50.00 | 5186.66 | | 5.59 | | | 313.35 | | + | 91 | 2026-04-01 | 50.00 | 5142.20 | | 5.54 | | | 307.81 | | + | 92 | 2026-04-02 | 50.00 | 5097.69 | | 5.49 | | | 302.32 | | + | 93 | 2026-04-03 | 50.00 | 5053.13 | | 5.44 | | | 296.88 | | + | 94 | 2026-04-04 | 50.00 | 5008.53 | | 5.40 | | | 291.48 | | + | 95 | 2026-04-05 | 50.00 | 4963.88 | | 5.35 | | | 286.13 | | + | 96 | 2026-04-06 | 50.00 | 4919.18 | | 5.30 | | | 280.83 | | + | 97 | 2026-04-07 | 50.00 | 4874.43 | | 5.25 | | | 275.58 | | + | 98 | 2026-04-08 | 50.00 | 4829.64 | | 5.20 | | | 270.38 | | + | 99 | 2026-04-09 | 50.00 | 4784.79 | | 5.16 | | | 265.22 | | + | 100 | 2026-04-10 | 50.00 | 4739.90 | | 5.11 | | | 260.11 | | + | 101 | 2026-04-11 | 50.00 | 4694.96 | | 5.06 | | | 255.05 | | + | 102 | 2026-04-12 | 50.00 | 4649.98 | | 5.01 | | | 250.04 | | + | 103 | 2026-04-13 | 50.00 | 4604.94 | | 4.97 | | | 245.07 | | + | 104 | 2026-04-14 | 50.00 | 4559.86 | | 4.92 | | | 240.15 | | + | 105 | 2026-04-15 | 50.00 | 4514.73 | | 4.87 | | | 235.28 | | + | 106 | 2026-04-16 | 50.00 | 4469.55 | | 4.82 | | | 230.46 | | + | 107 | 2026-04-17 | 50.00 | 4424.32 | | 4.77 | | | 225.69 | | + | 108 | 2026-04-18 | 50.00 | 4379.05 | | 4.72 | | | 220.97 | | + | 109 | 2026-04-19 | 50.00 | 4333.72 | | 4.68 | | | 216.29 | | + | 110 | 2026-04-20 | 50.00 | 4288.35 | | 4.63 | | | 211.66 | | + | 111 | 2026-04-21 | 50.00 | 4242.93 | | 4.58 | | | 207.08 | | + | 112 | 2026-04-22 | 50.00 | 4197.46 | | 4.53 | | | 202.55 | | + | 113 | 2026-04-23 | 50.00 | 4151.94 | | 4.48 | | | 198.07 | | + | 114 | 2026-04-24 | 50.00 | 4106.38 | | 4.43 | | | 193.64 | | + | 115 | 2026-04-25 | 50.00 | 4060.76 | | 4.38 | | | 189.26 | | + | 116 | 2026-04-26 | 50.00 | 4015.10 | | 4.34 | | | 184.92 | | + | 117 | 2026-04-27 | 50.00 | 3969.38 | | 4.29 | | | 180.63 | | + | 118 | 2026-04-28 | 50.00 | 3923.62 | | 4.24 | | | 176.39 | | + | 119 | 2026-04-29 | 50.00 | 3877.81 | | 4.19 | | | 172.20 | | + | 120 | 2026-04-30 | 50.00 | 3831.95 | | 4.14 | | | 168.06 | | + | 121 | 2026-05-01 | 50.00 | 3786.04 | | 4.09 | | | 163.97 | | + | 122 | 2026-05-02 | 50.00 | 3740.09 | | 4.04 | | | 159.93 | | + | 123 | 2026-05-03 | 50.00 | 3694.08 | | 3.99 | | | 155.94 | | + | 124 | 2026-05-04 | 50.00 | 3648.03 | | 3.94 | | | 152.00 | | + | 125 | 2026-05-05 | 50.00 | 3601.92 | | 3.90 | | | 148.10 | | + | 126 | 2026-05-06 | 50.00 | 3555.77 | | 3.85 | | | 144.25 | | + | 127 | 2026-05-07 | 50.00 | 3509.56 | | 3.80 | | | 140.45 | | + | 128 | 2026-05-08 | 50.00 | 3463.31 | | 3.75 | | | 136.70 | | + | 129 | 2026-05-09 | 50.00 | 3417.01 | | 3.70 | | | 133.00 | | + | 130 | 2026-05-10 | 50.00 | 3370.66 | | 3.65 | | | 129.35 | | + | 131 | 2026-05-11 | 50.00 | 3324.26 | | 3.60 | | | 125.75 | | + | 132 | 2026-05-12 | 50.00 | 3277.81 | | 3.55 | | | 122.20 | | + | 133 | 2026-05-13 | 50.00 | 3231.31 | | 3.50 | | | 118.70 | | + | 134 | 2026-05-14 | 50.00 | 3184.76 | | 3.45 | | | 115.25 | | + | 135 | 2026-05-15 | 50.00 | 3138.16 | | 3.40 | | | 111.85 | | + | 136 | 2026-05-16 | 50.00 | 3091.51 | | 3.35 | | | 108.50 | | + | 137 | 2026-05-17 | 50.00 | 3044.81 | | 3.30 | | | 105.20 | | + | 138 | 2026-05-18 | 50.00 | 2998.06 | | 3.25 | | | 101.95 | | + | 139 | 2026-05-19 | 50.00 | 2951.26 | | 3.20 | | | 98.75 | | + | 140 | 2026-05-20 | 50.00 | 2904.42 | | 3.15 | | | 95.60 | | + | 141 | 2026-05-21 | 50.00 | 2857.52 | | 3.10 | | | 92.50 | | + | 142 | 2026-05-22 | 50.00 | 2810.57 | | 3.05 | | | 89.45 | | + | 143 | 2026-05-23 | 50.00 | 2763.57 | | 3.00 | | | 86.45 | | + | 144 | 2026-05-24 | 50.00 | 2716.52 | | 2.95 | | | 83.50 | | + | 145 | 2026-05-25 | 50.00 | 2669.42 | | 2.90 | | | 80.60 | | + | 146 | 2026-05-26 | 50.00 | 2622.27 | | 2.85 | | | 77.75 | | + | 147 | 2026-05-27 | 50.00 | 2575.07 | | 2.80 | | | 74.95 | | + | 148 | 2026-05-28 | 50.00 | 2527.82 | | 2.75 | | | 72.20 | | + | 149 | 2026-05-29 | 50.00 | 2480.52 | | 2.70 | | | 69.50 | | + | 150 | 2026-05-30 | 50.00 | 2433.17 | | 2.65 | | | 66.85 | | + | 151 | 2026-05-31 | 50.00 | 2385.77 | | 2.60 | | | 64.25 | | + | 152 | 2026-06-01 | 50.00 | 2338.31 | | 2.55 | | | 61.70 | | + | 153 | 2026-06-02 | 50.00 | 2290.81 | | 2.50 | | | 59.20 | | + | 154 | 2026-06-03 | 50.00 | 2243.26 | | 2.45 | | | 56.75 | | + | 155 | 2026-06-04 | 50.00 | 2195.65 | | 2.40 | | | 54.35 | | + | 156 | 2026-06-05 | 50.00 | 2148.00 | | 2.34 | | | 52.01 | | + | 157 | 2026-06-06 | 50.00 | 2100.29 | | 2.29 | | | 49.72 | | + | 158 | 2026-06-07 | 50.00 | 2052.53 | | 2.24 | | | 47.48 | | + | 159 | 2026-06-08 | 50.00 | 2004.73 | | 2.19 | | | 45.29 | | + | 160 | 2026-06-09 | 50.00 | 1956.87 | | 2.14 | | | 43.15 | | + | 161 | 2026-06-10 | 50.00 | 1908.96 | | 2.09 | | | 41.06 | | + | 162 | 2026-06-11 | 50.00 | 1860.99 | | 2.04 | | | 39.02 | | + | 163 | 2026-06-12 | 50.00 | 1812.98 | | 1.99 | | | 37.03 | | + | 164 | 2026-06-13 | 50.00 | 1764.92 | | 1.94 | | | 35.09 | | + | 165 | 2026-06-14 | 50.00 | 1716.80 | | 1.88 | | | 33.21 | | + | 166 | 2026-06-15 | 50.00 | 1668.64 | | 1.83 | | | 31.38 | | + | 167 | 2026-06-16 | 50.00 | 1620.42 | | 1.78 | | | 29.60 | | + | 168 | 2026-06-17 | 50.00 | 1572.15 | | 1.73 | | | 27.87 | | + | 169 | 2026-06-18 | 50.00 | 1523.83 | | 1.68 | | | 26.19 | | + | 170 | 2026-06-19 | 50.00 | 1475.45 | | 1.63 | | | 24.56 | | + | 171 | 2026-06-20 | 50.00 | 1427.03 | | 1.58 | | | 22.98 | | + | 172 | 2026-06-21 | 50.00 | 1378.55 | | 1.52 | | | 21.46 | | + | 173 | 2026-06-22 | 50.00 | 1330.02 | | 1.47 | | | 19.99 | | + | 174 | 2026-06-23 | 50.00 | 1281.45 | | 1.42 | | | 18.57 | | + | 175 | 2026-06-24 | 50.00 | 1232.81 | | 1.37 | | | 17.20 | | + | 176 | 2026-06-25 | 50.00 | 1184.13 | | 1.32 | | | 15.88 | | + | 177 | 2026-06-26 | 50.00 | 1135.39 | | 1.26 | | | 14.62 | | + | 178 | 2026-06-27 | 50.00 | 1086.61 | | 1.21 | | | 13.41 | | + | 179 | 2026-06-28 | 50.00 | 1037.77 | | 1.16 | | | 12.25 | | + | 180 | 2026-06-29 | 50.00 | 988.88 | | 1.11 | | | 11.14 | | + | 181 | 2026-06-30 | 50.00 | 939.93 | | 1.06 | | | 10.08 | | + | 182 | 2026-07-01 | 50.00 | 890.93 | | 1.00 | | | 9.08 | | + | 183 | 2026-07-02 | 50.00 | 841.89 | | 0.95 | | | 8.13 | | + | 184 | 2026-07-03 | 50.00 | 792.79 | | 0.90 | | | 7.23 | | + | 185 | 2026-07-04 | 50.00 | 743.63 | | 0.85 | | | 6.38 | | + | 186 | 2026-07-05 | 50.00 | 694.43 | | 0.79 | | | 5.59 | | + | 187 | 2026-07-06 | 50.00 | 645.17 | | 0.74 | | | 4.85 | | + | 188 | 2026-07-07 | 50.00 | 595.86 | | 0.69 | | | 4.16 | | + | 189 | 2026-07-08 | 50.00 | 546.49 | | 0.64 | | | 3.52 | | + | 190 | 2026-07-09 | 50.00 | 497.08 | | 0.58 | | | 2.94 | | + | 191 | 2026-07-10 | 50.00 | 447.61 | | 0.53 | | | 2.41 | | + | 192 | 2026-07-11 | 50.00 | 398.08 | | 0.48 | | | 1.93 | | + | 193 | 2026-07-12 | 50.00 | 348.51 | | 0.43 | | | 1.50 | | + | 194 | 2026-07-13 | 50.00 | 298.88 | | 0.37 | | | 1.13 | | + | 195 | 2026-07-14 | 50.00 | 249.20 | | 0.32 | | | 0.81 | | + | 196 | 2026-07-15 | 50.00 | 199.47 | | 0.27 | | | 0.54 | | + | 197 | 2026-07-16 | 50.00 | 149.68 | | 0.21 | | | 0.33 | | + | 198 | 2026-07-17 | 50.00 | 99.84 | | 0.16 | | | 0.17 | | + | 199 | 2026-07-18 | 50.00 | 49.95 | | 0.11 | | | 0.06 | | + | 200 | 2026-07-19 | 50.00 | 0.00 | | 0.05 | | | 0.01 | | + When Admin sets the business date to "03 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 10000.0 | 50.0 | 100000.0 | 9.61 | 990.39 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee | 1000.0 | 1000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 02 January 2026 | Discount Fee Amortization | 9.61 | | | | false | + Then Working Capital Loan Transactions tab has a "DISCOUNT_FEE_AMORTIZATION" transaction with date "02 January 2026" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | INCOME | 404000 | Interest Income | | 9.61 | + | LIABILITY | 240005 | Deferred Interest Revenue | 9.61 | | + + Scenario: Discount amortization schedule with repayment on disbursement date and a later rate change starts the new rate on the rate change 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 900 | 100000 | 18 | | + Then Admin successfully approves the working capital loan on "01 January 2026" with "900" amount and expected disbursement date on "01 January 2026" + Then Admin successfully disburse the Working Capital loan on "01 January 2026" with "900" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + Then Admin successfully add discount with "100" amount on Working Capital loan account + And Customer makes repayment on "01 January 2026" with 50 transaction amount on Working Capital loan + When Admin sets the business date to "06 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Admin update Working Capital period payment rate with "17" value + And Admin retrieves the projected amortization schedule + Then The retrieved amortization schedule has the following summary fields: + | discountFeeAmount | netDisbursementAmount | totalPaymentVolume | periodPaymentRate | npvDayCount | expectedPaymentAmount | originalPaymentNumber | + | 100.00 | 900.00 | 100000.00 | 18 | 360 | 50.00 | 20 | + And The retrieved amortization schedule has payments with the following details: + | paymentNo | date | expectedPaymentAmount | expectedBalance | actualBalance | expectedAmortizationAmount | actualPaymentAmount | actualAmortizationAmount | expectedDiscountFeeBalance | actualDiscountFeeBalance | + | 0 | 2026-01-01 | -900.00 | 900.00 | 900.00 | | | | 100.00 | 100.00 | + | 1 | 2026-01-01 | 50.00 | 859.23 | 859.23 | 9.23 | 50.00 | 9.23 | 90.77 | 90.77 | + | 2 | 2026-01-02 | 50.00 | 818.03 | 859.23 | 8.81 | 0.00 | 0.00 | 81.96 | 90.77 | + | 3 | 2026-01-03 | 50.00 | 776.42 | 859.23 | 8.39 | 0.00 | 0.00 | 73.57 | 90.77 | + | 4 | 2026-01-04 | 50.00 | 734.38 | 859.23 | 7.96 | 0.00 | 0.00 | 65.61 | 90.77 | + | 5 | 2026-01-05 | 50.00 | 691.91 | 859.23 | 7.53 | 0.00 | 0.00 | 58.08 | 90.77 | + | 6 | 2026-01-06 | 47.22 | 640.52 | | -4.17 | | | 62.25 | | + | 7 | 2026-01-07 | 47.22 | 589.45 | | -3.86 | | | 66.11 | | + | 8 | 2026-01-08 | 47.22 | 538.68 | | -3.55 | | | 69.66 | | + | 9 | 2026-01-09 | 47.22 | 488.22 | | -3.24 | | | 72.90 | | + | 10 | 2026-01-10 | 47.22 | 438.06 | | -2.94 | | | 75.84 | | + | 11 | 2026-01-11 | 47.22 | 388.20 | | -2.64 | | | 78.48 | | + | 12 | 2026-01-12 | 47.22 | 338.65 | | -2.34 | | | 80.82 | | + | 13 | 2026-01-13 | 47.22 | 289.39 | | -2.04 | | | 82.86 | | + | 14 | 2026-01-14 | 47.22 | 240.42 | | -1.74 | | | 84.60 | | + | 15 | 2026-01-15 | 47.22 | 191.76 | | -1.45 | | | 86.05 | | + | 16 | 2026-01-16 | 47.22 | 143.38 | | -1.15 | | | 87.20 | | + | 17 | 2026-01-17 | 47.22 | 95.30 | | -0.86 | | | 88.06 | | + | 18 | 2026-01-18 | 47.22 | 47.51 | | -0.57 | | | 88.63 | | + | 19 | 2026-01-19 | 47.22 | 0.00 | | -0.29 | | | 88.92 | | + | 20 | 2026-01-20 | 47.22 | 0.00 | | 0.00 | | | 0.00 | | + | 21 | 2026-01-21 | 47.22 | 0.00 | | 0.00 | | | 0.00 | | + | 22 | 2026-01-22 | 47.22 | 0.00 | | 0.00 | | | 0.00 | | + | 23 | 2026-01-23 | 47.22 | 0.00 | | 0.00 | | | 0.00 | | + | 24 | 2026-01-24 | 47.22 | 0.00 | | 0.00 | | | 0.00 | | + | 25 | 2026-01-25 | 11.12 | 0.00 | | 0.00 | | | 0.00 | | + + Scenario: Discount amortization schedule with a repayment on the disbursement date and a later 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 900 | 100000 | 18 | | + Then Admin successfully approves the working capital loan on "01 January 2026" with "900" amount and expected disbursement date on "01 January 2026" + Then Admin successfully disburse the Working Capital loan on "01 January 2026" with "900" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + Then Admin successfully add discount with "100" amount on Working Capital loan account + And Customer makes repayment on "01 January 2026" with 50 transaction amount on Working Capital loan + 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 retrieves the projected amortization schedule + Then The retrieved amortization schedule has the following summary fields: + | discountFeeAmount | netDisbursementAmount | totalPaymentVolume | periodPaymentRate | npvDayCount | expectedPaymentAmount | originalPaymentNumber | + | 100.00 | 900.00 | 100000.00 | 18 | 360 | 50.00 | 20 | + And The retrieved amortization schedule has payments with the following details: + | paymentNo | date | expectedPaymentAmount | expectedBalance | actualBalance | expectedAmortizationAmount | actualPaymentAmount | actualAmortizationAmount | expectedDiscountFeeBalance | actualDiscountFeeBalance | + | 0 | 2026-01-01 | -900.00 | 900.00 | 900.00 | | | | 100.00 | 100.00 | + | 1 | 2026-01-01 | 50.00 | 859.23 | 859.23 | 9.23 | 50.00 | 9.23 | 90.77 | 90.77 | + | 2 | 2026-01-02 | 50.00 | 818.03 | 818.03 | 8.81 | 50.00 | 8.81 | 81.96 | 81.96 | + | 3 | 2026-01-03 | 50.00 | 776.42 | | 8.39 | | | 73.57 | | + | 4 | 2026-01-04 | 50.00 | 734.38 | | 7.96 | | | 65.61 | | + | 5 | 2026-01-05 | 50.00 | 691.91 | | 7.53 | | | 58.08 | | + | 6 | 2026-01-06 | 50.00 | 649.00 | | 7.09 | | | 50.99 | | + | 7 | 2026-01-07 | 50.00 | 605.65 | | 6.65 | | | 44.34 | | + | 8 | 2026-01-08 | 50.00 | 561.86 | | 6.21 | | | 38.13 | | + | 9 | 2026-01-09 | 50.00 | 517.62 | | 5.76 | | | 32.37 | | + | 10 | 2026-01-10 | 50.00 | 472.93 | | 5.31 | | | 27.06 | | + | 11 | 2026-01-11 | 50.00 | 427.78 | | 4.85 | | | 22.21 | | + | 12 | 2026-01-12 | 50.00 | 382.16 | | 4.39 | | | 17.82 | | + | 13 | 2026-01-13 | 50.00 | 336.08 | | 3.92 | | | 13.90 | | + | 14 | 2026-01-14 | 50.00 | 289.52 | | 3.45 | | | 10.45 | | + | 15 | 2026-01-15 | 50.00 | 242.49 | | 2.97 | | | 7.48 | | + | 16 | 2026-01-16 | 50.00 | 194.98 | | 2.49 | | | 4.99 | | + | 17 | 2026-01-17 | 50.00 | 146.98 | | 2.00 | | | 2.99 | | + | 18 | 2026-01-18 | 50.00 | 98.48 | | 1.51 | | | 1.48 | | + | 19 | 2026-01-19 | 50.00 | 49.49 | | 1.01 | | | 0.47 | | + | 20 | 2026-01-20 | 50.00 | 0.00 | | 0.51 | | | -0.04 | | diff --git a/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalLoanRepayment.feature b/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalLoanRepayment.feature index 91ad2b82fb2..6b3a864a265 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalLoanRepayment.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalLoanRepayment.feature @@ -531,186 +531,186 @@ Feature: Working Capital Loan Repayment Then Working Capital loan amortization schedule has 181 periods, with the following data for periods: | paymentNo | paymentDate | expectedPaymentAmount | actualPaymentAmount | expectedBalance | actualBalance | expectedAmortizationAmount | actualAmortizationAmount | expectedDiscountFeeBalance | | 0 | 01 January 2026 | -9000.00 | | 9000.00 | 9000.00 | | | 0.00 | - | 1 | 02 January 2026 | 50.00 | 50.00 | 8950.00 | 8950.00 | 0.00 | 0.00 | 0.00 | - | 2 | 03 January 2026 | 50.00 | | 8900.00 | | 0.00 | | 0.00 | - | 3 | 04 January 2026 | 50.00 | | 8850.00 | | 0.00 | | 0.00 | - | 4 | 05 January 2026 | 50.00 | | 8800.00 | | 0.00 | | 0.00 | - | 5 | 06 January 2026 | 50.00 | | 8750.00 | | 0.00 | | 0.00 | - | 6 | 07 January 2026 | 50.00 | | 8700.00 | | 0.00 | | 0.00 | - | 7 | 08 January 2026 | 50.00 | | 8650.00 | | 0.00 | | 0.00 | - | 8 | 09 January 2026 | 50.00 | | 8600.00 | | 0.00 | | 0.00 | - | 9 | 10 January 2026 | 50.00 | | 8550.00 | | 0.00 | | 0.00 | - | 10 | 11 January 2026 | 50.00 | | 8500.00 | | 0.00 | | 0.00 | - | 11 | 12 January 2026 | 50.00 | | 8450.00 | | 0.00 | | 0.00 | - | 12 | 13 January 2026 | 50.00 | | 8400.00 | | 0.00 | | 0.00 | - | 13 | 14 January 2026 | 50.00 | | 8350.00 | | 0.00 | | 0.00 | - | 14 | 15 January 2026 | 50.00 | | 8300.00 | | 0.00 | | 0.00 | - | 15 | 16 January 2026 | 50.00 | | 8250.00 | | 0.00 | | 0.00 | - | 16 | 17 January 2026 | 50.00 | | 8200.00 | | 0.00 | | 0.00 | - | 17 | 18 January 2026 | 50.00 | | 8150.00 | | 0.00 | | 0.00 | - | 18 | 19 January 2026 | 50.00 | | 8100.00 | | 0.00 | | 0.00 | - | 19 | 20 January 2026 | 50.00 | | 8050.00 | | 0.00 | | 0.00 | - | 20 | 21 January 2026 | 50.00 | | 8000.00 | | 0.00 | | 0.00 | - | 21 | 22 January 2026 | 50.00 | | 7950.00 | | 0.00 | | 0.00 | - | 22 | 23 January 2026 | 50.00 | | 7900.00 | | 0.00 | | 0.00 | - | 23 | 24 January 2026 | 50.00 | | 7850.00 | | 0.00 | | 0.00 | - | 24 | 25 January 2026 | 50.00 | | 7800.00 | | 0.00 | | 0.00 | - | 25 | 26 January 2026 | 50.00 | | 7750.00 | | 0.00 | | 0.00 | - | 26 | 27 January 2026 | 50.00 | | 7700.00 | | 0.00 | | 0.00 | - | 27 | 28 January 2026 | 50.00 | | 7650.00 | | 0.00 | | 0.00 | - | 28 | 29 January 2026 | 50.00 | | 7600.00 | | 0.00 | | 0.00 | - | 29 | 30 January 2026 | 50.00 | | 7550.00 | | 0.00 | | 0.00 | - | 30 | 31 January 2026 | 50.00 | | 7500.00 | | 0.00 | | 0.00 | - | 31 | 01 February 2026 | 50.00 | | 7450.00 | | 0.00 | | 0.00 | - | 32 | 02 February 2026 | 50.00 | | 7400.00 | | 0.00 | | 0.00 | - | 33 | 03 February 2026 | 50.00 | | 7350.00 | | 0.00 | | 0.00 | - | 34 | 04 February 2026 | 50.00 | | 7300.00 | | 0.00 | | 0.00 | - | 35 | 05 February 2026 | 50.00 | | 7250.00 | | 0.00 | | 0.00 | - | 36 | 06 February 2026 | 50.00 | | 7200.00 | | 0.00 | | 0.00 | - | 37 | 07 February 2026 | 50.00 | | 7150.00 | | 0.00 | | 0.00 | - | 38 | 08 February 2026 | 50.00 | | 7100.00 | | 0.00 | | 0.00 | - | 39 | 09 February 2026 | 50.00 | | 7050.00 | | 0.00 | | 0.00 | - | 40 | 10 February 2026 | 50.00 | | 7000.00 | | 0.00 | | 0.00 | - | 41 | 11 February 2026 | 50.00 | | 6950.00 | | 0.00 | | 0.00 | - | 42 | 12 February 2026 | 50.00 | | 6900.00 | | 0.00 | | 0.00 | - | 43 | 13 February 2026 | 50.00 | | 6850.00 | | 0.00 | | 0.00 | - | 44 | 14 February 2026 | 50.00 | | 6800.00 | | 0.00 | | 0.00 | - | 45 | 15 February 2026 | 50.00 | | 6750.00 | | 0.00 | | 0.00 | - | 46 | 16 February 2026 | 50.00 | | 6700.00 | | 0.00 | | 0.00 | - | 47 | 17 February 2026 | 50.00 | | 6650.00 | | 0.00 | | 0.00 | - | 48 | 18 February 2026 | 50.00 | | 6600.00 | | 0.00 | | 0.00 | - | 49 | 19 February 2026 | 50.00 | | 6550.00 | | 0.00 | | 0.00 | - | 50 | 20 February 2026 | 50.00 | | 6500.00 | | 0.00 | | 0.00 | - | 51 | 21 February 2026 | 50.00 | | 6450.00 | | 0.00 | | 0.00 | - | 52 | 22 February 2026 | 50.00 | | 6400.00 | | 0.00 | | 0.00 | - | 53 | 23 February 2026 | 50.00 | | 6350.00 | | 0.00 | | 0.00 | - | 54 | 24 February 2026 | 50.00 | | 6300.00 | | 0.00 | | 0.00 | - | 55 | 25 February 2026 | 50.00 | | 6250.00 | | 0.00 | | 0.00 | - | 56 | 26 February 2026 | 50.00 | | 6200.00 | | 0.00 | | 0.00 | - | 57 | 27 February 2026 | 50.00 | | 6150.00 | | 0.00 | | 0.00 | - | 58 | 28 February 2026 | 50.00 | | 6100.00 | | 0.00 | | 0.00 | - | 59 | 01 March 2026 | 50.00 | | 6050.00 | | 0.00 | | 0.00 | - | 60 | 02 March 2026 | 50.00 | | 6000.00 | | 0.00 | | 0.00 | - | 61 | 03 March 2026 | 50.00 | | 5950.00 | | 0.00 | | 0.00 | - | 62 | 04 March 2026 | 50.00 | | 5900.00 | | 0.00 | | 0.00 | - | 63 | 05 March 2026 | 50.00 | | 5850.00 | | 0.00 | | 0.00 | - | 64 | 06 March 2026 | 50.00 | | 5800.00 | | 0.00 | | 0.00 | - | 65 | 07 March 2026 | 50.00 | | 5750.00 | | 0.00 | | 0.00 | - | 66 | 08 March 2026 | 50.00 | | 5700.00 | | 0.00 | | 0.00 | - | 67 | 09 March 2026 | 50.00 | | 5650.00 | | 0.00 | | 0.00 | - | 68 | 10 March 2026 | 50.00 | | 5600.00 | | 0.00 | | 0.00 | - | 69 | 11 March 2026 | 50.00 | | 5550.00 | | 0.00 | | 0.00 | - | 70 | 12 March 2026 | 50.00 | | 5500.00 | | 0.00 | | 0.00 | - | 71 | 13 March 2026 | 50.00 | | 5450.00 | | 0.00 | | 0.00 | - | 72 | 14 March 2026 | 50.00 | | 5400.00 | | 0.00 | | 0.00 | - | 73 | 15 March 2026 | 50.00 | | 5350.00 | | 0.00 | | 0.00 | - | 74 | 16 March 2026 | 50.00 | | 5300.00 | | 0.00 | | 0.00 | - | 75 | 17 March 2026 | 50.00 | | 5250.00 | | 0.00 | | 0.00 | - | 76 | 18 March 2026 | 50.00 | | 5200.00 | | 0.00 | | 0.00 | - | 77 | 19 March 2026 | 50.00 | | 5150.00 | | 0.00 | | 0.00 | - | 78 | 20 March 2026 | 50.00 | | 5100.00 | | 0.00 | | 0.00 | - | 79 | 21 March 2026 | 50.00 | | 5050.00 | | 0.00 | | 0.00 | - | 80 | 22 March 2026 | 50.00 | | 5000.00 | | 0.00 | | 0.00 | - | 81 | 23 March 2026 | 50.00 | | 4950.00 | | 0.00 | | 0.00 | - | 82 | 24 March 2026 | 50.00 | | 4900.00 | | 0.00 | | 0.00 | - | 83 | 25 March 2026 | 50.00 | | 4850.00 | | 0.00 | | 0.00 | - | 84 | 26 March 2026 | 50.00 | | 4800.00 | | 0.00 | | 0.00 | - | 85 | 27 March 2026 | 50.00 | | 4750.00 | | 0.00 | | 0.00 | - | 86 | 28 March 2026 | 50.00 | | 4700.00 | | 0.00 | | 0.00 | - | 87 | 29 March 2026 | 50.00 | | 4650.00 | | 0.00 | | 0.00 | - | 88 | 30 March 2026 | 50.00 | | 4600.00 | | 0.00 | | 0.00 | - | 89 | 31 March 2026 | 50.00 | | 4550.00 | | 0.00 | | 0.00 | - | 90 | 01 April 2026 | 50.00 | | 4500.00 | | 0.00 | | 0.00 | - | 91 | 02 April 2026 | 50.00 | | 4450.00 | | 0.00 | | 0.00 | - | 92 | 03 April 2026 | 50.00 | | 4400.00 | | 0.00 | | 0.00 | - | 93 | 04 April 2026 | 50.00 | | 4350.00 | | 0.00 | | 0.00 | - | 94 | 05 April 2026 | 50.00 | | 4300.00 | | 0.00 | | 0.00 | - | 95 | 06 April 2026 | 50.00 | | 4250.00 | | 0.00 | | 0.00 | - | 96 | 07 April 2026 | 50.00 | | 4200.00 | | 0.00 | | 0.00 | - | 97 | 08 April 2026 | 50.00 | | 4150.00 | | 0.00 | | 0.00 | - | 98 | 09 April 2026 | 50.00 | | 4100.00 | | 0.00 | | 0.00 | - | 99 | 10 April 2026 | 50.00 | | 4050.00 | | 0.00 | | 0.00 | - | 100 | 11 April 2026 | 50.00 | | 4000.00 | | 0.00 | | 0.00 | - | 101 | 12 April 2026 | 50.00 | | 3950.00 | | 0.00 | | 0.00 | - | 102 | 13 April 2026 | 50.00 | | 3900.00 | | 0.00 | | 0.00 | - | 103 | 14 April 2026 | 50.00 | | 3850.00 | | 0.00 | | 0.00 | - | 104 | 15 April 2026 | 50.00 | | 3800.00 | | 0.00 | | 0.00 | - | 105 | 16 April 2026 | 50.00 | | 3750.00 | | 0.00 | | 0.00 | - | 106 | 17 April 2026 | 50.00 | | 3700.00 | | 0.00 | | 0.00 | - | 107 | 18 April 2026 | 50.00 | | 3650.00 | | 0.00 | | 0.00 | - | 108 | 19 April 2026 | 50.00 | | 3600.00 | | 0.00 | | 0.00 | - | 109 | 20 April 2026 | 50.00 | | 3550.00 | | 0.00 | | 0.00 | - | 110 | 21 April 2026 | 50.00 | | 3500.00 | | 0.00 | | 0.00 | - | 111 | 22 April 2026 | 50.00 | | 3450.00 | | 0.00 | | 0.00 | - | 112 | 23 April 2026 | 50.00 | | 3400.00 | | 0.00 | | 0.00 | - | 113 | 24 April 2026 | 50.00 | | 3350.00 | | 0.00 | | 0.00 | - | 114 | 25 April 2026 | 50.00 | | 3300.00 | | 0.00 | | 0.00 | - | 115 | 26 April 2026 | 50.00 | | 3250.00 | | 0.00 | | 0.00 | - | 116 | 27 April 2026 | 50.00 | | 3200.00 | | 0.00 | | 0.00 | - | 117 | 28 April 2026 | 50.00 | | 3150.00 | | 0.00 | | 0.00 | - | 118 | 29 April 2026 | 50.00 | | 3100.00 | | 0.00 | | 0.00 | - | 119 | 30 April 2026 | 50.00 | | 3050.00 | | 0.00 | | 0.00 | - | 120 | 01 May 2026 | 50.00 | | 3000.00 | | 0.00 | | 0.00 | - | 121 | 02 May 2026 | 50.00 | | 2950.00 | | 0.00 | | 0.00 | - | 122 | 03 May 2026 | 50.00 | | 2900.00 | | 0.00 | | 0.00 | - | 123 | 04 May 2026 | 50.00 | | 2850.00 | | 0.00 | | 0.00 | - | 124 | 05 May 2026 | 50.00 | | 2800.00 | | 0.00 | | 0.00 | - | 125 | 06 May 2026 | 50.00 | | 2750.00 | | 0.00 | | 0.00 | - | 126 | 07 May 2026 | 50.00 | | 2700.00 | | 0.00 | | 0.00 | - | 127 | 08 May 2026 | 50.00 | | 2650.00 | | 0.00 | | 0.00 | - | 128 | 09 May 2026 | 50.00 | | 2600.00 | | 0.00 | | 0.00 | - | 129 | 10 May 2026 | 50.00 | | 2550.00 | | 0.00 | | 0.00 | - | 130 | 11 May 2026 | 50.00 | | 2500.00 | | 0.00 | | 0.00 | - | 131 | 12 May 2026 | 50.00 | | 2450.00 | | 0.00 | | 0.00 | - | 132 | 13 May 2026 | 50.00 | | 2400.00 | | 0.00 | | 0.00 | - | 133 | 14 May 2026 | 50.00 | | 2350.00 | | 0.00 | | 0.00 | - | 134 | 15 May 2026 | 50.00 | | 2300.00 | | 0.00 | | 0.00 | - | 135 | 16 May 2026 | 50.00 | | 2250.00 | | 0.00 | | 0.00 | - | 136 | 17 May 2026 | 50.00 | | 2200.00 | | 0.00 | | 0.00 | - | 137 | 18 May 2026 | 50.00 | | 2150.00 | | 0.00 | | 0.00 | - | 138 | 19 May 2026 | 50.00 | | 2100.00 | | 0.00 | | 0.00 | - | 139 | 20 May 2026 | 50.00 | | 2050.00 | | 0.00 | | 0.00 | - | 140 | 21 May 2026 | 50.00 | | 2000.00 | | 0.00 | | 0.00 | - | 141 | 22 May 2026 | 50.00 | | 1950.00 | | 0.00 | | 0.00 | - | 142 | 23 May 2026 | 50.00 | | 1900.00 | | 0.00 | | 0.00 | - | 143 | 24 May 2026 | 50.00 | | 1850.00 | | 0.00 | | 0.00 | - | 144 | 25 May 2026 | 50.00 | | 1800.00 | | 0.00 | | 0.00 | - | 145 | 26 May 2026 | 50.00 | | 1750.00 | | 0.00 | | 0.00 | - | 146 | 27 May 2026 | 50.00 | | 1700.00 | | 0.00 | | 0.00 | - | 147 | 28 May 2026 | 50.00 | | 1650.00 | | 0.00 | | 0.00 | - | 148 | 29 May 2026 | 50.00 | | 1600.00 | | 0.00 | | 0.00 | - | 149 | 30 May 2026 | 50.00 | | 1550.00 | | 0.00 | | 0.00 | - | 150 | 31 May 2026 | 50.00 | | 1500.00 | | 0.00 | | 0.00 | - | 151 | 01 June 2026 | 50.00 | | 1450.00 | | 0.00 | | 0.00 | - | 152 | 02 June 2026 | 50.00 | | 1400.00 | | 0.00 | | 0.00 | - | 153 | 03 June 2026 | 50.00 | | 1350.00 | | 0.00 | | 0.00 | - | 154 | 04 June 2026 | 50.00 | | 1300.00 | | 0.00 | | 0.00 | - | 155 | 05 June 2026 | 50.00 | | 1250.00 | | 0.00 | | 0.00 | - | 156 | 06 June 2026 | 50.00 | | 1200.00 | | 0.00 | | 0.00 | - | 157 | 07 June 2026 | 50.00 | | 1150.00 | | 0.00 | | 0.00 | - | 158 | 08 June 2026 | 50.00 | | 1100.00 | | 0.00 | | 0.00 | - | 159 | 09 June 2026 | 50.00 | | 1050.00 | | 0.00 | | 0.00 | - | 160 | 10 June 2026 | 50.00 | | 1000.00 | | 0.00 | | 0.00 | - | 161 | 11 June 2026 | 50.00 | | 950.00 | | 0.00 | | 0.00 | - | 162 | 12 June 2026 | 50.00 | | 900.00 | | 0.00 | | 0.00 | - | 163 | 13 June 2026 | 50.00 | | 850.00 | | 0.00 | | 0.00 | - | 164 | 14 June 2026 | 50.00 | | 800.00 | | 0.00 | | 0.00 | - | 165 | 15 June 2026 | 50.00 | | 750.00 | | 0.00 | | 0.00 | - | 166 | 16 June 2026 | 50.00 | | 700.00 | | 0.00 | | 0.00 | - | 167 | 17 June 2026 | 50.00 | | 650.00 | | 0.00 | | 0.00 | - | 168 | 18 June 2026 | 50.00 | | 600.00 | | 0.00 | | 0.00 | - | 169 | 19 June 2026 | 50.00 | | 550.00 | | 0.00 | | 0.00 | - | 170 | 20 June 2026 | 50.00 | | 500.00 | | 0.00 | | 0.00 | - | 171 | 21 June 2026 | 50.00 | | 450.00 | | 0.00 | | 0.00 | - | 172 | 22 June 2026 | 50.00 | | 400.00 | | 0.00 | | 0.00 | - | 173 | 23 June 2026 | 50.00 | | 350.00 | | 0.00 | | 0.00 | - | 174 | 24 June 2026 | 50.00 | | 300.00 | | 0.00 | | 0.00 | - | 175 | 25 June 2026 | 50.00 | | 250.00 | | 0.00 | | 0.00 | - | 176 | 26 June 2026 | 50.00 | | 200.00 | | 0.00 | | 0.00 | - | 177 | 27 June 2026 | 50.00 | | 150.00 | | 0.00 | | 0.00 | - | 178 | 28 June 2026 | 50.00 | | 100.00 | | 0.00 | | 0.00 | - | 179 | 29 June 2026 | 50.00 | | 50.00 | | 0.00 | | 0.00 | - | 180 | 30 June 2026 | 50.00 | | 0.00 | | 0.00 | | 0.00 | + | 1 | 01 January 2026 | 50.00 | 50.00 | 8950.00 | 8950.00 | 0.00 | 0.00 | 0.00 | + | 2 | 02 January 2026 | 50.00 | | 8900.00 | | 0.00 | | 0.00 | + | 3 | 03 January 2026 | 50.00 | | 8850.00 | | 0.00 | | 0.00 | + | 4 | 04 January 2026 | 50.00 | | 8800.00 | | 0.00 | | 0.00 | + | 5 | 05 January 2026 | 50.00 | | 8750.00 | | 0.00 | | 0.00 | + | 6 | 06 January 2026 | 50.00 | | 8700.00 | | 0.00 | | 0.00 | + | 7 | 07 January 2026 | 50.00 | | 8650.00 | | 0.00 | | 0.00 | + | 8 | 08 January 2026 | 50.00 | | 8600.00 | | 0.00 | | 0.00 | + | 9 | 09 January 2026 | 50.00 | | 8550.00 | | 0.00 | | 0.00 | + | 10 | 10 January 2026 | 50.00 | | 8500.00 | | 0.00 | | 0.00 | + | 11 | 11 January 2026 | 50.00 | | 8450.00 | | 0.00 | | 0.00 | + | 12 | 12 January 2026 | 50.00 | | 8400.00 | | 0.00 | | 0.00 | + | 13 | 13 January 2026 | 50.00 | | 8350.00 | | 0.00 | | 0.00 | + | 14 | 14 January 2026 | 50.00 | | 8300.00 | | 0.00 | | 0.00 | + | 15 | 15 January 2026 | 50.00 | | 8250.00 | | 0.00 | | 0.00 | + | 16 | 16 January 2026 | 50.00 | | 8200.00 | | 0.00 | | 0.00 | + | 17 | 17 January 2026 | 50.00 | | 8150.00 | | 0.00 | | 0.00 | + | 18 | 18 January 2026 | 50.00 | | 8100.00 | | 0.00 | | 0.00 | + | 19 | 19 January 2026 | 50.00 | | 8050.00 | | 0.00 | | 0.00 | + | 20 | 20 January 2026 | 50.00 | | 8000.00 | | 0.00 | | 0.00 | + | 21 | 21 January 2026 | 50.00 | | 7950.00 | | 0.00 | | 0.00 | + | 22 | 22 January 2026 | 50.00 | | 7900.00 | | 0.00 | | 0.00 | + | 23 | 23 January 2026 | 50.00 | | 7850.00 | | 0.00 | | 0.00 | + | 24 | 24 January 2026 | 50.00 | | 7800.00 | | 0.00 | | 0.00 | + | 25 | 25 January 2026 | 50.00 | | 7750.00 | | 0.00 | | 0.00 | + | 26 | 26 January 2026 | 50.00 | | 7700.00 | | 0.00 | | 0.00 | + | 27 | 27 January 2026 | 50.00 | | 7650.00 | | 0.00 | | 0.00 | + | 28 | 28 January 2026 | 50.00 | | 7600.00 | | 0.00 | | 0.00 | + | 29 | 29 January 2026 | 50.00 | | 7550.00 | | 0.00 | | 0.00 | + | 30 | 30 January 2026 | 50.00 | | 7500.00 | | 0.00 | | 0.00 | + | 31 | 31 January 2026 | 50.00 | | 7450.00 | | 0.00 | | 0.00 | + | 32 | 01 February 2026 | 50.00 | | 7400.00 | | 0.00 | | 0.00 | + | 33 | 02 February 2026 | 50.00 | | 7350.00 | | 0.00 | | 0.00 | + | 34 | 03 February 2026 | 50.00 | | 7300.00 | | 0.00 | | 0.00 | + | 35 | 04 February 2026 | 50.00 | | 7250.00 | | 0.00 | | 0.00 | + | 36 | 05 February 2026 | 50.00 | | 7200.00 | | 0.00 | | 0.00 | + | 37 | 06 February 2026 | 50.00 | | 7150.00 | | 0.00 | | 0.00 | + | 38 | 07 February 2026 | 50.00 | | 7100.00 | | 0.00 | | 0.00 | + | 39 | 08 February 2026 | 50.00 | | 7050.00 | | 0.00 | | 0.00 | + | 40 | 09 February 2026 | 50.00 | | 7000.00 | | 0.00 | | 0.00 | + | 41 | 10 February 2026 | 50.00 | | 6950.00 | | 0.00 | | 0.00 | + | 42 | 11 February 2026 | 50.00 | | 6900.00 | | 0.00 | | 0.00 | + | 43 | 12 February 2026 | 50.00 | | 6850.00 | | 0.00 | | 0.00 | + | 44 | 13 February 2026 | 50.00 | | 6800.00 | | 0.00 | | 0.00 | + | 45 | 14 February 2026 | 50.00 | | 6750.00 | | 0.00 | | 0.00 | + | 46 | 15 February 2026 | 50.00 | | 6700.00 | | 0.00 | | 0.00 | + | 47 | 16 February 2026 | 50.00 | | 6650.00 | | 0.00 | | 0.00 | + | 48 | 17 February 2026 | 50.00 | | 6600.00 | | 0.00 | | 0.00 | + | 49 | 18 February 2026 | 50.00 | | 6550.00 | | 0.00 | | 0.00 | + | 50 | 19 February 2026 | 50.00 | | 6500.00 | | 0.00 | | 0.00 | + | 51 | 20 February 2026 | 50.00 | | 6450.00 | | 0.00 | | 0.00 | + | 52 | 21 February 2026 | 50.00 | | 6400.00 | | 0.00 | | 0.00 | + | 53 | 22 February 2026 | 50.00 | | 6350.00 | | 0.00 | | 0.00 | + | 54 | 23 February 2026 | 50.00 | | 6300.00 | | 0.00 | | 0.00 | + | 55 | 24 February 2026 | 50.00 | | 6250.00 | | 0.00 | | 0.00 | + | 56 | 25 February 2026 | 50.00 | | 6200.00 | | 0.00 | | 0.00 | + | 57 | 26 February 2026 | 50.00 | | 6150.00 | | 0.00 | | 0.00 | + | 58 | 27 February 2026 | 50.00 | | 6100.00 | | 0.00 | | 0.00 | + | 59 | 28 February 2026 | 50.00 | | 6050.00 | | 0.00 | | 0.00 | + | 60 | 01 March 2026 | 50.00 | | 6000.00 | | 0.00 | | 0.00 | + | 61 | 02 March 2026 | 50.00 | | 5950.00 | | 0.00 | | 0.00 | + | 62 | 03 March 2026 | 50.00 | | 5900.00 | | 0.00 | | 0.00 | + | 63 | 04 March 2026 | 50.00 | | 5850.00 | | 0.00 | | 0.00 | + | 64 | 05 March 2026 | 50.00 | | 5800.00 | | 0.00 | | 0.00 | + | 65 | 06 March 2026 | 50.00 | | 5750.00 | | 0.00 | | 0.00 | + | 66 | 07 March 2026 | 50.00 | | 5700.00 | | 0.00 | | 0.00 | + | 67 | 08 March 2026 | 50.00 | | 5650.00 | | 0.00 | | 0.00 | + | 68 | 09 March 2026 | 50.00 | | 5600.00 | | 0.00 | | 0.00 | + | 69 | 10 March 2026 | 50.00 | | 5550.00 | | 0.00 | | 0.00 | + | 70 | 11 March 2026 | 50.00 | | 5500.00 | | 0.00 | | 0.00 | + | 71 | 12 March 2026 | 50.00 | | 5450.00 | | 0.00 | | 0.00 | + | 72 | 13 March 2026 | 50.00 | | 5400.00 | | 0.00 | | 0.00 | + | 73 | 14 March 2026 | 50.00 | | 5350.00 | | 0.00 | | 0.00 | + | 74 | 15 March 2026 | 50.00 | | 5300.00 | | 0.00 | | 0.00 | + | 75 | 16 March 2026 | 50.00 | | 5250.00 | | 0.00 | | 0.00 | + | 76 | 17 March 2026 | 50.00 | | 5200.00 | | 0.00 | | 0.00 | + | 77 | 18 March 2026 | 50.00 | | 5150.00 | | 0.00 | | 0.00 | + | 78 | 19 March 2026 | 50.00 | | 5100.00 | | 0.00 | | 0.00 | + | 79 | 20 March 2026 | 50.00 | | 5050.00 | | 0.00 | | 0.00 | + | 80 | 21 March 2026 | 50.00 | | 5000.00 | | 0.00 | | 0.00 | + | 81 | 22 March 2026 | 50.00 | | 4950.00 | | 0.00 | | 0.00 | + | 82 | 23 March 2026 | 50.00 | | 4900.00 | | 0.00 | | 0.00 | + | 83 | 24 March 2026 | 50.00 | | 4850.00 | | 0.00 | | 0.00 | + | 84 | 25 March 2026 | 50.00 | | 4800.00 | | 0.00 | | 0.00 | + | 85 | 26 March 2026 | 50.00 | | 4750.00 | | 0.00 | | 0.00 | + | 86 | 27 March 2026 | 50.00 | | 4700.00 | | 0.00 | | 0.00 | + | 87 | 28 March 2026 | 50.00 | | 4650.00 | | 0.00 | | 0.00 | + | 88 | 29 March 2026 | 50.00 | | 4600.00 | | 0.00 | | 0.00 | + | 89 | 30 March 2026 | 50.00 | | 4550.00 | | 0.00 | | 0.00 | + | 90 | 31 March 2026 | 50.00 | | 4500.00 | | 0.00 | | 0.00 | + | 91 | 01 April 2026 | 50.00 | | 4450.00 | | 0.00 | | 0.00 | + | 92 | 02 April 2026 | 50.00 | | 4400.00 | | 0.00 | | 0.00 | + | 93 | 03 April 2026 | 50.00 | | 4350.00 | | 0.00 | | 0.00 | + | 94 | 04 April 2026 | 50.00 | | 4300.00 | | 0.00 | | 0.00 | + | 95 | 05 April 2026 | 50.00 | | 4250.00 | | 0.00 | | 0.00 | + | 96 | 06 April 2026 | 50.00 | | 4200.00 | | 0.00 | | 0.00 | + | 97 | 07 April 2026 | 50.00 | | 4150.00 | | 0.00 | | 0.00 | + | 98 | 08 April 2026 | 50.00 | | 4100.00 | | 0.00 | | 0.00 | + | 99 | 09 April 2026 | 50.00 | | 4050.00 | | 0.00 | | 0.00 | + | 100 | 10 April 2026 | 50.00 | | 4000.00 | | 0.00 | | 0.00 | + | 101 | 11 April 2026 | 50.00 | | 3950.00 | | 0.00 | | 0.00 | + | 102 | 12 April 2026 | 50.00 | | 3900.00 | | 0.00 | | 0.00 | + | 103 | 13 April 2026 | 50.00 | | 3850.00 | | 0.00 | | 0.00 | + | 104 | 14 April 2026 | 50.00 | | 3800.00 | | 0.00 | | 0.00 | + | 105 | 15 April 2026 | 50.00 | | 3750.00 | | 0.00 | | 0.00 | + | 106 | 16 April 2026 | 50.00 | | 3700.00 | | 0.00 | | 0.00 | + | 107 | 17 April 2026 | 50.00 | | 3650.00 | | 0.00 | | 0.00 | + | 108 | 18 April 2026 | 50.00 | | 3600.00 | | 0.00 | | 0.00 | + | 109 | 19 April 2026 | 50.00 | | 3550.00 | | 0.00 | | 0.00 | + | 110 | 20 April 2026 | 50.00 | | 3500.00 | | 0.00 | | 0.00 | + | 111 | 21 April 2026 | 50.00 | | 3450.00 | | 0.00 | | 0.00 | + | 112 | 22 April 2026 | 50.00 | | 3400.00 | | 0.00 | | 0.00 | + | 113 | 23 April 2026 | 50.00 | | 3350.00 | | 0.00 | | 0.00 | + | 114 | 24 April 2026 | 50.00 | | 3300.00 | | 0.00 | | 0.00 | + | 115 | 25 April 2026 | 50.00 | | 3250.00 | | 0.00 | | 0.00 | + | 116 | 26 April 2026 | 50.00 | | 3200.00 | | 0.00 | | 0.00 | + | 117 | 27 April 2026 | 50.00 | | 3150.00 | | 0.00 | | 0.00 | + | 118 | 28 April 2026 | 50.00 | | 3100.00 | | 0.00 | | 0.00 | + | 119 | 29 April 2026 | 50.00 | | 3050.00 | | 0.00 | | 0.00 | + | 120 | 30 April 2026 | 50.00 | | 3000.00 | | 0.00 | | 0.00 | + | 121 | 01 May 2026 | 50.00 | | 2950.00 | | 0.00 | | 0.00 | + | 122 | 02 May 2026 | 50.00 | | 2900.00 | | 0.00 | | 0.00 | + | 123 | 03 May 2026 | 50.00 | | 2850.00 | | 0.00 | | 0.00 | + | 124 | 04 May 2026 | 50.00 | | 2800.00 | | 0.00 | | 0.00 | + | 125 | 05 May 2026 | 50.00 | | 2750.00 | | 0.00 | | 0.00 | + | 126 | 06 May 2026 | 50.00 | | 2700.00 | | 0.00 | | 0.00 | + | 127 | 07 May 2026 | 50.00 | | 2650.00 | | 0.00 | | 0.00 | + | 128 | 08 May 2026 | 50.00 | | 2600.00 | | 0.00 | | 0.00 | + | 129 | 09 May 2026 | 50.00 | | 2550.00 | | 0.00 | | 0.00 | + | 130 | 10 May 2026 | 50.00 | | 2500.00 | | 0.00 | | 0.00 | + | 131 | 11 May 2026 | 50.00 | | 2450.00 | | 0.00 | | 0.00 | + | 132 | 12 May 2026 | 50.00 | | 2400.00 | | 0.00 | | 0.00 | + | 133 | 13 May 2026 | 50.00 | | 2350.00 | | 0.00 | | 0.00 | + | 134 | 14 May 2026 | 50.00 | | 2300.00 | | 0.00 | | 0.00 | + | 135 | 15 May 2026 | 50.00 | | 2250.00 | | 0.00 | | 0.00 | + | 136 | 16 May 2026 | 50.00 | | 2200.00 | | 0.00 | | 0.00 | + | 137 | 17 May 2026 | 50.00 | | 2150.00 | | 0.00 | | 0.00 | + | 138 | 18 May 2026 | 50.00 | | 2100.00 | | 0.00 | | 0.00 | + | 139 | 19 May 2026 | 50.00 | | 2050.00 | | 0.00 | | 0.00 | + | 140 | 20 May 2026 | 50.00 | | 2000.00 | | 0.00 | | 0.00 | + | 141 | 21 May 2026 | 50.00 | | 1950.00 | | 0.00 | | 0.00 | + | 142 | 22 May 2026 | 50.00 | | 1900.00 | | 0.00 | | 0.00 | + | 143 | 23 May 2026 | 50.00 | | 1850.00 | | 0.00 | | 0.00 | + | 144 | 24 May 2026 | 50.00 | | 1800.00 | | 0.00 | | 0.00 | + | 145 | 25 May 2026 | 50.00 | | 1750.00 | | 0.00 | | 0.00 | + | 146 | 26 May 2026 | 50.00 | | 1700.00 | | 0.00 | | 0.00 | + | 147 | 27 May 2026 | 50.00 | | 1650.00 | | 0.00 | | 0.00 | + | 148 | 28 May 2026 | 50.00 | | 1600.00 | | 0.00 | | 0.00 | + | 149 | 29 May 2026 | 50.00 | | 1550.00 | | 0.00 | | 0.00 | + | 150 | 30 May 2026 | 50.00 | | 1500.00 | | 0.00 | | 0.00 | + | 151 | 31 May 2026 | 50.00 | | 1450.00 | | 0.00 | | 0.00 | + | 152 | 01 June 2026 | 50.00 | | 1400.00 | | 0.00 | | 0.00 | + | 153 | 02 June 2026 | 50.00 | | 1350.00 | | 0.00 | | 0.00 | + | 154 | 03 June 2026 | 50.00 | | 1300.00 | | 0.00 | | 0.00 | + | 155 | 04 June 2026 | 50.00 | | 1250.00 | | 0.00 | | 0.00 | + | 156 | 05 June 2026 | 50.00 | | 1200.00 | | 0.00 | | 0.00 | + | 157 | 06 June 2026 | 50.00 | | 1150.00 | | 0.00 | | 0.00 | + | 158 | 07 June 2026 | 50.00 | | 1100.00 | | 0.00 | | 0.00 | + | 159 | 08 June 2026 | 50.00 | | 1050.00 | | 0.00 | | 0.00 | + | 160 | 09 June 2026 | 50.00 | | 1000.00 | | 0.00 | | 0.00 | + | 161 | 10 June 2026 | 50.00 | | 950.00 | | 0.00 | | 0.00 | + | 162 | 11 June 2026 | 50.00 | | 900.00 | | 0.00 | | 0.00 | + | 163 | 12 June 2026 | 50.00 | | 850.00 | | 0.00 | | 0.00 | + | 164 | 13 June 2026 | 50.00 | | 800.00 | | 0.00 | | 0.00 | + | 165 | 14 June 2026 | 50.00 | | 750.00 | | 0.00 | | 0.00 | + | 166 | 15 June 2026 | 50.00 | | 700.00 | | 0.00 | | 0.00 | + | 167 | 16 June 2026 | 50.00 | | 650.00 | | 0.00 | | 0.00 | + | 168 | 17 June 2026 | 50.00 | | 600.00 | | 0.00 | | 0.00 | + | 169 | 18 June 2026 | 50.00 | | 550.00 | | 0.00 | | 0.00 | + | 170 | 19 June 2026 | 50.00 | | 500.00 | | 0.00 | | 0.00 | + | 171 | 20 June 2026 | 50.00 | | 450.00 | | 0.00 | | 0.00 | + | 172 | 21 June 2026 | 50.00 | | 400.00 | | 0.00 | | 0.00 | + | 173 | 22 June 2026 | 50.00 | | 350.00 | | 0.00 | | 0.00 | + | 174 | 23 June 2026 | 50.00 | | 300.00 | | 0.00 | | 0.00 | + | 175 | 24 June 2026 | 50.00 | | 250.00 | | 0.00 | | 0.00 | + | 176 | 25 June 2026 | 50.00 | | 200.00 | | 0.00 | | 0.00 | + | 177 | 26 June 2026 | 50.00 | | 150.00 | | 0.00 | | 0.00 | + | 178 | 27 June 2026 | 50.00 | | 100.00 | | 0.00 | | 0.00 | + | 179 | 28 June 2026 | 50.00 | | 50.00 | | 0.00 | | 0.00 | + | 180 | 29 June 2026 | 50.00 | | 0.00 | | 0.00 | | 0.00 | @TestRailId:C76623 Scenario: Verify working capital loan repayment - UC7: full minimum payment after disbursement day diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/calc/ProjectedAmortizationScheduleModel.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/calc/ProjectedAmortizationScheduleModel.java index 77f5e5be4bb..b687867d842 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/calc/ProjectedAmortizationScheduleModel.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/calc/ProjectedAmortizationScheduleModel.java @@ -226,9 +226,28 @@ public static ProjectedAmortizationScheduleModel generate(final BigDecimal disco expectedDisbursementDate, Money.of(currency, expectedPayment, mc), originalPaymentNumber, eir, mc, currency, currentDate); } - private LocalDate calculateAllocationDate(final LocalDate paymentDate) { - final LocalDate firstInstallmentDate = expectedDisbursementDate.plusDays(1); - final LocalDate lastInstallmentDate = expectedDisbursementDate.plusDays(effectiveTotalTerm()); + /** First-period offset: 0 when a disbursement-date repayment shifts the grid onto the disbursement date, else 1. */ + private int currentFirstPeriodDayOffset() { + return hasDisbursementDatePayment() ? 0 : 1; + } + + private boolean hasDisbursementDatePayment() { + return actualPayments.stream().anyMatch(payment -> payment.date().equals(expectedDisbursementDate)); + } + + /** Date of payment period {@code periodNo} (1-based) using the current first-period offset. */ + private LocalDate dateOfPeriod(final int periodNo) { + return dateOfPeriod(periodNo, currentFirstPeriodDayOffset()); + } + + /** Date of payment period {@code periodNo} (1-based) for the given first-period day offset. */ + private LocalDate dateOfPeriod(final int periodNo, final int firstPeriodDayOffset) { + return expectedDisbursementDate.plusDays((long) periodNo - 1 + firstPeriodDayOffset); + } + + private LocalDate calculateAllocationDate(final LocalDate paymentDate, final int firstPeriodDayOffset) { + final LocalDate firstInstallmentDate = dateOfPeriod(1, firstPeriodDayOffset); + final LocalDate lastInstallmentDate = dateOfPeriod(effectiveTotalTerm(), firstPeriodDayOffset); if (paymentDate.isBefore(firstInstallmentDate) || paymentDate.equals(expectedDisbursementDate)) { return firstInstallmentDate; } @@ -242,11 +261,13 @@ public void applyPayment(final LocalDate paymentDate, final BigDecimal amount) { Objects.requireNonNull(paymentDate, "paymentDate"); Objects.requireNonNull(amount, "amount"); updateCalculatedTillDate(paymentDate); - final LocalDate allocationDate = calculateAllocationDate(paymentDate); - final int index = resolvePaymentIndex(allocationDate); + // Offset includes the payment being added now, so the range check matches the subsequent rebuild. + final int firstPeriodDayOffset = hasDisbursementDatePayment() || paymentDate.equals(expectedDisbursementDate) ? 0 : 1; + final LocalDate allocationDate = calculateAllocationDate(paymentDate, firstPeriodDayOffset); + final int index = resolvePaymentIndex(allocationDate, firstPeriodDayOffset); if (index < 0 || index >= effectiveTotalTerm()) { throw new IllegalArgumentException("paymentDate " + paymentDate + " is outside the valid range [" - + expectedDisbursementDate.plusDays(1) + " .. " + expectedDisbursementDate.plusDays(effectiveTotalTerm()) + "]"); + + dateOfPeriod(1, firstPeriodDayOffset) + " .. " + dateOfPeriod(effectiveTotalTerm(), firstPeriodDayOffset) + "]"); } actualPayments.add(new ActualPayment(allocationDate, money(amount))); rebuildPayments(); @@ -322,10 +343,10 @@ public void applyRateChange(final BigDecimal newPeriodPaymentRate, final LocalDa throw new IllegalArgumentException("rateChangeDate must not be before expectedDisbursementDate"); } - // When the rate change is past the base schedule's term, clamp the segment start - // to originalPaymentNumber. The loan is still active (borrower hasn't paid), so the remaining - // balance is netDisbursement - paymentsReceived. - final int splitDayIndex = Math.min(rawSplitDayIndex, originalPaymentNumber); + // Segment starts on the period whose date == rateChangeDate. Convert the calendar-day rawSplitDayIndex + // to a period number via the first-period offset (0 when a disbursement-date repayment shifted the grid), + // else the new rate starts one day early. Clamped to the base term (past-term change starts there). + final int splitDayIndex = Math.min(rawSplitDayIndex + (1 - currentFirstPeriodDayOffset()), originalPaymentNumber); // Remove existing segments at or after split (supports overwrite on second rate change) // Guard against null rateSegments from V1 model deserialization @@ -433,9 +454,9 @@ private void rebuildOriginalProjectedPayments(final BalancesAndAmortizations ba) cumulativeExpectedAmort = cumulativeExpectedAmort.add(safeExpectedAmort, mc); final BigDecimal expectedDiscFeeBalance = discountFee.subtract(cumulativeExpectedAmort, mc); - result.add(new ProjectedPayment(periodNo, expectedDisbursementDate.plusDays(periodNo), segRelativePeriod, - money(periodExpectedPayment), safeDf, money(npvValue), money(balance), null, money(safeExpectedAmort), null, null, null, - money(expectedDiscFeeBalance), null)); + result.add(new ProjectedPayment(periodNo, dateOfPeriod(periodNo), segRelativePeriod, money(periodExpectedPayment), safeDf, + money(npvValue), money(balance), null, money(safeExpectedAmort), null, null, null, money(expectedDiscFeeBalance), + null)); } this.originalProjectedPayments = List.copyOf(result); @@ -444,8 +465,8 @@ private void rebuildOriginalProjectedPayments(final BalancesAndAmortizations ba) private Map aggregatePaymentsByDate() { final Map result = new LinkedHashMap<>(); if (!actualPayments.isEmpty() && calculatedTillDate != null) { - final LocalDate firstInstallmentDate = expectedDisbursementDate.plusDays(1); - final LocalDate lastInstallmentDate = expectedDisbursementDate.plusDays(effectiveTotalTerm()); + final LocalDate firstInstallmentDate = dateOfPeriod(1); + final LocalDate lastInstallmentDate = dateOfPeriod(effectiveTotalTerm()); if (!calculatedTillDate.isBefore(firstInstallmentDate)) { final LocalDate mapEnd = calculatedTillDate.isAfter(lastInstallmentDate) ? lastInstallmentDate : calculatedTillDate; result.putAll(generateDateMap(firstInstallmentDate, mapEnd)); @@ -474,14 +495,14 @@ private List buildPaymentList(final Map payme final int totalTerm = effectiveTotalTerm(); final List result = new ArrayList<>(totalTerm); for (int i = 0; i < totalTerm; i++) { - final LocalDate paymentDate = expectedDisbursementDate.plusDays(i + 1); + final LocalDate paymentDate = dateOfPeriod(i + 1); result.add(paymentsByDate.get(paymentDate)); } return result; } - private int resolvePaymentIndex(final LocalDate date) { - return (int) ChronoUnit.DAYS.between(expectedDisbursementDate, date) - 1; + private int resolvePaymentIndex(final LocalDate date, final int firstPeriodDayOffset) { + return (int) ChronoUnit.DAYS.between(expectedDisbursementDate, date) - firstPeriodDayOffset; } private List buildPayments(final List payments, final int appliedCount, @@ -507,7 +528,7 @@ private List buildPayments(final List payments, fi BigDecimal runningActualBalance = netDisb; for (int i = 0; i < effectiveTotalTerm(); i++) { final int periodNo = i + 1; - final LocalDate periodDate = expectedDisbursementDate.plusDays(periodNo); + final LocalDate periodDate = dateOfPeriod(periodNo); final BigDecimal periodPayment = payments.get(i); final boolean hasPositivePayment = periodPayment != null && periodPayment.signum() > 0; final boolean passedPeriod = calculatedTillDate != null && periodDate.isBefore(calculatedTillDate); @@ -715,8 +736,8 @@ private void buildTailPeriodsAndComputeNpv(final List tailPaym final BigDecimal forecast = remaining.min(tailExpectedPayment); final BigDecimal npv = MathUtil.negativeToZero(forecast.multiply(df, mc)); final Money zero = money(BigDecimal.ZERO); - tailPayments.add(new ProjectedPayment(periodNo, expectedDisbursementDate.plusDays(periodNo), dl, money(forecast), df, - money(npv), zero, null, zero, null, null, null, zero, null)); + tailPayments.add(new ProjectedPayment(periodNo, dateOfPeriod(periodNo), dl, money(forecast), df, money(npv), zero, null, zero, + null, null, null, zero, null)); remaining = remaining.subtract(forecast, mc); tailIndex++; } diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/service/WorkingCapitalLoanWritePlatformServiceImpl.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/service/WorkingCapitalLoanWritePlatformServiceImpl.java index 027611ff226..24fe98b58e4 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/service/WorkingCapitalLoanWritePlatformServiceImpl.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/service/WorkingCapitalLoanWritePlatformServiceImpl.java @@ -428,8 +428,9 @@ private WorkingCapitalLoanTransaction createAndPersistDiscountFeeTransaction(fin .forDisbursementDiscount(discountTransaction, amount); allocationRepository.saveAndFlush(allocation); - amortizationScheduleWriteService.generateAndSaveAmortizationScheduleOnDisbursement(loan, - disbursementTransaction.getTransactionAmount(), disbursementTransaction.getTransactionDate()); + // Regenerate with the new discount while preserving repayments already recorded on the disbursement schedule + // (e.g. a same-day repayment that shifted the grid); a plain regeneration would drop them. + amortizationScheduleWriteService.applyDiscountFeeAdjustment(loan, disbursementTransaction.getTransactionDate()); businessEventNotifierService .notifyPostBusinessEvent(new WorkingCapitalLoanDiscountFeeTransactionBusinessEvent(discountTransaction)); From 295e6a8924a399748a8930bf117afaf6929b7778 Mon Sep 17 00:00:00 2001 From: MarianaDmytrivBinariks Date: Mon, 8 Jun 2026 15:51:21 +0300 Subject: [PATCH 2/2] FINERACT-2455: added e2e test scenarios for wc trn schedule with repayment at first disbursement day --- .../WorkingCapitalDiscountAdjustment.feature | 100 +- ...WorkingCapitalDiscountAmortization.feature | 272 +++ .../WorkingCapitalLoanRepayment.feature | 1484 +++++++++++++++++ 3 files changed, 1806 insertions(+), 50 deletions(-) diff --git a/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAdjustment.feature b/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAdjustment.feature index 39e85d0609f..7eccccca9e4 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAdjustment.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAdjustment.feature @@ -644,38 +644,38 @@ Feature: Working Capital Discount Adjustment | 104 | 15 April 2019 | 50.00 | | 4194.88 | 2.42 | | 105.12 | | 105 | 16 April 2019 | 50.00 | | 4147.28 | 2.40 | | 102.72 | | 106 | 17 April 2019 | 50.00 | | 4099.65 | 2.37 | | 100.35 | - | 107 | 18 April 2019 | 50.00 | | 4051.99 | 2.34 | | 98.01 | - | 108 | 19 April 2019 | 50.00 | | 4004.30 | 2.32 | | 95.69 | - | 109 | 20 April 2019 | 50.00 | | 3956.59 | 2.29 | | 93.40 | - | 110 | 21 April 2019 | 50.00 | | 3908.85 | 2.26 | | 91.14 | - | 111 | 22 April 2019 | 50.00 | | 3861.09 | 2.23 | | 88.91 | - | 112 | 23 April 2019 | 50.00 | | 3813.29 | 2.21 | | 86.70 | - | 113 | 24 April 2019 | 50.00 | | 3765.47 | 2.18 | | 84.52 | - | 114 | 25 April 2019 | 50.00 | | 3717.62 | 2.15 | | 82.37 | - | 115 | 26 April 2019 | 50.00 | | 3669.75 | 2.12 | | 80.25 | - | 116 | 27 April 2019 | 50.00 | | 3621.85 | 2.10 | | 78.15 | - | 117 | 28 April 2019 | 50.00 | | 3573.92 | 2.07 | | 76.08 | - | 118 | 29 April 2019 | 50.00 | | 3525.96 | 2.04 | | 74.04 | - | 119 | 30 April 2019 | 50.00 | | 3477.97 | 2.01 | | 72.03 | - | 120 | 01 May 2019 | 50.00 | | 3429.96 | 1.99 | | 70.04 | - | 121 | 02 May 2019 | 50.00 | | 3381.92 | 1.96 | | 68.08 | - | 122 | 03 May 2019 | 50.00 | | 3333.85 | 1.93 | | 66.15 | - | 123 | 04 May 2019 | 50.00 | | 3285.76 | 1.91 | | 64.24 | - | 124 | 05 May 2019 | 50.00 | | 3237.64 | 1.88 | | 62.36 | - | 125 | 06 May 2019 | 50.00 | | 3189.49 | 1.85 | | 60.51 | - | 126 | 07 May 2019 | 50.00 | | 3141.31 | 1.82 | | 58.69 | - | 127 | 08 May 2019 | 50.00 | | 3093.10 | 1.80 | | 56.89 | - | 128 | 09 May 2019 | 50.00 | | 3044.87 | 1.77 | | 55.12 | - | 129 | 10 May 2019 | 50.00 | | 2996.61 | 1.74 | | 53.38 | - | 130 | 11 May 2019 | 50.00 | | 2948.32 | 1.71 | | 51.67 | - | 131 | 12 May 2019 | 50.00 | | 2900.01 | 1.68 | | 49.99 | - | 132 | 13 May 2019 | 50.00 | | 2851.67 | 1.66 | | 48.33 | - | 133 | 14 May 2019 | 50.00 | | 2803.30 | 1.63 | | 46.70 | - | 134 | 15 May 2019 | 50.00 | | 2754.90 | 1.60 | | 45.10 | - | 135 | 16 May 2019 | 50.00 | | 2706.47 | 1.57 | | 43.53 | - | 136 | 17 May 2019 | 50.00 | | 2658.02 | 1.55 | | 41.98 | - | 137 | 18 May 2019 | 50.00 | | 2609.54 | 1.52 | | 40.46 | - | 138 | 19 May 2019 | 50.00 | | 2561.03 | 1.49 | | 38.97 | + | 107 | 18 April 2019 | 50.00 | | 4051.99 | 2.34 | | 98.01 | + | 108 | 19 April 2019 | 50.00 | | 4004.30 | 2.32 | | 95.69 | + | 109 | 20 April 2019 | 50.00 | | 3956.59 | 2.29 | | 93.40 | + | 110 | 21 April 2019 | 50.00 | | 3908.85 | 2.26 | | 91.14 | + | 111 | 22 April 2019 | 50.00 | | 3861.09 | 2.23 | | 88.91 | + | 112 | 23 April 2019 | 50.00 | | 3813.29 | 2.21 | | 86.70 | + | 113 | 24 April 2019 | 50.00 | | 3765.47 | 2.18 | | 84.52 | + | 114 | 25 April 2019 | 50.00 | | 3717.62 | 2.15 | | 82.37 | + | 115 | 26 April 2019 | 50.00 | | 3669.75 | 2.12 | | 80.25 | + | 116 | 27 April 2019 | 50.00 | | 3621.85 | 2.10 | | 78.15 | + | 117 | 28 April 2019 | 50.00 | | 3573.92 | 2.07 | | 76.08 | + | 118 | 29 April 2019 | 50.00 | | 3525.96 | 2.04 | | 74.04 | + | 119 | 30 April 2019 | 50.00 | | 3477.97 | 2.01 | | 72.03 | + | 120 | 01 May 2019 | 50.00 | | 3429.96 | 1.99 | | 70.04 | + | 121 | 02 May 2019 | 50.00 | | 3381.92 | 1.96 | | 68.08 | + | 122 | 03 May 2019 | 50.00 | | 3333.85 | 1.93 | | 66.15 | + | 123 | 04 May 2019 | 50.00 | | 3285.76 | 1.91 | | 64.24 | + | 124 | 05 May 2019 | 50.00 | | 3237.64 | 1.88 | | 62.36 | + | 125 | 06 May 2019 | 50.00 | | 3189.49 | 1.85 | | 60.51 | + | 126 | 07 May 2019 | 50.00 | | 3141.31 | 1.82 | | 58.69 | + | 127 | 08 May 2019 | 50.00 | | 3093.10 | 1.80 | | 56.89 | + | 128 | 09 May 2019 | 50.00 | | 3044.87 | 1.77 | | 55.12 | + | 129 | 10 May 2019 | 50.00 | | 2996.61 | 1.74 | | 53.38 | + | 130 | 11 May 2019 | 50.00 | | 2948.32 | 1.71 | | 51.67 | + | 131 | 12 May 2019 | 50.00 | | 2900.01 | 1.68 | | 49.99 | + | 132 | 13 May 2019 | 50.00 | | 2851.67 | 1.66 | | 48.33 | + | 133 | 14 May 2019 | 50.00 | | 2803.30 | 1.63 | | 46.70 | + | 134 | 15 May 2019 | 50.00 | | 2754.90 | 1.60 | | 45.10 | + | 135 | 16 May 2019 | 50.00 | | 2706.47 | 1.57 | | 43.53 | + | 136 | 17 May 2019 | 50.00 | | 2658.02 | 1.55 | | 41.98 | + | 137 | 18 May 2019 | 50.00 | | 2609.54 | 1.52 | | 40.46 | + | 138 | 19 May 2019 | 50.00 | | 2561.03 | 1.49 | | 38.97 | | 139 | 20 May 2019 | 50.00 | | 2512.49 | 1.46 | | 37.51 | | 140 | 21 May 2019 | 50.00 | | 2463.93 | 1.44 | | 36.07 | | 141 | 22 May 2019 | 50.00 | | 2415.34 | 1.41 | | 34.66 | @@ -701,24 +701,24 @@ Feature: Working Capital Discount Adjustment | 161 | 11 June 2019 | 50.00 | | 1437.64 | 0.85 | | 12.35 | | 162 | 12 June 2019 | 50.00 | | 1388.47 | 0.82 | | 11.53 | | 163 | 13 June 2019 | 50.00 | | 1339.26 | 0.79 | | 10.74 | - | 164 | 14 June 2019 | 50.00 | | 1290.02 | 0.77 | | 9.97 | - | 165 | 15 June 2019 | 50.00 | | 1240.76 | 0.74 | | 9.23 | - | 166 | 16 June 2019 | 50.00 | | 1191.47 | 0.71 | | 8.52 | - | 167 | 17 June 2019 | 50.00 | | 1142.15 | 0.68 | | 7.84 | - | 168 | 18 June 2019 | 50.00 | | 1092.80 | 0.65 | | 7.19 | - | 169 | 19 June 2019 | 50.00 | | 1043.43 | 0.62 | | 6.57 | - | 170 | 20 June 2019 | 50.00 | | 994.02 | 0.60 | | 5.97 | - | 171 | 21 June 2019 | 50.00 | | 944.59 | 0.57 | | 5.40 | - | 172 | 22 June 2019 | 50.00 | | 895.13 | 0.54 | | 4.86 | - | 173 | 23 June 2019 | 50.00 | | 845.64 | 0.51 | | 4.35 | - | 174 | 24 June 2019 | 50.00 | | 796.13 | 0.48 | | 3.87 | - | 175 | 25 June 2019 | 50.00 | | 746.58 | 0.45 | | 3.42 | - | 176 | 26 June 2019 | 50.00 | | 697.01 | 0.43 | | 2.99 | - | 177 | 27 June 2019 | 50.00 | | 647.41 | 0.40 | | 2.59 | - | 178 | 28 June 2019 | 50.00 | | 597.78 | 0.37 | | 2.22 | - | 179 | 29 June 2019 | 50.00 | | 548.12 | 0.34 | | 1.88 | - | 180 | 30 June 2019 | 50.00 | | 498.43 | 0.31 | | 1.57 | - | 181 | 01 July 2019 | 50.00 | | 448.72 | 0.28 | | 1.29 | + | 164 | 14 June 2019 | 50.00 | | 1290.02 | 0.77 | | 9.97 | + | 165 | 15 June 2019 | 50.00 | | 1240.76 | 0.74 | | 9.23 | + | 166 | 16 June 2019 | 50.00 | | 1191.47 | 0.71 | | 8.52 | + | 167 | 17 June 2019 | 50.00 | | 1142.15 | 0.68 | | 7.84 | + | 168 | 18 June 2019 | 50.00 | | 1092.80 | 0.65 | | 7.19 | + | 169 | 19 June 2019 | 50.00 | | 1043.43 | 0.62 | | 6.57 | + | 170 | 20 June 2019 | 50.00 | | 994.02 | 0.60 | | 5.97 | + | 171 | 21 June 2019 | 50.00 | | 944.59 | 0.57 | | 5.40 | + | 172 | 22 June 2019 | 50.00 | | 895.13 | 0.54 | | 4.86 | + | 173 | 23 June 2019 | 50.00 | | 845.64 | 0.51 | | 4.35 | + | 174 | 24 June 2019 | 50.00 | | 796.13 | 0.48 | | 3.87 | + | 175 | 25 June 2019 | 50.00 | | 746.58 | 0.45 | | 3.42 | + | 176 | 26 June 2019 | 50.00 | | 697.01 | 0.43 | | 2.99 | + | 177 | 27 June 2019 | 50.00 | | 647.41 | 0.40 | | 2.59 | + | 178 | 28 June 2019 | 50.00 | | 597.78 | 0.37 | | 2.22 | + | 179 | 29 June 2019 | 50.00 | | 548.12 | 0.34 | | 1.88 | + | 180 | 30 June 2019 | 50.00 | | 498.43 | 0.31 | | 1.57 | + | 181 | 01 July 2019 | 50.00 | | 448.72 | 0.28 | | 1.29 | | 182 | 02 July 2019 | 50.00 | | 398.97 | 0.26 | | 1.03 | | 183 | 03 July 2019 | 50.00 | | 349.20 | 0.23 | | 0.80 | | 184 | 04 July 2019 | 50.00 | | 299.40 | 0.20 | | 0.60 | diff --git a/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAmortization.feature b/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAmortization.feature index 060da07f687..b43187e6e63 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAmortization.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalDiscountAmortization.feature @@ -470,6 +470,7 @@ Feature: WorkingCapitalDiscountFeeAmortization | INCOME | 404000 | Interest Income | | 19.18 | | LIABILITY | 240005 | Deferred Interest Revenue | 19.18 | | + @TestRailId:C85160 Scenario: Verify Discount Fee Amortization when repayment is made on the disbursement date When Admin sets the business date to "01 January 2026" And Admin creates a client with random data @@ -709,6 +710,7 @@ Feature: WorkingCapitalDiscountFeeAmortization | INCOME | 404000 | Interest Income | | 9.61 | | LIABILITY | 240005 | Deferred Interest Revenue | 9.61 | | + @TestRailId:C85161 Scenario: Discount amortization schedule with repayment on disbursement date and a later rate change starts the new rate on the rate change date When Admin sets the business date to "01 January 2026" And Admin creates a client with random data @@ -755,7 +757,18 @@ Feature: WorkingCapitalDiscountFeeAmortization | 23 | 2026-01-23 | 47.22 | 0.00 | | 0.00 | | | 0.00 | | | 24 | 2026-01-24 | 47.22 | 0.00 | | 0.00 | | | 0.00 | | | 25 | 2026-01-25 | 11.12 | 0.00 | | 0.00 | | | 0.00 | | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 900.0 | 900.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee | 100.0 | 100.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 05 January 2026 | Discount Fee Amortization | 9.23 | | | | false | + Then Working Capital Loan Transactions tab has a "DISCOUNT_FEE_AMORTIZATION" transaction with date "05 January 2026" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | INCOME | 404000 | Interest Income | | 9.23 | + | LIABILITY | 240005 | Deferred Interest Revenue | 9.23 | | + @TestRailId:C85162 Scenario: Discount amortization schedule with a repayment on the disbursement date and a later repayment When Admin sets the business date to "01 January 2026" And Admin creates a client with random data @@ -796,3 +809,262 @@ Feature: WorkingCapitalDiscountFeeAmortization | 18 | 2026-01-18 | 50.00 | 98.48 | | 1.51 | | | 1.48 | | | 19 | 2026-01-19 | 50.00 | 49.49 | | 1.01 | | | 0.47 | | | 20 | 2026-01-20 | 50.00 | 0.00 | | 0.51 | | | -0.04 | | + When Admin sets the business date to "03 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 1000.0 | 100.0 | 100000.0 | 18.04 | 81.96 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 900.0 | 900.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee | 100.0 | 100.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 02 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 02 January 2026 | Discount Fee Amortization | 18.04 | | | | false | + Then Working Capital Loan Transactions tab has a "DISCOUNT_FEE_AMORTIZATION" transaction with date "02 January 2026" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | INCOME | 404000 | Interest Income | | 18.04 | + | LIABILITY | 240005 | Deferred Interest Revenue | 18.04 | | + + @TestRailId:C85163 + Scenario: Verify Discount Fee Adjustment with following discount fee amortization when repayment is made on the disbursement 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | | + Then Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" + Then Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + Then Admin successfully add discount with "1000" amount on Working Capital loan account + And Customer makes repayment on "01 January 2026" with 50 transaction amount on Working Capital loan + And Admin adds Discount fee adjustment with "500" amount on transaction date "01 January 2026" on Working Capital loan account for last discount + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee | 1000.0 | 1000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee Adjustment | 500.0 | 500.0 | 0.0 | 0.0 | false | + And Admin retrieves the projected amortization schedule + Then The retrieved amortization schedule has the following summary fields: + | discountFeeAmount | netDisbursementAmount | totalPaymentVolume | periodPaymentRate | npvDayCount | expectedPaymentAmount | originalPaymentNumber | + | 500.00 | 9000.00 | 100000.00 | 18 | 360 | 50.00 | 190 | + Then Working Capital loan amortization schedule has 191 periods, with the following data for periods: + | paymentNo | paymentDate | expectedPaymentAmount | actualPaymentAmount | expectedBalance | expectedAmortizationAmount | actualAmortizationAmount | expectedDiscountFeeBalance | + | 0 | 01 January 2026 | -9000.00 | | 9000.00 | | | 500.00 | + | 1 | 01 January 2026 | 50.00 | 50.00 | 8955.14 | 5.14 | 5.14 | 494.86 | + | 2 | 02 January 2026 | 50.00 | | 8910.26 | 5.12 | | 489.74 | + | 3 | 03 January 2026 | 50.00 | | 8865.35 | 5.09 | | 484.65 | + | 4 | 04 January 2026 | 50.00 | | 8820.42 | 5.07 | | 479.58 | + | 5 | 05 January 2026 | 50.00 | | 8775.46 | 5.04 | | 474.54 | + | 6 | 06 January 2026 | 50.00 | | 8730.47 | 5.01 | | 469.53 | + | 7 | 07 January 2026 | 50.00 | | 8685.46 | 4.99 | | 464.54 | + | 8 | 08 January 2026 | 50.00 | | 8640.43 | 4.96 | | 459.58 | + | 9 | 09 January 2026 | 50.00 | | 8595.36 | 4.94 | | 454.64 | + | 10 | 10 January 2026 | 50.00 | | 8550.28 | 4.91 | | 449.73 | + | 11 | 11 January 2026 | 50.00 | | 8505.16 | 4.89 | | 444.84 | + | 12 | 12 January 2026 | 50.00 | | 8460.02 | 4.86 | | 439.98 | + | 13 | 13 January 2026 | 50.00 | | 8414.86 | 4.83 | | 435.15 | + | 14 | 14 January 2026 | 50.00 | | 8369.66 | 4.81 | | 430.34 | + | 15 | 15 January 2026 | 50.00 | | 8324.45 | 4.78 | | 425.56 | + | 16 | 16 January 2026 | 50.00 | | 8279.20 | 4.76 | | 420.80 | + | 17 | 17 January 2026 | 50.00 | | 8233.94 | 4.73 | | 416.07 | + | 18 | 18 January 2026 | 50.00 | | 8188.64 | 4.71 | | 411.36 | + | 19 | 19 January 2026 | 50.00 | | 8143.32 | 4.68 | | 406.68 | + | 20 | 20 January 2026 | 50.00 | | 8097.97 | 4.65 | | 402.03 | + | 21 | 21 January 2026 | 50.00 | | 8052.60 | 4.63 | | 397.40 | + | 22 | 22 January 2026 | 50.00 | | 8007.20 | 4.60 | | 392.80 | + | 23 | 23 January 2026 | 50.00 | | 7961.78 | 4.58 | | 388.22 | + | 24 | 24 January 2026 | 50.00 | | 7916.33 | 4.55 | | 383.67 | + | 25 | 25 January 2026 | 50.00 | | 7870.85 | 4.52 | | 379.15 | + | 26 | 26 January 2026 | 50.00 | | 7825.35 | 4.50 | | 374.65 | + | 27 | 27 January 2026 | 50.00 | | 7779.82 | 4.47 | | 370.18 | + | 28 | 28 January 2026 | 50.00 | | 7734.27 | 4.45 | | 365.73 | + | 29 | 29 January 2026 | 50.00 | | 7688.69 | 4.42 | | 361.31 | + | 30 | 30 January 2026 | 50.00 | | 7643.08 | 4.39 | | 356.92 | + | 31 | 31 January 2026 | 50.00 | | 7597.45 | 4.37 | | 352.55 | + | 32 | 01 February 2026 | 50.00 | | 7551.79 | 4.34 | | 348.21 | + | 33 | 02 February 2026 | 50.00 | | 7506.11 | 4.32 | | 343.89 | + | 34 | 03 February 2026 | 50.00 | | 7460.40 | 4.29 | | 339.60 | + | 35 | 04 February 2026 | 50.00 | | 7414.66 | 4.26 | | 335.34 | + | 36 | 05 February 2026 | 50.00 | | 7368.90 | 4.24 | | 331.10 | + | 37 | 06 February 2026 | 50.00 | | 7323.11 | 4.21 | | 326.89 | + | 38 | 07 February 2026 | 50.00 | | 7277.29 | 4.18 | | 322.71 | + | 39 | 08 February 2026 | 50.00 | | 7231.45 | 4.16 | | 318.55 | + | 40 | 09 February 2026 | 50.00 | | 7185.58 | 4.13 | | 314.42 | + | 41 | 10 February 2026 | 50.00 | | 7139.69 | 4.11 | | 310.31 | + | 42 | 11 February 2026 | 50.00 | | 7093.77 | 4.08 | | 306.23 | + | 43 | 12 February 2026 | 50.00 | | 7047.82 | 4.05 | | 302.18 | + | 44 | 13 February 2026 | 50.00 | | 7001.85 | 4.03 | | 298.15 | + | 45 | 14 February 2026 | 50.00 | | 6955.85 | 4.00 | | 294.15 | + | 46 | 15 February 2026 | 50.00 | | 6909.83 | 3.97 | | 290.18 | + | 47 | 16 February 2026 | 50.00 | | 6863.78 | 3.95 | | 286.23 | + | 48 | 17 February 2026 | 50.00 | | 6817.70 | 3.92 | | 282.31 | + | 49 | 18 February 2026 | 50.00 | | 6771.59 | 3.90 | | 278.41 | + | 50 | 19 February 2026 | 50.00 | | 6725.46 | 3.87 | | 274.54 | + | 51 | 20 February 2026 | 50.00 | | 6679.31 | 3.84 | | 270.70 | + | 52 | 21 February 2026 | 50.00 | | 6633.12 | 3.82 | | 266.88 | + | 53 | 22 February 2026 | 50.00 | | 6586.91 | 3.79 | | 263.09 | + | 54 | 23 February 2026 | 50.00 | | 6540.68 | 3.76 | | 259.33 | + | 55 | 24 February 2026 | 50.00 | | 6494.42 | 3.74 | | 255.59 | + | 56 | 25 February 2026 | 50.00 | | 6448.13 | 3.71 | | 251.88 | + | 57 | 26 February 2026 | 50.00 | | 6401.81 | 3.68 | | 248.20 | + | 58 | 27 February 2026 | 50.00 | | 6355.47 | 3.66 | | 244.54 | + | 59 | 28 February 2026 | 50.00 | | 6309.10 | 3.63 | | 240.91 | + | 60 | 01 March 2026 | 50.00 | | 6262.71 | 3.61 | | 237.30 | + | 61 | 02 March 2026 | 50.00 | | 6216.29 | 3.58 | | 233.72 | + | 62 | 03 March 2026 | 50.00 | | 6169.84 | 3.55 | | 230.17 | + | 63 | 04 March 2026 | 50.00 | | 6123.36 | 3.53 | | 226.64 | + | 64 | 05 March 2026 | 50.00 | | 6076.86 | 3.50 | | 223.14 | + | 65 | 06 March 2026 | 50.00 | | 6030.34 | 3.47 | | 219.67 | + | 66 | 07 March 2026 | 50.00 | | 5983.78 | 3.45 | | 216.22 | + | 67 | 08 March 2026 | 50.00 | | 5937.20 | 3.42 | | 212.80 | + | 68 | 09 March 2026 | 50.00 | | 5890.59 | 3.39 | | 209.41 | + | 69 | 10 March 2026 | 50.00 | | 5843.96 | 3.37 | | 206.04 | + | 70 | 11 March 2026 | 50.00 | | 5797.30 | 3.34 | | 202.70 | + | 71 | 12 March 2026 | 50.00 | | 5750.61 | 3.31 | | 199.39 | + | 72 | 13 March 2026 | 50.00 | | 5703.90 | 3.29 | | 196.10 | + | 73 | 14 March 2026 | 50.00 | | 5657.16 | 3.26 | | 192.84 | + | 74 | 15 March 2026 | 50.00 | | 5610.39 | 3.23 | | 189.61 | + | 75 | 16 March 2026 | 50.00 | | 5563.60 | 3.21 | | 186.40 | + | 76 | 17 March 2026 | 50.00 | | 5516.78 | 3.18 | | 183.22 | + | 77 | 18 March 2026 | 50.00 | | 5469.93 | 3.15 | | 180.07 | + | 78 | 19 March 2026 | 50.00 | | 5423.06 | 3.13 | | 176.94 | + | 79 | 20 March 2026 | 50.00 | | 5376.15 | 3.10 | | 173.84 | + | 80 | 21 March 2026 | 50.00 | | 5329.23 | 3.07 | | 170.77 | + | 81 | 22 March 2026 | 50.00 | | 5282.27 | 3.05 | | 167.72 | + | 82 | 23 March 2026 | 50.00 | | 5235.29 | 3.02 | | 164.70 | + | 83 | 24 March 2026 | 50.00 | | 5188.28 | 2.99 | | 161.71 | + | 84 | 25 March 2026 | 50.00 | | 5141.25 | 2.96 | | 158.75 | + | 85 | 26 March 2026 | 50.00 | | 5094.18 | 2.94 | | 155.81 | + | 86 | 27 March 2026 | 50.00 | | 5047.10 | 2.91 | | 152.90 | + | 87 | 28 March 2026 | 50.00 | | 4999.98 | 2.88 | | 150.02 | + | 88 | 29 March 2026 | 50.00 | | 4952.84 | 2.86 | | 147.16 | + | 89 | 30 March 2026 | 50.00 | | 4905.67 | 2.83 | | 144.33 | + | 90 | 31 March 2026 | 50.00 | | 4858.47 | 2.80 | | 141.53 | + | 91 | 01 April 2026 | 50.00 | | 4811.25 | 2.78 | | 138.75 | + | 92 | 02 April 2026 | 50.00 | | 4764.00 | 2.75 | | 136.00 | + | 93 | 03 April 2026 | 50.00 | | 4716.72 | 2.72 | | 133.28 | + | 94 | 04 April 2026 | 50.00 | | 4669.41 | 2.70 | | 130.58 | + | 95 | 05 April 2026 | 50.00 | | 4622.08 | 2.67 | | 127.91 | + | 96 | 06 April 2026 | 50.00 | | 4574.72 | 2.64 | | 125.27 | + | 97 | 07 April 2026 | 50.00 | | 4527.34 | 2.61 | | 122.66 | + | 98 | 08 April 2026 | 50.00 | | 4479.93 | 2.59 | | 120.07 | + | 99 | 09 April 2026 | 50.00 | | 4432.49 | 2.56 | | 117.51 | + | 100 | 10 April 2026 | 50.00 | | 4385.02 | 2.53 | | 114.98 | + | 101 | 11 April 2026 | 50.00 | | 4337.52 | 2.51 | | 112.47 | + | 102 | 12 April 2026 | 50.00 | | 4290.00 | 2.48 | | 109.99 | + | 103 | 13 April 2026 | 50.00 | | 4242.45 | 2.45 | | 107.54 | + | 104 | 14 April 2026 | 50.00 | | 4194.88 | 2.42 | | 105.12 | + | 105 | 15 April 2026 | 50.00 | | 4147.28 | 2.40 | | 102.72 | + | 106 | 16 April 2026 | 50.00 | | 4099.65 | 2.37 | | 100.35 | + | 107 | 17 April 2026 | 50.00 | | 4051.99 | 2.34 | | 98.01 | + | 108 | 18 April 2026 | 50.00 | | 4004.30 | 2.32 | | 95.69 | + | 109 | 19 April 2026 | 50.00 | | 3956.59 | 2.29 | | 93.40 | + | 110 | 20 April 2026 | 50.00 | | 3908.85 | 2.26 | | 91.14 | + | 111 | 21 April 2026 | 50.00 | | 3861.09 | 2.23 | | 88.91 | + | 112 | 22 April 2026 | 50.00 | | 3813.29 | 2.21 | | 86.70 | + | 113 | 23 April 2026 | 50.00 | | 3765.47 | 2.18 | | 84.52 | + | 114 | 24 April 2026 | 50.00 | | 3717.62 | 2.15 | | 82.37 | + | 115 | 25 April 2026 | 50.00 | | 3669.75 | 2.12 | | 80.25 | + | 116 | 26 April 2026 | 50.00 | | 3621.85 | 2.10 | | 78.15 | + | 117 | 27 April 2026 | 50.00 | | 3573.92 | 2.07 | | 76.08 | + | 118 | 28 April 2026 | 50.00 | | 3525.96 | 2.04 | | 74.04 | + | 119 | 29 April 2026 | 50.00 | | 3477.97 | 2.01 | | 72.03 | + | 120 | 30 April 2026 | 50.00 | | 3429.96 | 1.99 | | 70.04 | + | 121 | 01 May 2026 | 50.00 | | 3381.92 | 1.96 | | 68.08 | + | 122 | 02 May 2026 | 50.00 | | 3333.85 | 1.93 | | 66.15 | + | 123 | 03 May 2026 | 50.00 | | 3285.76 | 1.91 | | 64.24 | + | 124 | 04 May 2026 | 50.00 | | 3237.64 | 1.88 | | 62.36 | + | 125 | 05 May 2026 | 50.00 | | 3189.49 | 1.85 | | 60.51 | + | 126 | 06 May 2026 | 50.00 | | 3141.31 | 1.82 | | 58.69 | + | 127 | 07 May 2026 | 50.00 | | 3093.10 | 1.80 | | 56.89 | + | 128 | 08 May 2026 | 50.00 | | 3044.87 | 1.77 | | 55.12 | + | 129 | 09 May 2026 | 50.00 | | 2996.61 | 1.74 | | 53.38 | + | 130 | 10 May 2026 | 50.00 | | 2948.32 | 1.71 | | 51.67 | + | 131 | 11 May 2026 | 50.00 | | 2900.01 | 1.68 | | 49.99 | + | 132 | 12 May 2026 | 50.00 | | 2851.67 | 1.66 | | 48.33 | + | 133 | 13 May 2026 | 50.00 | | 2803.30 | 1.63 | | 46.70 | + | 134 | 14 May 2026 | 50.00 | | 2754.90 | 1.60 | | 45.10 | + | 135 | 15 May 2026 | 50.00 | | 2706.47 | 1.57 | | 43.53 | + | 136 | 16 May 2026 | 50.00 | | 2658.02 | 1.55 | | 41.98 | + | 137 | 17 May 2026 | 50.00 | | 2609.54 | 1.52 | | 40.46 | + | 138 | 18 May 2026 | 50.00 | | 2561.03 | 1.49 | | 38.97 | + | 139 | 19 May 2026 | 50.00 | | 2512.49 | 1.46 | | 37.51 | + | 140 | 20 May 2026 | 50.00 | | 2463.93 | 1.44 | | 36.07 | + | 141 | 21 May 2026 | 50.00 | | 2415.34 | 1.41 | | 34.66 | + | 142 | 22 May 2026 | 50.00 | | 2366.72 | 1.38 | | 33.28 | + | 143 | 23 May 2026 | 50.00 | | 2318.07 | 1.35 | | 31.93 | + | 144 | 24 May 2026 | 50.00 | | 2269.39 | 1.32 | | 30.61 | + | 145 | 25 May 2026 | 50.00 | | 2220.69 | 1.30 | | 29.31 | + | 146 | 26 May 2026 | 50.00 | | 2171.96 | 1.27 | | 28.04 | + | 147 | 27 May 2026 | 50.00 | | 2123.20 | 1.24 | | 26.80 | + | 148 | 28 May 2026 | 50.00 | | 2074.41 | 1.21 | | 25.59 | + | 149 | 29 May 2026 | 50.00 | | 2025.60 | 1.19 | | 24.40 | + | 150 | 30 May 2026 | 50.00 | | 1976.76 | 1.16 | | 23.24 | + | 151 | 31 May 2026 | 50.00 | | 1927.89 | 1.13 | | 22.11 | + | 152 | 01 June 2026 | 50.00 | | 1878.99 | 1.10 | | 21.01 | + | 153 | 02 June 2026 | 50.00 | | 1830.06 | 1.07 | | 19.94 | + | 154 | 03 June 2026 | 50.00 | | 1781.11 | 1.05 | | 18.89 | + | 155 | 04 June 2026 | 50.00 | | 1732.13 | 1.02 | | 17.87 | + | 156 | 05 June 2026 | 50.00 | | 1683.12 | 0.99 | | 16.88 | + | 157 | 06 June 2026 | 50.00 | | 1634.08 | 0.96 | | 15.92 | + | 158 | 07 June 2026 | 50.00 | | 1585.01 | 0.93 | | 14.99 | + | 159 | 08 June 2026 | 50.00 | | 1535.92 | 0.91 | | 14.08 | + | 160 | 09 June 2026 | 50.00 | | 1486.79 | 0.88 | | 13.20 | + | 161 | 10 June 2026 | 50.00 | | 1437.64 | 0.85 | | 12.35 | + | 162 | 11 June 2026 | 50.00 | | 1388.47 | 0.82 | | 11.53 | + | 163 | 12 June 2026 | 50.00 | | 1339.26 | 0.79 | | 10.74 | + | 164 | 13 June 2026 | 50.00 | | 1290.02 | 0.77 | | 9.97 | + | 165 | 14 June 2026 | 50.00 | | 1240.76 | 0.74 | | 9.23 | + | 166 | 15 June 2026 | 50.00 | | 1191.47 | 0.71 | | 8.52 | + | 167 | 16 June 2026 | 50.00 | | 1142.15 | 0.68 | | 7.84 | + | 168 | 17 June 2026 | 50.00 | | 1092.80 | 0.65 | | 7.19 | + | 169 | 18 June 2026 | 50.00 | | 1043.43 | 0.62 | | 6.57 | + | 170 | 19 June 2026 | 50.00 | | 994.02 | 0.60 | | 5.97 | + | 171 | 20 June 2026 | 50.00 | | 944.59 | 0.57 | | 5.40 | + | 172 | 21 June 2026 | 50.00 | | 895.13 | 0.54 | | 4.86 | + | 173 | 22 June 2026 | 50.00 | | 845.64 | 0.51 | | 4.35 | + | 174 | 23 June 2026 | 50.00 | | 796.13 | 0.48 | | 3.87 | + | 175 | 24 June 2026 | 50.00 | | 746.58 | 0.45 | | 3.42 | + | 176 | 25 June 2026 | 50.00 | | 697.01 | 0.43 | | 2.99 | + | 177 | 26 June 2026 | 50.00 | | 647.41 | 0.40 | | 2.59 | + | 178 | 27 June 2026 | 50.00 | | 597.78 | 0.37 | | 2.22 | + | 179 | 28 June 2026 | 50.00 | | 548.12 | 0.34 | | 1.88 | + | 180 | 29 June 2026 | 50.00 | | 498.43 | 0.31 | | 1.57 | + | 181 | 30 June 2026 | 50.00 | | 448.72 | 0.28 | | 1.29 | + | 182 | 01 July 2026 | 50.00 | | 398.97 | 0.26 | | 1.03 | + | 183 | 02 July 2026 | 50.00 | | 349.20 | 0.23 | | 0.80 | + | 184 | 03 July 2026 | 50.00 | | 299.40 | 0.20 | | 0.60 | + | 185 | 04 July 2026 | 50.00 | | 249.57 | 0.17 | | 0.43 | + | 186 | 05 July 2026 | 50.00 | | 199.71 | 0.14 | | 0.29 | + | 187 | 06 July 2026 | 50.00 | | 149.83 | 0.11 | | 0.18 | + | 188 | 07 July 2026 | 50.00 | | 99.91 | 0.09 | | 0.09 | + | 189 | 08 July 2026 | 50.00 | | 49.97 | 0.06 | | 0.03 | + | 190 | 09 July 2026 | 50.00 | | 0.00 | 0.03 | | 0.00 | + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9500.0 | 50.0 | 100000.0 | 0.0 | 500.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee | 1000.0 | 1000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee Adjustment | 500.0 | 500.0 | 0.0 | 0.0 | false | + When Admin sets the business date to "03 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9500.0 | 50.0 | 100000.0 | 5.14 | 494.86 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee | 1000.0 | 1000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee Adjustment | 500.0 | 500.0 | 0.0 | 0.0 | false | + | 02 January 2026 | Discount Fee Amortization | 5.14 | | | | false | + Then Working Capital Loan Transactions tab has a "DISCOUNT_FEE_AMORTIZATION" transaction with date "02 January 2026" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | INCOME | 404000 | Interest Income | | 5.14 | + | LIABILITY | 240005 | Deferred Interest Revenue | 5.14 | | + diff --git a/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalLoanRepayment.feature b/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalLoanRepayment.feature index 6b3a864a265..837701e38ab 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalLoanRepayment.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/WorkingCapitalLoanRepayment.feature @@ -712,6 +712,1490 @@ Feature: Working Capital Loan Repayment | 179 | 28 June 2026 | 50.00 | | 50.00 | | 0.00 | | 0.00 | | 180 | 29 June 2026 | 50.00 | | 0.00 | | 0.00 | | 0.00 | + @TestRailId:C85164 + Scenario: Verify working capital loan repayment - less then expectedAmount repaid on disbursement day - UC6.1 + 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | + And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" + Then Working capital loan approval was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | proposedPrincipal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discountApproved | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + And Verify Working Capital loan disbursement was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discount | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin runs inline COB job for Working Capital Loan by loanId + And Customer makes repayment on "01 January 2026" with 30.0 transaction amount on Working Capital loan + Then Working Capital loan delinquency range schedule has the following data: + | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | + | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 30.0 | 240.0 | null | null | null | + Then Working Capital loan amortization schedule has 182 periods, with the following data for periods: + | paymentNo | paymentDate | expectedPaymentAmount | actualPaymentAmount | expectedBalance | expectedAmortizationAmount | actualAmortizationAmount | expectedDiscountFeeBalance | + | 0 | 01 January 2026 | -9000.00 | | 9000.00 | | | 0.00 | + | 1 | 01 January 2026 | 50.00 | 30.00 | 8950.00 | 0.00 | 0.00 | 0.00 | + | 2 | 02 January 2026 | 50.00 | | 8900.00 | 0.00 | | 0.00 | + | 3 | 03 January 2026 | 50.00 | | 8850.00 | 0.00 | | 0.00 | + | 4 | 04 January 2026 | 50.00 | | 8800.00 | 0.00 | | 0.00 | + | 5 | 05 January 2026 | 50.00 | | 8750.00 | 0.00 | | 0.00 | + | 6 | 06 January 2026 | 50.00 | | 8700.00 | 0.00 | | 0.00 | + | 7 | 07 January 2026 | 50.00 | | 8650.00 | 0.00 | | 0.00 | + | 8 | 08 January 2026 | 50.00 | | 8600.00 | 0.00 | | 0.00 | + | 9 | 09 January 2026 | 50.00 | | 8550.00 | 0.00 | | 0.00 | + | 10 | 10 January 2026 | 50.00 | | 8500.00 | 0.00 | | 0.00 | + | 11 | 11 January 2026 | 50.00 | | 8450.00 | 0.00 | | 0.00 | + | 12 | 12 January 2026 | 50.00 | | 8400.00 | 0.00 | | 0.00 | + | 13 | 13 January 2026 | 50.00 | | 8350.00 | 0.00 | | 0.00 | + | 14 | 14 January 2026 | 50.00 | | 8300.00 | 0.00 | | 0.00 | + | 15 | 15 January 2026 | 50.00 | | 8250.00 | 0.00 | | 0.00 | + | 16 | 16 January 2026 | 50.00 | | 8200.00 | 0.00 | | 0.00 | + | 17 | 17 January 2026 | 50.00 | | 8150.00 | 0.00 | | 0.00 | + | 18 | 18 January 2026 | 50.00 | | 8100.00 | 0.00 | | 0.00 | + | 19 | 19 January 2026 | 50.00 | | 8050.00 | 0.00 | | 0.00 | + | 20 | 20 January 2026 | 50.00 | | 8000.00 | 0.00 | | 0.00 | + | 21 | 21 January 2026 | 50.00 | | 7950.00 | 0.00 | | 0.00 | + | 22 | 22 January 2026 | 50.00 | | 7900.00 | 0.00 | | 0.00 | + | 23 | 23 January 2026 | 50.00 | | 7850.00 | 0.00 | | 0.00 | + | 24 | 24 January 2026 | 50.00 | | 7800.00 | 0.00 | | 0.00 | + | 25 | 25 January 2026 | 50.00 | | 7750.00 | 0.00 | | 0.00 | + | 26 | 26 January 2026 | 50.00 | | 7700.00 | 0.00 | | 0.00 | + | 27 | 27 January 2026 | 50.00 | | 7650.00 | 0.00 | | 0.00 | + | 28 | 28 January 2026 | 50.00 | | 7600.00 | 0.00 | | 0.00 | + | 29 | 29 January 2026 | 50.00 | | 7550.00 | 0.00 | | 0.00 | + | 30 | 30 January 2026 | 50.00 | | 7500.00 | 0.00 | | 0.00 | + | 31 | 31 January 2026 | 50.00 | | 7450.00 | 0.00 | | 0.00 | + | 32 | 01 February 2026 | 50.00 | | 7400.00 | 0.00 | | 0.00 | + | 33 | 02 February 2026 | 50.00 | | 7350.00 | 0.00 | | 0.00 | + | 34 | 03 February 2026 | 50.00 | | 7300.00 | 0.00 | | 0.00 | + | 35 | 04 February 2026 | 50.00 | | 7250.00 | 0.00 | | 0.00 | + | 36 | 05 February 2026 | 50.00 | | 7200.00 | 0.00 | | 0.00 | + | 37 | 06 February 2026 | 50.00 | | 7150.00 | 0.00 | | 0.00 | + | 38 | 07 February 2026 | 50.00 | | 7100.00 | 0.00 | | 0.00 | + | 39 | 08 February 2026 | 50.00 | | 7050.00 | 0.00 | | 0.00 | + | 40 | 09 February 2026 | 50.00 | | 7000.00 | 0.00 | | 0.00 | + | 41 | 10 February 2026 | 50.00 | | 6950.00 | 0.00 | | 0.00 | + | 42 | 11 February 2026 | 50.00 | | 6900.00 | 0.00 | | 0.00 | + | 43 | 12 February 2026 | 50.00 | | 6850.00 | 0.00 | | 0.00 | + | 44 | 13 February 2026 | 50.00 | | 6800.00 | 0.00 | | 0.00 | + | 45 | 14 February 2026 | 50.00 | | 6750.00 | 0.00 | | 0.00 | + | 46 | 15 February 2026 | 50.00 | | 6700.00 | 0.00 | | 0.00 | + | 47 | 16 February 2026 | 50.00 | | 6650.00 | 0.00 | | 0.00 | + | 48 | 17 February 2026 | 50.00 | | 6600.00 | 0.00 | | 0.00 | + | 49 | 18 February 2026 | 50.00 | | 6550.00 | 0.00 | | 0.00 | + | 50 | 19 February 2026 | 50.00 | | 6500.00 | 0.00 | | 0.00 | + | 51 | 20 February 2026 | 50.00 | | 6450.00 | 0.00 | | 0.00 | + | 52 | 21 February 2026 | 50.00 | | 6400.00 | 0.00 | | 0.00 | + | 53 | 22 February 2026 | 50.00 | | 6350.00 | 0.00 | | 0.00 | + | 54 | 23 February 2026 | 50.00 | | 6300.00 | 0.00 | | 0.00 | + | 55 | 24 February 2026 | 50.00 | | 6250.00 | 0.00 | | 0.00 | + | 56 | 25 February 2026 | 50.00 | | 6200.00 | 0.00 | | 0.00 | + | 57 | 26 February 2026 | 50.00 | | 6150.00 | 0.00 | | 0.00 | + | 58 | 27 February 2026 | 50.00 | | 6100.00 | 0.00 | | 0.00 | + | 59 | 28 February 2026 | 50.00 | | 6050.00 | 0.00 | | 0.00 | + | 60 | 01 March 2026 | 50.00 | | 6000.00 | 0.00 | | 0.00 | + | 61 | 02 March 2026 | 50.00 | | 5950.00 | 0.00 | | 0.00 | + | 62 | 03 March 2026 | 50.00 | | 5900.00 | 0.00 | | 0.00 | + | 63 | 04 March 2026 | 50.00 | | 5850.00 | 0.00 | | 0.00 | + | 64 | 05 March 2026 | 50.00 | | 5800.00 | 0.00 | | 0.00 | + | 65 | 06 March 2026 | 50.00 | | 5750.00 | 0.00 | | 0.00 | + | 66 | 07 March 2026 | 50.00 | | 5700.00 | 0.00 | | 0.00 | + | 67 | 08 March 2026 | 50.00 | | 5650.00 | 0.00 | | 0.00 | + | 68 | 09 March 2026 | 50.00 | | 5600.00 | 0.00 | | 0.00 | + | 69 | 10 March 2026 | 50.00 | | 5550.00 | 0.00 | | 0.00 | + | 70 | 11 March 2026 | 50.00 | | 5500.00 | 0.00 | | 0.00 | + | 71 | 12 March 2026 | 50.00 | | 5450.00 | 0.00 | | 0.00 | + | 72 | 13 March 2026 | 50.00 | | 5400.00 | 0.00 | | 0.00 | + | 73 | 14 March 2026 | 50.00 | | 5350.00 | 0.00 | | 0.00 | + | 74 | 15 March 2026 | 50.00 | | 5300.00 | 0.00 | | 0.00 | + | 75 | 16 March 2026 | 50.00 | | 5250.00 | 0.00 | | 0.00 | + | 76 | 17 March 2026 | 50.00 | | 5200.00 | 0.00 | | 0.00 | + | 77 | 18 March 2026 | 50.00 | | 5150.00 | 0.00 | | 0.00 | + | 78 | 19 March 2026 | 50.00 | | 5100.00 | 0.00 | | 0.00 | + | 79 | 20 March 2026 | 50.00 | | 5050.00 | 0.00 | | 0.00 | + | 80 | 21 March 2026 | 50.00 | | 5000.00 | 0.00 | | 0.00 | + | 81 | 22 March 2026 | 50.00 | | 4950.00 | 0.00 | | 0.00 | + | 82 | 23 March 2026 | 50.00 | | 4900.00 | 0.00 | | 0.00 | + | 83 | 24 March 2026 | 50.00 | | 4850.00 | 0.00 | | 0.00 | + | 84 | 25 March 2026 | 50.00 | | 4800.00 | 0.00 | | 0.00 | + | 85 | 26 March 2026 | 50.00 | | 4750.00 | 0.00 | | 0.00 | + | 86 | 27 March 2026 | 50.00 | | 4700.00 | 0.00 | | 0.00 | + | 87 | 28 March 2026 | 50.00 | | 4650.00 | 0.00 | | 0.00 | + | 88 | 29 March 2026 | 50.00 | | 4600.00 | 0.00 | | 0.00 | + | 89 | 30 March 2026 | 50.00 | | 4550.00 | 0.00 | | 0.00 | + | 90 | 31 March 2026 | 50.00 | | 4500.00 | 0.00 | | 0.00 | + | 91 | 01 April 2026 | 50.00 | | 4450.00 | 0.00 | | 0.00 | + | 92 | 02 April 2026 | 50.00 | | 4400.00 | 0.00 | | 0.00 | + | 93 | 03 April 2026 | 50.00 | | 4350.00 | 0.00 | | 0.00 | + | 94 | 04 April 2026 | 50.00 | | 4300.00 | 0.00 | | 0.00 | + | 95 | 05 April 2026 | 50.00 | | 4250.00 | 0.00 | | 0.00 | + | 96 | 06 April 2026 | 50.00 | | 4200.00 | 0.00 | | 0.00 | + | 97 | 07 April 2026 | 50.00 | | 4150.00 | 0.00 | | 0.00 | + | 98 | 08 April 2026 | 50.00 | | 4100.00 | 0.00 | | 0.00 | + | 99 | 09 April 2026 | 50.00 | | 4050.00 | 0.00 | | 0.00 | + | 100 | 10 April 2026 | 50.00 | | 4000.00 | 0.00 | | 0.00 | + | 101 | 11 April 2026 | 50.00 | | 3950.00 | 0.00 | | 0.00 | + | 102 | 12 April 2026 | 50.00 | | 3900.00 | 0.00 | | 0.00 | + | 103 | 13 April 2026 | 50.00 | | 3850.00 | 0.00 | | 0.00 | + | 104 | 14 April 2026 | 50.00 | | 3800.00 | 0.00 | | 0.00 | + | 105 | 15 April 2026 | 50.00 | | 3750.00 | 0.00 | | 0.00 | + | 106 | 16 April 2026 | 50.00 | | 3700.00 | 0.00 | | 0.00 | + | 107 | 17 April 2026 | 50.00 | | 3650.00 | 0.00 | | 0.00 | + | 108 | 18 April 2026 | 50.00 | | 3600.00 | 0.00 | | 0.00 | + | 109 | 19 April 2026 | 50.00 | | 3550.00 | 0.00 | | 0.00 | + | 110 | 20 April 2026 | 50.00 | | 3500.00 | 0.00 | | 0.00 | + | 111 | 21 April 2026 | 50.00 | | 3450.00 | 0.00 | | 0.00 | + | 112 | 22 April 2026 | 50.00 | | 3400.00 | 0.00 | | 0.00 | + | 113 | 23 April 2026 | 50.00 | | 3350.00 | 0.00 | | 0.00 | + | 114 | 24 April 2026 | 50.00 | | 3300.00 | 0.00 | | 0.00 | + | 115 | 25 April 2026 | 50.00 | | 3250.00 | 0.00 | | 0.00 | + | 116 | 26 April 2026 | 50.00 | | 3200.00 | 0.00 | | 0.00 | + | 117 | 27 April 2026 | 50.00 | | 3150.00 | 0.00 | | 0.00 | + | 118 | 28 April 2026 | 50.00 | | 3100.00 | 0.00 | | 0.00 | + | 119 | 29 April 2026 | 50.00 | | 3050.00 | 0.00 | | 0.00 | + | 120 | 30 April 2026 | 50.00 | | 3000.00 | 0.00 | | 0.00 | + | 121 | 01 May 2026 | 50.00 | | 2950.00 | 0.00 | | 0.00 | + | 122 | 02 May 2026 | 50.00 | | 2900.00 | 0.00 | | 0.00 | + | 123 | 03 May 2026 | 50.00 | | 2850.00 | 0.00 | | 0.00 | + | 124 | 04 May 2026 | 50.00 | | 2800.00 | 0.00 | | 0.00 | + | 125 | 05 May 2026 | 50.00 | | 2750.00 | 0.00 | | 0.00 | + | 126 | 06 May 2026 | 50.00 | | 2700.00 | 0.00 | | 0.00 | + | 127 | 07 May 2026 | 50.00 | | 2650.00 | 0.00 | | 0.00 | + | 128 | 08 May 2026 | 50.00 | | 2600.00 | 0.00 | | 0.00 | + | 129 | 09 May 2026 | 50.00 | | 2550.00 | 0.00 | | 0.00 | + | 130 | 10 May 2026 | 50.00 | | 2500.00 | 0.00 | | 0.00 | + | 131 | 11 May 2026 | 50.00 | | 2450.00 | 0.00 | | 0.00 | + | 132 | 12 May 2026 | 50.00 | | 2400.00 | 0.00 | | 0.00 | + | 133 | 13 May 2026 | 50.00 | | 2350.00 | 0.00 | | 0.00 | + | 134 | 14 May 2026 | 50.00 | | 2300.00 | 0.00 | | 0.00 | + | 135 | 15 May 2026 | 50.00 | | 2250.00 | 0.00 | | 0.00 | + | 136 | 16 May 2026 | 50.00 | | 2200.00 | 0.00 | | 0.00 | + | 137 | 17 May 2026 | 50.00 | | 2150.00 | 0.00 | | 0.00 | + | 138 | 18 May 2026 | 50.00 | | 2100.00 | 0.00 | | 0.00 | + | 139 | 19 May 2026 | 50.00 | | 2050.00 | 0.00 | | 0.00 | + | 140 | 20 May 2026 | 50.00 | | 2000.00 | 0.00 | | 0.00 | + | 141 | 21 May 2026 | 50.00 | | 1950.00 | 0.00 | | 0.00 | + | 142 | 22 May 2026 | 50.00 | | 1900.00 | 0.00 | | 0.00 | + | 143 | 23 May 2026 | 50.00 | | 1850.00 | 0.00 | | 0.00 | + | 144 | 24 May 2026 | 50.00 | | 1800.00 | 0.00 | | 0.00 | + | 145 | 25 May 2026 | 50.00 | | 1750.00 | 0.00 | | 0.00 | + | 146 | 26 May 2026 | 50.00 | | 1700.00 | 0.00 | | 0.00 | + | 147 | 27 May 2026 | 50.00 | | 1650.00 | 0.00 | | 0.00 | + | 148 | 28 May 2026 | 50.00 | | 1600.00 | 0.00 | | 0.00 | + | 149 | 29 May 2026 | 50.00 | | 1550.00 | 0.00 | | 0.00 | + | 150 | 30 May 2026 | 50.00 | | 1500.00 | 0.00 | | 0.00 | + | 151 | 31 May 2026 | 50.00 | | 1450.00 | 0.00 | | 0.00 | + | 152 | 01 June 2026 | 50.00 | | 1400.00 | 0.00 | | 0.00 | + | 153 | 02 June 2026 | 50.00 | | 1350.00 | 0.00 | | 0.00 | + | 154 | 03 June 2026 | 50.00 | | 1300.00 | 0.00 | | 0.00 | + | 155 | 04 June 2026 | 50.00 | | 1250.00 | 0.00 | | 0.00 | + | 156 | 05 June 2026 | 50.00 | | 1200.00 | 0.00 | | 0.00 | + | 157 | 06 June 2026 | 50.00 | | 1150.00 | 0.00 | | 0.00 | + | 158 | 07 June 2026 | 50.00 | | 1100.00 | 0.00 | | 0.00 | + | 159 | 08 June 2026 | 50.00 | | 1050.00 | 0.00 | | 0.00 | + | 160 | 09 June 2026 | 50.00 | | 1000.00 | 0.00 | | 0.00 | + | 161 | 10 June 2026 | 50.00 | | 950.00 | 0.00 | | 0.00 | + | 162 | 11 June 2026 | 50.00 | | 900.00 | 0.00 | | 0.00 | + | 163 | 12 June 2026 | 50.00 | | 850.00 | 0.00 | | 0.00 | + | 164 | 13 June 2026 | 50.00 | | 800.00 | 0.00 | | 0.00 | + | 165 | 14 June 2026 | 50.00 | | 750.00 | 0.00 | | 0.00 | + | 166 | 15 June 2026 | 50.00 | | 700.00 | 0.00 | | 0.00 | + | 167 | 16 June 2026 | 50.00 | | 650.00 | 0.00 | | 0.00 | + | 168 | 17 June 2026 | 50.00 | | 600.00 | 0.00 | | 0.00 | + | 169 | 18 June 2026 | 50.00 | | 550.00 | 0.00 | | 0.00 | + | 170 | 19 June 2026 | 50.00 | | 500.00 | 0.00 | | 0.00 | + | 171 | 20 June 2026 | 50.00 | | 450.00 | 0.00 | | 0.00 | + | 172 | 21 June 2026 | 50.00 | | 400.00 | 0.00 | | 0.00 | + | 173 | 22 June 2026 | 50.00 | | 350.00 | 0.00 | | 0.00 | + | 174 | 23 June 2026 | 50.00 | | 300.00 | 0.00 | | 0.00 | + | 175 | 24 June 2026 | 50.00 | | 250.00 | 0.00 | | 0.00 | + | 176 | 25 June 2026 | 50.00 | | 200.00 | 0.00 | | 0.00 | + | 177 | 26 June 2026 | 50.00 | | 150.00 | 0.00 | | 0.00 | + | 178 | 27 June 2026 | 50.00 | | 100.00 | 0.00 | | 0.00 | + | 179 | 28 June 2026 | 50.00 | | 50.00 | 0.00 | | 0.00 | + | 180 | 29 June 2026 | 50.00 | | 0.00 | 0.00 | | 0.00 | + | 181 | 30 June 2026 | 20.00 | | 0.00 | 0.00 | | 0.00 | + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 30.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 30.0 | 30.0 | 0.0 | 0.0 | false | + When Admin sets the business date to "02 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 30.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 30.0 | 30.0 | 0.0 | 0.0 | false | + + @TestRailId:C85165 + Scenario: Verify working capital loan repayment - more then expectedAmount repaid on disbursement day - UC6.2 + 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | + And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" + Then Working capital loan approval was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | proposedPrincipal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discountApproved | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + And Verify Working Capital loan disbursement was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discount | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin runs inline COB job for Working Capital Loan by loanId + And Customer makes repayment on "01 January 2026" with 280.0 transaction amount on Working Capital loan + Then Working Capital loan delinquency range schedule has the following data: + | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | + | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 280.0 | 0.0 | true | 0.0 | 0 | + Then Working Capital loan amortization schedule has 177 periods, with the following data for periods: + | paymentNo | paymentDate | expectedPaymentAmount | actualPaymentAmount | expectedBalance | expectedAmortizationAmount | actualAmortizationAmount | expectedDiscountFeeBalance | + | 0 | 01 January 2026 | -9000.00 | | 9000.00 | | | 0.00 | + | 1 | 01 January 2026 | 50.00 | 280.00 | 8950.00 | 0.00 | 0.00 | 0.00 | + | 2 | 02 January 2026 | 50.00 | | 8900.00 | 0.00 | | 0.00 | + | 3 | 03 January 2026 | 50.00 | | 8850.00 | 0.00 | | 0.00 | + | 4 | 04 January 2026 | 50.00 | | 8800.00 | 0.00 | | 0.00 | + | 5 | 05 January 2026 | 50.00 | | 8750.00 | 0.00 | | 0.00 | + | 6 | 06 January 2026 | 50.00 | | 8700.00 | 0.00 | | 0.00 | + | 7 | 07 January 2026 | 50.00 | | 8650.00 | 0.00 | | 0.00 | + | 8 | 08 January 2026 | 50.00 | | 8600.00 | 0.00 | | 0.00 | + | 9 | 09 January 2026 | 50.00 | | 8550.00 | 0.00 | | 0.00 | + | 10 | 10 January 2026 | 50.00 | | 8500.00 | 0.00 | | 0.00 | + | 11 | 11 January 2026 | 50.00 | | 8450.00 | 0.00 | | 0.00 | + | 12 | 12 January 2026 | 50.00 | | 8400.00 | 0.00 | | 0.00 | + | 13 | 13 January 2026 | 50.00 | | 8350.00 | 0.00 | | 0.00 | + | 14 | 14 January 2026 | 50.00 | | 8300.00 | 0.00 | | 0.00 | + | 15 | 15 January 2026 | 50.00 | | 8250.00 | 0.00 | | 0.00 | + | 16 | 16 January 2026 | 50.00 | | 8200.00 | 0.00 | | 0.00 | + | 17 | 17 January 2026 | 50.00 | | 8150.00 | 0.00 | | 0.00 | + | 18 | 18 January 2026 | 50.00 | | 8100.00 | 0.00 | | 0.00 | + | 19 | 19 January 2026 | 50.00 | | 8050.00 | 0.00 | | 0.00 | + | 20 | 20 January 2026 | 50.00 | | 8000.00 | 0.00 | | 0.00 | + | 21 | 21 January 2026 | 50.00 | | 7950.00 | 0.00 | | 0.00 | + | 22 | 22 January 2026 | 50.00 | | 7900.00 | 0.00 | | 0.00 | + | 23 | 23 January 2026 | 50.00 | | 7850.00 | 0.00 | | 0.00 | + | 24 | 24 January 2026 | 50.00 | | 7800.00 | 0.00 | | 0.00 | + | 25 | 25 January 2026 | 50.00 | | 7750.00 | 0.00 | | 0.00 | + | 26 | 26 January 2026 | 50.00 | | 7700.00 | 0.00 | | 0.00 | + | 27 | 27 January 2026 | 50.00 | | 7650.00 | 0.00 | | 0.00 | + | 28 | 28 January 2026 | 50.00 | | 7600.00 | 0.00 | | 0.00 | + | 29 | 29 January 2026 | 50.00 | | 7550.00 | 0.00 | | 0.00 | + | 30 | 30 January 2026 | 50.00 | | 7500.00 | 0.00 | | 0.00 | + | 31 | 31 January 2026 | 50.00 | | 7450.00 | 0.00 | | 0.00 | + | 32 | 01 February 2026 | 50.00 | | 7400.00 | 0.00 | | 0.00 | + | 33 | 02 February 2026 | 50.00 | | 7350.00 | 0.00 | | 0.00 | + | 34 | 03 February 2026 | 50.00 | | 7300.00 | 0.00 | | 0.00 | + | 35 | 04 February 2026 | 50.00 | | 7250.00 | 0.00 | | 0.00 | + | 36 | 05 February 2026 | 50.00 | | 7200.00 | 0.00 | | 0.00 | + | 37 | 06 February 2026 | 50.00 | | 7150.00 | 0.00 | | 0.00 | + | 38 | 07 February 2026 | 50.00 | | 7100.00 | 0.00 | | 0.00 | + | 39 | 08 February 2026 | 50.00 | | 7050.00 | 0.00 | | 0.00 | + | 40 | 09 February 2026 | 50.00 | | 7000.00 | 0.00 | | 0.00 | + | 41 | 10 February 2026 | 50.00 | | 6950.00 | 0.00 | | 0.00 | + | 42 | 11 February 2026 | 50.00 | | 6900.00 | 0.00 | | 0.00 | + | 43 | 12 February 2026 | 50.00 | | 6850.00 | 0.00 | | 0.00 | + | 44 | 13 February 2026 | 50.00 | | 6800.00 | 0.00 | | 0.00 | + | 45 | 14 February 2026 | 50.00 | | 6750.00 | 0.00 | | 0.00 | + | 46 | 15 February 2026 | 50.00 | | 6700.00 | 0.00 | | 0.00 | + | 47 | 16 February 2026 | 50.00 | | 6650.00 | 0.00 | | 0.00 | + | 48 | 17 February 2026 | 50.00 | | 6600.00 | 0.00 | | 0.00 | + | 49 | 18 February 2026 | 50.00 | | 6550.00 | 0.00 | | 0.00 | + | 50 | 19 February 2026 | 50.00 | | 6500.00 | 0.00 | | 0.00 | + | 51 | 20 February 2026 | 50.00 | | 6450.00 | 0.00 | | 0.00 | + | 52 | 21 February 2026 | 50.00 | | 6400.00 | 0.00 | | 0.00 | + | 53 | 22 February 2026 | 50.00 | | 6350.00 | 0.00 | | 0.00 | + | 54 | 23 February 2026 | 50.00 | | 6300.00 | 0.00 | | 0.00 | + | 55 | 24 February 2026 | 50.00 | | 6250.00 | 0.00 | | 0.00 | + | 56 | 25 February 2026 | 50.00 | | 6200.00 | 0.00 | | 0.00 | + | 57 | 26 February 2026 | 50.00 | | 6150.00 | 0.00 | | 0.00 | + | 58 | 27 February 2026 | 50.00 | | 6100.00 | 0.00 | | 0.00 | + | 59 | 28 February 2026 | 50.00 | | 6050.00 | 0.00 | | 0.00 | + | 60 | 01 March 2026 | 50.00 | | 6000.00 | 0.00 | | 0.00 | + | 61 | 02 March 2026 | 50.00 | | 5950.00 | 0.00 | | 0.00 | + | 62 | 03 March 2026 | 50.00 | | 5900.00 | 0.00 | | 0.00 | + | 63 | 04 March 2026 | 50.00 | | 5850.00 | 0.00 | | 0.00 | + | 64 | 05 March 2026 | 50.00 | | 5800.00 | 0.00 | | 0.00 | + | 65 | 06 March 2026 | 50.00 | | 5750.00 | 0.00 | | 0.00 | + | 66 | 07 March 2026 | 50.00 | | 5700.00 | 0.00 | | 0.00 | + | 67 | 08 March 2026 | 50.00 | | 5650.00 | 0.00 | | 0.00 | + | 68 | 09 March 2026 | 50.00 | | 5600.00 | 0.00 | | 0.00 | + | 69 | 10 March 2026 | 50.00 | | 5550.00 | 0.00 | | 0.00 | + | 70 | 11 March 2026 | 50.00 | | 5500.00 | 0.00 | | 0.00 | + | 71 | 12 March 2026 | 50.00 | | 5450.00 | 0.00 | | 0.00 | + | 72 | 13 March 2026 | 50.00 | | 5400.00 | 0.00 | | 0.00 | + | 73 | 14 March 2026 | 50.00 | | 5350.00 | 0.00 | | 0.00 | + | 74 | 15 March 2026 | 50.00 | | 5300.00 | 0.00 | | 0.00 | + | 75 | 16 March 2026 | 50.00 | | 5250.00 | 0.00 | | 0.00 | + | 76 | 17 March 2026 | 50.00 | | 5200.00 | 0.00 | | 0.00 | + | 77 | 18 March 2026 | 50.00 | | 5150.00 | 0.00 | | 0.00 | + | 78 | 19 March 2026 | 50.00 | | 5100.00 | 0.00 | | 0.00 | + | 79 | 20 March 2026 | 50.00 | | 5050.00 | 0.00 | | 0.00 | + | 80 | 21 March 2026 | 50.00 | | 5000.00 | 0.00 | | 0.00 | + | 81 | 22 March 2026 | 50.00 | | 4950.00 | 0.00 | | 0.00 | + | 82 | 23 March 2026 | 50.00 | | 4900.00 | 0.00 | | 0.00 | + | 83 | 24 March 2026 | 50.00 | | 4850.00 | 0.00 | | 0.00 | + | 84 | 25 March 2026 | 50.00 | | 4800.00 | 0.00 | | 0.00 | + | 85 | 26 March 2026 | 50.00 | | 4750.00 | 0.00 | | 0.00 | + | 86 | 27 March 2026 | 50.00 | | 4700.00 | 0.00 | | 0.00 | + | 87 | 28 March 2026 | 50.00 | | 4650.00 | 0.00 | | 0.00 | + | 88 | 29 March 2026 | 50.00 | | 4600.00 | 0.00 | | 0.00 | + | 89 | 30 March 2026 | 50.00 | | 4550.00 | 0.00 | | 0.00 | + | 90 | 31 March 2026 | 50.00 | | 4500.00 | 0.00 | | 0.00 | + | 91 | 01 April 2026 | 50.00 | | 4450.00 | 0.00 | | 0.00 | + | 92 | 02 April 2026 | 50.00 | | 4400.00 | 0.00 | | 0.00 | + | 93 | 03 April 2026 | 50.00 | | 4350.00 | 0.00 | | 0.00 | + | 94 | 04 April 2026 | 50.00 | | 4300.00 | 0.00 | | 0.00 | + | 95 | 05 April 2026 | 50.00 | | 4250.00 | 0.00 | | 0.00 | + | 96 | 06 April 2026 | 50.00 | | 4200.00 | 0.00 | | 0.00 | + | 97 | 07 April 2026 | 50.00 | | 4150.00 | 0.00 | | 0.00 | + | 98 | 08 April 2026 | 50.00 | | 4100.00 | 0.00 | | 0.00 | + | 99 | 09 April 2026 | 50.00 | | 4050.00 | 0.00 | | 0.00 | + | 100 | 10 April 2026 | 50.00 | | 4000.00 | 0.00 | | 0.00 | + | 101 | 11 April 2026 | 50.00 | | 3950.00 | 0.00 | | 0.00 | + | 102 | 12 April 2026 | 50.00 | | 3900.00 | 0.00 | | 0.00 | + | 103 | 13 April 2026 | 50.00 | | 3850.00 | 0.00 | | 0.00 | + | 104 | 14 April 2026 | 50.00 | | 3800.00 | 0.00 | | 0.00 | + | 105 | 15 April 2026 | 50.00 | | 3750.00 | 0.00 | | 0.00 | + | 106 | 16 April 2026 | 50.00 | | 3700.00 | 0.00 | | 0.00 | + | 107 | 17 April 2026 | 50.00 | | 3650.00 | 0.00 | | 0.00 | + | 108 | 18 April 2026 | 50.00 | | 3600.00 | 0.00 | | 0.00 | + | 109 | 19 April 2026 | 50.00 | | 3550.00 | 0.00 | | 0.00 | + | 110 | 20 April 2026 | 50.00 | | 3500.00 | 0.00 | | 0.00 | + | 111 | 21 April 2026 | 50.00 | | 3450.00 | 0.00 | | 0.00 | + | 112 | 22 April 2026 | 50.00 | | 3400.00 | 0.00 | | 0.00 | + | 113 | 23 April 2026 | 50.00 | | 3350.00 | 0.00 | | 0.00 | + | 114 | 24 April 2026 | 50.00 | | 3300.00 | 0.00 | | 0.00 | + | 115 | 25 April 2026 | 50.00 | | 3250.00 | 0.00 | | 0.00 | + | 116 | 26 April 2026 | 50.00 | | 3200.00 | 0.00 | | 0.00 | + | 117 | 27 April 2026 | 50.00 | | 3150.00 | 0.00 | | 0.00 | + | 118 | 28 April 2026 | 50.00 | | 3100.00 | 0.00 | | 0.00 | + | 119 | 29 April 2026 | 50.00 | | 3050.00 | 0.00 | | 0.00 | + | 120 | 30 April 2026 | 50.00 | | 3000.00 | 0.00 | | 0.00 | + | 121 | 01 May 2026 | 50.00 | | 2950.00 | 0.00 | | 0.00 | + | 122 | 02 May 2026 | 50.00 | | 2900.00 | 0.00 | | 0.00 | + | 123 | 03 May 2026 | 50.00 | | 2850.00 | 0.00 | | 0.00 | + | 124 | 04 May 2026 | 50.00 | | 2800.00 | 0.00 | | 0.00 | + | 125 | 05 May 2026 | 50.00 | | 2750.00 | 0.00 | | 0.00 | + | 126 | 06 May 2026 | 50.00 | | 2700.00 | 0.00 | | 0.00 | + | 127 | 07 May 2026 | 50.00 | | 2650.00 | 0.00 | | 0.00 | + | 128 | 08 May 2026 | 50.00 | | 2600.00 | 0.00 | | 0.00 | + | 129 | 09 May 2026 | 50.00 | | 2550.00 | 0.00 | | 0.00 | + | 130 | 10 May 2026 | 50.00 | | 2500.00 | 0.00 | | 0.00 | + | 131 | 11 May 2026 | 50.00 | | 2450.00 | 0.00 | | 0.00 | + | 132 | 12 May 2026 | 50.00 | | 2400.00 | 0.00 | | 0.00 | + | 133 | 13 May 2026 | 50.00 | | 2350.00 | 0.00 | | 0.00 | + | 134 | 14 May 2026 | 50.00 | | 2300.00 | 0.00 | | 0.00 | + | 135 | 15 May 2026 | 50.00 | | 2250.00 | 0.00 | | 0.00 | + | 136 | 16 May 2026 | 50.00 | | 2200.00 | 0.00 | | 0.00 | + | 137 | 17 May 2026 | 50.00 | | 2150.00 | 0.00 | | 0.00 | + | 138 | 18 May 2026 | 50.00 | | 2100.00 | 0.00 | | 0.00 | + | 139 | 19 May 2026 | 50.00 | | 2050.00 | 0.00 | | 0.00 | + | 140 | 20 May 2026 | 50.00 | | 2000.00 | 0.00 | | 0.00 | + | 141 | 21 May 2026 | 50.00 | | 1950.00 | 0.00 | | 0.00 | + | 142 | 22 May 2026 | 50.00 | | 1900.00 | 0.00 | | 0.00 | + | 143 | 23 May 2026 | 50.00 | | 1850.00 | 0.00 | | 0.00 | + | 144 | 24 May 2026 | 50.00 | | 1800.00 | 0.00 | | 0.00 | + | 145 | 25 May 2026 | 50.00 | | 1750.00 | 0.00 | | 0.00 | + | 146 | 26 May 2026 | 50.00 | | 1700.00 | 0.00 | | 0.00 | + | 147 | 27 May 2026 | 50.00 | | 1650.00 | 0.00 | | 0.00 | + | 148 | 28 May 2026 | 50.00 | | 1600.00 | 0.00 | | 0.00 | + | 149 | 29 May 2026 | 50.00 | | 1550.00 | 0.00 | | 0.00 | + | 150 | 30 May 2026 | 50.00 | | 1500.00 | 0.00 | | 0.00 | + | 151 | 31 May 2026 | 50.00 | | 1450.00 | 0.00 | | 0.00 | + | 152 | 01 June 2026 | 50.00 | | 1400.00 | 0.00 | | 0.00 | + | 153 | 02 June 2026 | 50.00 | | 1350.00 | 0.00 | | 0.00 | + | 154 | 03 June 2026 | 50.00 | | 1300.00 | 0.00 | | 0.00 | + | 155 | 04 June 2026 | 50.00 | | 1250.00 | 0.00 | | 0.00 | + | 156 | 05 June 2026 | 50.00 | | 1200.00 | 0.00 | | 0.00 | + | 157 | 06 June 2026 | 50.00 | | 1150.00 | 0.00 | | 0.00 | + | 158 | 07 June 2026 | 50.00 | | 1100.00 | 0.00 | | 0.00 | + | 159 | 08 June 2026 | 50.00 | | 1050.00 | 0.00 | | 0.00 | + | 160 | 09 June 2026 | 50.00 | | 1000.00 | 0.00 | | 0.00 | + | 161 | 10 June 2026 | 50.00 | | 950.00 | 0.00 | | 0.00 | + | 162 | 11 June 2026 | 50.00 | | 900.00 | 0.00 | | 0.00 | + | 163 | 12 June 2026 | 50.00 | | 850.00 | 0.00 | | 0.00 | + | 164 | 13 June 2026 | 50.00 | | 800.00 | 0.00 | | 0.00 | + | 165 | 14 June 2026 | 50.00 | | 750.00 | 0.00 | | 0.00 | + | 166 | 15 June 2026 | 50.00 | | 700.00 | 0.00 | | 0.00 | + | 167 | 16 June 2026 | 50.00 | | 650.00 | 0.00 | | 0.00 | + | 168 | 17 June 2026 | 50.00 | | 600.00 | 0.00 | | 0.00 | + | 169 | 18 June 2026 | 50.00 | | 550.00 | 0.00 | | 0.00 | + | 170 | 19 June 2026 | 50.00 | | 500.00 | 0.00 | | 0.00 | + | 171 | 20 June 2026 | 50.00 | | 450.00 | 0.00 | | 0.00 | + | 172 | 21 June 2026 | 50.00 | | 400.00 | 0.00 | | 0.00 | + | 173 | 22 June 2026 | 50.00 | | 350.00 | 0.00 | | 0.00 | + | 174 | 23 June 2026 | 50.00 | | 300.00 | 0.00 | | 0.00 | + | 175 | 24 June 2026 | 50.00 | | 250.00 | 0.00 | | 0.00 | + | 176 | 25 June 2026 | 50.00 | | 200.00 | 0.00 | | 0.00 | + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 280.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 280.0 | 280.0 | 0.0 | 0.0 | false | + When Admin sets the business date to "02 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 280.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 280.0 | 280.0 | 0.0 | 0.0 | false | + + @TestRailId:C85166 + Scenario: Verify working capital loan repayment - amount matches to expectedAmount repaid on disbursement day - UC6.3 + 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | + And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" + Then Working capital loan approval was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | proposedPrincipal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discountApproved | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + And Verify Working Capital loan disbursement was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discount | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin runs inline COB job for Working Capital Loan by loanId + And Customer makes repayment on "01 January 2026" with 270.0 transaction amount on Working Capital loan + Then Working Capital loan delinquency range schedule has the following data: + | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | + | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 270.0 | 0.0 | true | 0.0 | 0 | + Then Working Capital loan amortization schedule has 177 periods, with the following data for periods: + | paymentNo | paymentDate | expectedPaymentAmount | actualPaymentAmount | expectedBalance | expectedAmortizationAmount | actualAmortizationAmount | expectedDiscountFeeBalance | + | 0 | 01 January 2026 | -9000.00 | | 9000.00 | | | 0.00 | + | 1 | 01 January 2026 | 50.00 | 270.00 | 8950.00 | 0.00 | 0.00 | 0.00 | + | 2 | 02 January 2026 | 50.00 | | 8900.00 | 0.00 | | 0.00 | + | 3 | 03 January 2026 | 50.00 | | 8850.00 | 0.00 | | 0.00 | + | 4 | 04 January 2026 | 50.00 | | 8800.00 | 0.00 | | 0.00 | + | 5 | 05 January 2026 | 50.00 | | 8750.00 | 0.00 | | 0.00 | + | 6 | 06 January 2026 | 50.00 | | 8700.00 | 0.00 | | 0.00 | + | 7 | 07 January 2026 | 50.00 | | 8650.00 | 0.00 | | 0.00 | + | 8 | 08 January 2026 | 50.00 | | 8600.00 | 0.00 | | 0.00 | + | 9 | 09 January 2026 | 50.00 | | 8550.00 | 0.00 | | 0.00 | + | 10 | 10 January 2026 | 50.00 | | 8500.00 | 0.00 | | 0.00 | + | 11 | 11 January 2026 | 50.00 | | 8450.00 | 0.00 | | 0.00 | + | 12 | 12 January 2026 | 50.00 | | 8400.00 | 0.00 | | 0.00 | + | 13 | 13 January 2026 | 50.00 | | 8350.00 | 0.00 | | 0.00 | + | 14 | 14 January 2026 | 50.00 | | 8300.00 | 0.00 | | 0.00 | + | 15 | 15 January 2026 | 50.00 | | 8250.00 | 0.00 | | 0.00 | + | 16 | 16 January 2026 | 50.00 | | 8200.00 | 0.00 | | 0.00 | + | 17 | 17 January 2026 | 50.00 | | 8150.00 | 0.00 | | 0.00 | + | 18 | 18 January 2026 | 50.00 | | 8100.00 | 0.00 | | 0.00 | + | 19 | 19 January 2026 | 50.00 | | 8050.00 | 0.00 | | 0.00 | + | 20 | 20 January 2026 | 50.00 | | 8000.00 | 0.00 | | 0.00 | + | 21 | 21 January 2026 | 50.00 | | 7950.00 | 0.00 | | 0.00 | + | 22 | 22 January 2026 | 50.00 | | 7900.00 | 0.00 | | 0.00 | + | 23 | 23 January 2026 | 50.00 | | 7850.00 | 0.00 | | 0.00 | + | 24 | 24 January 2026 | 50.00 | | 7800.00 | 0.00 | | 0.00 | + | 25 | 25 January 2026 | 50.00 | | 7750.00 | 0.00 | | 0.00 | + | 26 | 26 January 2026 | 50.00 | | 7700.00 | 0.00 | | 0.00 | + | 27 | 27 January 2026 | 50.00 | | 7650.00 | 0.00 | | 0.00 | + | 28 | 28 January 2026 | 50.00 | | 7600.00 | 0.00 | | 0.00 | + | 29 | 29 January 2026 | 50.00 | | 7550.00 | 0.00 | | 0.00 | + | 30 | 30 January 2026 | 50.00 | | 7500.00 | 0.00 | | 0.00 | + | 31 | 31 January 2026 | 50.00 | | 7450.00 | 0.00 | | 0.00 | + | 32 | 01 February 2026 | 50.00 | | 7400.00 | 0.00 | | 0.00 | + | 33 | 02 February 2026 | 50.00 | | 7350.00 | 0.00 | | 0.00 | + | 34 | 03 February 2026 | 50.00 | | 7300.00 | 0.00 | | 0.00 | + | 35 | 04 February 2026 | 50.00 | | 7250.00 | 0.00 | | 0.00 | + | 36 | 05 February 2026 | 50.00 | | 7200.00 | 0.00 | | 0.00 | + | 37 | 06 February 2026 | 50.00 | | 7150.00 | 0.00 | | 0.00 | + | 38 | 07 February 2026 | 50.00 | | 7100.00 | 0.00 | | 0.00 | + | 39 | 08 February 2026 | 50.00 | | 7050.00 | 0.00 | | 0.00 | + | 40 | 09 February 2026 | 50.00 | | 7000.00 | 0.00 | | 0.00 | + | 41 | 10 February 2026 | 50.00 | | 6950.00 | 0.00 | | 0.00 | + | 42 | 11 February 2026 | 50.00 | | 6900.00 | 0.00 | | 0.00 | + | 43 | 12 February 2026 | 50.00 | | 6850.00 | 0.00 | | 0.00 | + | 44 | 13 February 2026 | 50.00 | | 6800.00 | 0.00 | | 0.00 | + | 45 | 14 February 2026 | 50.00 | | 6750.00 | 0.00 | | 0.00 | + | 46 | 15 February 2026 | 50.00 | | 6700.00 | 0.00 | | 0.00 | + | 47 | 16 February 2026 | 50.00 | | 6650.00 | 0.00 | | 0.00 | + | 48 | 17 February 2026 | 50.00 | | 6600.00 | 0.00 | | 0.00 | + | 49 | 18 February 2026 | 50.00 | | 6550.00 | 0.00 | | 0.00 | + | 50 | 19 February 2026 | 50.00 | | 6500.00 | 0.00 | | 0.00 | + | 51 | 20 February 2026 | 50.00 | | 6450.00 | 0.00 | | 0.00 | + | 52 | 21 February 2026 | 50.00 | | 6400.00 | 0.00 | | 0.00 | + | 53 | 22 February 2026 | 50.00 | | 6350.00 | 0.00 | | 0.00 | + | 54 | 23 February 2026 | 50.00 | | 6300.00 | 0.00 | | 0.00 | + | 55 | 24 February 2026 | 50.00 | | 6250.00 | 0.00 | | 0.00 | + | 56 | 25 February 2026 | 50.00 | | 6200.00 | 0.00 | | 0.00 | + | 57 | 26 February 2026 | 50.00 | | 6150.00 | 0.00 | | 0.00 | + | 58 | 27 February 2026 | 50.00 | | 6100.00 | 0.00 | | 0.00 | + | 59 | 28 February 2026 | 50.00 | | 6050.00 | 0.00 | | 0.00 | + | 60 | 01 March 2026 | 50.00 | | 6000.00 | 0.00 | | 0.00 | + | 61 | 02 March 2026 | 50.00 | | 5950.00 | 0.00 | | 0.00 | + | 62 | 03 March 2026 | 50.00 | | 5900.00 | 0.00 | | 0.00 | + | 63 | 04 March 2026 | 50.00 | | 5850.00 | 0.00 | | 0.00 | + | 64 | 05 March 2026 | 50.00 | | 5800.00 | 0.00 | | 0.00 | + | 65 | 06 March 2026 | 50.00 | | 5750.00 | 0.00 | | 0.00 | + | 66 | 07 March 2026 | 50.00 | | 5700.00 | 0.00 | | 0.00 | + | 67 | 08 March 2026 | 50.00 | | 5650.00 | 0.00 | | 0.00 | + | 68 | 09 March 2026 | 50.00 | | 5600.00 | 0.00 | | 0.00 | + | 69 | 10 March 2026 | 50.00 | | 5550.00 | 0.00 | | 0.00 | + | 70 | 11 March 2026 | 50.00 | | 5500.00 | 0.00 | | 0.00 | + | 71 | 12 March 2026 | 50.00 | | 5450.00 | 0.00 | | 0.00 | + | 72 | 13 March 2026 | 50.00 | | 5400.00 | 0.00 | | 0.00 | + | 73 | 14 March 2026 | 50.00 | | 5350.00 | 0.00 | | 0.00 | + | 74 | 15 March 2026 | 50.00 | | 5300.00 | 0.00 | | 0.00 | + | 75 | 16 March 2026 | 50.00 | | 5250.00 | 0.00 | | 0.00 | + | 76 | 17 March 2026 | 50.00 | | 5200.00 | 0.00 | | 0.00 | + | 77 | 18 March 2026 | 50.00 | | 5150.00 | 0.00 | | 0.00 | + | 78 | 19 March 2026 | 50.00 | | 5100.00 | 0.00 | | 0.00 | + | 79 | 20 March 2026 | 50.00 | | 5050.00 | 0.00 | | 0.00 | + | 80 | 21 March 2026 | 50.00 | | 5000.00 | 0.00 | | 0.00 | + | 81 | 22 March 2026 | 50.00 | | 4950.00 | 0.00 | | 0.00 | + | 82 | 23 March 2026 | 50.00 | | 4900.00 | 0.00 | | 0.00 | + | 83 | 24 March 2026 | 50.00 | | 4850.00 | 0.00 | | 0.00 | + | 84 | 25 March 2026 | 50.00 | | 4800.00 | 0.00 | | 0.00 | + | 85 | 26 March 2026 | 50.00 | | 4750.00 | 0.00 | | 0.00 | + | 86 | 27 March 2026 | 50.00 | | 4700.00 | 0.00 | | 0.00 | + | 87 | 28 March 2026 | 50.00 | | 4650.00 | 0.00 | | 0.00 | + | 88 | 29 March 2026 | 50.00 | | 4600.00 | 0.00 | | 0.00 | + | 89 | 30 March 2026 | 50.00 | | 4550.00 | 0.00 | | 0.00 | + | 90 | 31 March 2026 | 50.00 | | 4500.00 | 0.00 | | 0.00 | + | 91 | 01 April 2026 | 50.00 | | 4450.00 | 0.00 | | 0.00 | + | 92 | 02 April 2026 | 50.00 | | 4400.00 | 0.00 | | 0.00 | + | 93 | 03 April 2026 | 50.00 | | 4350.00 | 0.00 | | 0.00 | + | 94 | 04 April 2026 | 50.00 | | 4300.00 | 0.00 | | 0.00 | + | 95 | 05 April 2026 | 50.00 | | 4250.00 | 0.00 | | 0.00 | + | 96 | 06 April 2026 | 50.00 | | 4200.00 | 0.00 | | 0.00 | + | 97 | 07 April 2026 | 50.00 | | 4150.00 | 0.00 | | 0.00 | + | 98 | 08 April 2026 | 50.00 | | 4100.00 | 0.00 | | 0.00 | + | 99 | 09 April 2026 | 50.00 | | 4050.00 | 0.00 | | 0.00 | + | 100 | 10 April 2026 | 50.00 | | 4000.00 | 0.00 | | 0.00 | + | 101 | 11 April 2026 | 50.00 | | 3950.00 | 0.00 | | 0.00 | + | 102 | 12 April 2026 | 50.00 | | 3900.00 | 0.00 | | 0.00 | + | 103 | 13 April 2026 | 50.00 | | 3850.00 | 0.00 | | 0.00 | + | 104 | 14 April 2026 | 50.00 | | 3800.00 | 0.00 | | 0.00 | + | 105 | 15 April 2026 | 50.00 | | 3750.00 | 0.00 | | 0.00 | + | 106 | 16 April 2026 | 50.00 | | 3700.00 | 0.00 | | 0.00 | + | 107 | 17 April 2026 | 50.00 | | 3650.00 | 0.00 | | 0.00 | + | 108 | 18 April 2026 | 50.00 | | 3600.00 | 0.00 | | 0.00 | + | 109 | 19 April 2026 | 50.00 | | 3550.00 | 0.00 | | 0.00 | + | 110 | 20 April 2026 | 50.00 | | 3500.00 | 0.00 | | 0.00 | + | 111 | 21 April 2026 | 50.00 | | 3450.00 | 0.00 | | 0.00 | + | 112 | 22 April 2026 | 50.00 | | 3400.00 | 0.00 | | 0.00 | + | 113 | 23 April 2026 | 50.00 | | 3350.00 | 0.00 | | 0.00 | + | 114 | 24 April 2026 | 50.00 | | 3300.00 | 0.00 | | 0.00 | + | 115 | 25 April 2026 | 50.00 | | 3250.00 | 0.00 | | 0.00 | + | 116 | 26 April 2026 | 50.00 | | 3200.00 | 0.00 | | 0.00 | + | 117 | 27 April 2026 | 50.00 | | 3150.00 | 0.00 | | 0.00 | + | 118 | 28 April 2026 | 50.00 | | 3100.00 | 0.00 | | 0.00 | + | 119 | 29 April 2026 | 50.00 | | 3050.00 | 0.00 | | 0.00 | + | 120 | 30 April 2026 | 50.00 | | 3000.00 | 0.00 | | 0.00 | + | 121 | 01 May 2026 | 50.00 | | 2950.00 | 0.00 | | 0.00 | + | 122 | 02 May 2026 | 50.00 | | 2900.00 | 0.00 | | 0.00 | + | 123 | 03 May 2026 | 50.00 | | 2850.00 | 0.00 | | 0.00 | + | 124 | 04 May 2026 | 50.00 | | 2800.00 | 0.00 | | 0.00 | + | 125 | 05 May 2026 | 50.00 | | 2750.00 | 0.00 | | 0.00 | + | 126 | 06 May 2026 | 50.00 | | 2700.00 | 0.00 | | 0.00 | + | 127 | 07 May 2026 | 50.00 | | 2650.00 | 0.00 | | 0.00 | + | 128 | 08 May 2026 | 50.00 | | 2600.00 | 0.00 | | 0.00 | + | 129 | 09 May 2026 | 50.00 | | 2550.00 | 0.00 | | 0.00 | + | 130 | 10 May 2026 | 50.00 | | 2500.00 | 0.00 | | 0.00 | + | 131 | 11 May 2026 | 50.00 | | 2450.00 | 0.00 | | 0.00 | + | 132 | 12 May 2026 | 50.00 | | 2400.00 | 0.00 | | 0.00 | + | 133 | 13 May 2026 | 50.00 | | 2350.00 | 0.00 | | 0.00 | + | 134 | 14 May 2026 | 50.00 | | 2300.00 | 0.00 | | 0.00 | + | 135 | 15 May 2026 | 50.00 | | 2250.00 | 0.00 | | 0.00 | + | 136 | 16 May 2026 | 50.00 | | 2200.00 | 0.00 | | 0.00 | + | 137 | 17 May 2026 | 50.00 | | 2150.00 | 0.00 | | 0.00 | + | 138 | 18 May 2026 | 50.00 | | 2100.00 | 0.00 | | 0.00 | + | 139 | 19 May 2026 | 50.00 | | 2050.00 | 0.00 | | 0.00 | + | 140 | 20 May 2026 | 50.00 | | 2000.00 | 0.00 | | 0.00 | + | 141 | 21 May 2026 | 50.00 | | 1950.00 | 0.00 | | 0.00 | + | 142 | 22 May 2026 | 50.00 | | 1900.00 | 0.00 | | 0.00 | + | 143 | 23 May 2026 | 50.00 | | 1850.00 | 0.00 | | 0.00 | + | 144 | 24 May 2026 | 50.00 | | 1800.00 | 0.00 | | 0.00 | + | 145 | 25 May 2026 | 50.00 | | 1750.00 | 0.00 | | 0.00 | + | 146 | 26 May 2026 | 50.00 | | 1700.00 | 0.00 | | 0.00 | + | 147 | 27 May 2026 | 50.00 | | 1650.00 | 0.00 | | 0.00 | + | 148 | 28 May 2026 | 50.00 | | 1600.00 | 0.00 | | 0.00 | + | 149 | 29 May 2026 | 50.00 | | 1550.00 | 0.00 | | 0.00 | + | 150 | 30 May 2026 | 50.00 | | 1500.00 | 0.00 | | 0.00 | + | 151 | 31 May 2026 | 50.00 | | 1450.00 | 0.00 | | 0.00 | + | 152 | 01 June 2026 | 50.00 | | 1400.00 | 0.00 | | 0.00 | + | 153 | 02 June 2026 | 50.00 | | 1350.00 | 0.00 | | 0.00 | + | 154 | 03 June 2026 | 50.00 | | 1300.00 | 0.00 | | 0.00 | + | 155 | 04 June 2026 | 50.00 | | 1250.00 | 0.00 | | 0.00 | + | 156 | 05 June 2026 | 50.00 | | 1200.00 | 0.00 | | 0.00 | + | 157 | 06 June 2026 | 50.00 | | 1150.00 | 0.00 | | 0.00 | + | 158 | 07 June 2026 | 50.00 | | 1100.00 | 0.00 | | 0.00 | + | 159 | 08 June 2026 | 50.00 | | 1050.00 | 0.00 | | 0.00 | + | 160 | 09 June 2026 | 50.00 | | 1000.00 | 0.00 | | 0.00 | + | 161 | 10 June 2026 | 50.00 | | 950.00 | 0.00 | | 0.00 | + | 162 | 11 June 2026 | 50.00 | | 900.00 | 0.00 | | 0.00 | + | 163 | 12 June 2026 | 50.00 | | 850.00 | 0.00 | | 0.00 | + | 164 | 13 June 2026 | 50.00 | | 800.00 | 0.00 | | 0.00 | + | 165 | 14 June 2026 | 50.00 | | 750.00 | 0.00 | | 0.00 | + | 166 | 15 June 2026 | 50.00 | | 700.00 | 0.00 | | 0.00 | + | 167 | 16 June 2026 | 50.00 | | 650.00 | 0.00 | | 0.00 | + | 168 | 17 June 2026 | 50.00 | | 600.00 | 0.00 | | 0.00 | + | 169 | 18 June 2026 | 50.00 | | 550.00 | 0.00 | | 0.00 | + | 170 | 19 June 2026 | 50.00 | | 500.00 | 0.00 | | 0.00 | + | 171 | 20 June 2026 | 50.00 | | 450.00 | 0.00 | | 0.00 | + | 172 | 21 June 2026 | 50.00 | | 400.00 | 0.00 | | 0.00 | + | 173 | 22 June 2026 | 50.00 | | 350.00 | 0.00 | | 0.00 | + | 174 | 23 June 2026 | 50.00 | | 300.00 | 0.00 | | 0.00 | + | 175 | 24 June 2026 | 50.00 | | 250.00 | 0.00 | | 0.00 | + | 176 | 25 June 2026 | 50.00 | | 200.00 | 0.00 | | 0.00 | + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 270.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 270.0 | 270.0 | 0.0 | 0.0 | false | + When Admin sets the business date to "02 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 270.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 270.0 | 270.0 | 0.0 | 0.0 | false | + + @TestRailId:C85167 + Scenario: Verify working capital loan repayment - amount that closes the loan is repaid on disbursement day - UC6.4 + 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | + And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" + Then Working capital loan approval was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | proposedPrincipal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discountApproved | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + And Verify Working Capital loan disbursement was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discount | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin runs inline COB job for Working Capital Loan by loanId + And Customer makes repayment on "01 January 2026" with 9000.0 transaction amount on Working Capital loan + Then Working Capital loan status will be "CLOSED_OBLIGATIONS_MET" + Then Working Capital loan delinquency range schedule has the following data: + | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | + | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 9000.0 | 0.0 | true | 0.0 | 0 | + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 9000.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + When Admin sets the business date to "02 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 9000.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + + @TestRailId:C85168 + Scenario: Verify working capital loan repayment - amount that overpays the loan is repaid on disbursement day - UC6.5 + 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | + And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" + Then Working capital loan approval was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | proposedPrincipal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discountApproved | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + And Verify Working Capital loan disbursement was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discount | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin runs inline COB job for Working Capital Loan by loanId + And Customer makes repayment on "01 January 2026" with 9100 transaction amount on Working Capital loan + Then Working Capital loan status will be "OVERPAID" + Then Working Capital loan delinquency range schedule has the following data: + | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | + | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 9000.0 | 0.0 | true | 0.0 | 0 | + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 9000.0 | 100000.0 | 0.0 | 0.0 | 100.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 9100.0 | 9000.0 | 0.0 | 0.0 | false | + When Admin sets the business date to "02 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 9000.0 | 100000.0 | 0.0 | 0.0 | 100.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 9100.0 | 9000.0 | 0.0 | 0.0 | false | + + @TestRailId:C85169 + Scenario: Verify working capital loan repayment - amount that overpays the loan is repaid on disbursement day with the following CBR afterwards - UC6.6 + 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | + And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" + Then Working capital loan approval was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | proposedPrincipal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discountApproved | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + And Verify Working Capital loan disbursement was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discount | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin runs inline COB job for Working Capital Loan by loanId + And Customer makes repayment on "01 January 2026" with 9100 transaction amount on Working Capital loan + Then Working Capital loan status will be "OVERPAID" + Then Working Capital loan delinquency range schedule has the following data: + | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | + | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 9000.0 | 0.0 | true | 0.0 | 0 | + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 9000.0 | 100000.0 | 0.0 | 0.0 | 100.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 9100.0 | 9000.0 | 0.0 | 0.0 | false | + And Customer makes credit balance refund on "01 January 2026" with 100.0 transaction amount on Working Capital loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 9000.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 9100.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Credit Balance Refund | 100.0 | 100.0 | 0.0 | 0.0 | false | + When Admin sets the business date to "02 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 9000.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 9100.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Credit Balance Refund | 100.0 | 100.0 | 0.0 | 0.0 | false | + + @TestRailId:C85170 + Scenario: Verify working capital loan repayment - multiple repayments on disbursement day - UC6.7 + 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | + And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" + Then Working capital loan approval was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | proposedPrincipal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discountApproved | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + And Verify Working Capital loan disbursement was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discount | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin runs inline COB job for Working Capital Loan by loanId + And Customer makes repayment on "01 January 2026" with 20.0 transaction amount on Working Capital loan + And Customer makes repayment on "01 January 2026" with 50.0 transaction amount on Working Capital loan + And Customer makes repayment on "01 January 2026" with 30.0 transaction amount on Working Capital loan + Then Working Capital loan delinquency range schedule has the following data: + | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | + | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 100.0 | 170.0 | null | null | null | + Then Working Capital loan amortization schedule has 180 periods, with the following data for periods: + | paymentNo | paymentDate | expectedPaymentAmount | actualPaymentAmount | expectedBalance | expectedAmortizationAmount | actualAmortizationAmount | expectedDiscountFeeBalance | + | 0 | 01 January 2026 | -9000.00 | | 9000.00 | | | 0.00 | + | 1 | 01 January 2026 | 50.00 | 100.00 | 8950.00 | 0.00 | 0.00 | 0.00 | + | 2 | 02 January 2026 | 50.00 | | 8900.00 | 0.00 | | 0.00 | + | 3 | 03 January 2026 | 50.00 | | 8850.00 | 0.00 | | 0.00 | + | 4 | 04 January 2026 | 50.00 | | 8800.00 | 0.00 | | 0.00 | + | 5 | 05 January 2026 | 50.00 | | 8750.00 | 0.00 | | 0.00 | + | 6 | 06 January 2026 | 50.00 | | 8700.00 | 0.00 | | 0.00 | + | 7 | 07 January 2026 | 50.00 | | 8650.00 | 0.00 | | 0.00 | + | 8 | 08 January 2026 | 50.00 | | 8600.00 | 0.00 | | 0.00 | + | 9 | 09 January 2026 | 50.00 | | 8550.00 | 0.00 | | 0.00 | + | 10 | 10 January 2026 | 50.00 | | 8500.00 | 0.00 | | 0.00 | + | 11 | 11 January 2026 | 50.00 | | 8450.00 | 0.00 | | 0.00 | + | 12 | 12 January 2026 | 50.00 | | 8400.00 | 0.00 | | 0.00 | + | 13 | 13 January 2026 | 50.00 | | 8350.00 | 0.00 | | 0.00 | + | 14 | 14 January 2026 | 50.00 | | 8300.00 | 0.00 | | 0.00 | + | 15 | 15 January 2026 | 50.00 | | 8250.00 | 0.00 | | 0.00 | + | 16 | 16 January 2026 | 50.00 | | 8200.00 | 0.00 | | 0.00 | + | 17 | 17 January 2026 | 50.00 | | 8150.00 | 0.00 | | 0.00 | + | 18 | 18 January 2026 | 50.00 | | 8100.00 | 0.00 | | 0.00 | + | 19 | 19 January 2026 | 50.00 | | 8050.00 | 0.00 | | 0.00 | + | 20 | 20 January 2026 | 50.00 | | 8000.00 | 0.00 | | 0.00 | + | 21 | 21 January 2026 | 50.00 | | 7950.00 | 0.00 | | 0.00 | + | 22 | 22 January 2026 | 50.00 | | 7900.00 | 0.00 | | 0.00 | + | 23 | 23 January 2026 | 50.00 | | 7850.00 | 0.00 | | 0.00 | + | 24 | 24 January 2026 | 50.00 | | 7800.00 | 0.00 | | 0.00 | + | 25 | 25 January 2026 | 50.00 | | 7750.00 | 0.00 | | 0.00 | + | 26 | 26 January 2026 | 50.00 | | 7700.00 | 0.00 | | 0.00 | + | 27 | 27 January 2026 | 50.00 | | 7650.00 | 0.00 | | 0.00 | + | 28 | 28 January 2026 | 50.00 | | 7600.00 | 0.00 | | 0.00 | + | 29 | 29 January 2026 | 50.00 | | 7550.00 | 0.00 | | 0.00 | + | 30 | 30 January 2026 | 50.00 | | 7500.00 | 0.00 | | 0.00 | + | 31 | 31 January 2026 | 50.00 | | 7450.00 | 0.00 | | 0.00 | + | 32 | 01 February 2026 | 50.00 | | 7400.00 | 0.00 | | 0.00 | + | 33 | 02 February 2026 | 50.00 | | 7350.00 | 0.00 | | 0.00 | + | 34 | 03 February 2026 | 50.00 | | 7300.00 | 0.00 | | 0.00 | + | 35 | 04 February 2026 | 50.00 | | 7250.00 | 0.00 | | 0.00 | + | 36 | 05 February 2026 | 50.00 | | 7200.00 | 0.00 | | 0.00 | + | 37 | 06 February 2026 | 50.00 | | 7150.00 | 0.00 | | 0.00 | + | 38 | 07 February 2026 | 50.00 | | 7100.00 | 0.00 | | 0.00 | + | 39 | 08 February 2026 | 50.00 | | 7050.00 | 0.00 | | 0.00 | + | 40 | 09 February 2026 | 50.00 | | 7000.00 | 0.00 | | 0.00 | + | 41 | 10 February 2026 | 50.00 | | 6950.00 | 0.00 | | 0.00 | + | 42 | 11 February 2026 | 50.00 | | 6900.00 | 0.00 | | 0.00 | + | 43 | 12 February 2026 | 50.00 | | 6850.00 | 0.00 | | 0.00 | + | 44 | 13 February 2026 | 50.00 | | 6800.00 | 0.00 | | 0.00 | + | 45 | 14 February 2026 | 50.00 | | 6750.00 | 0.00 | | 0.00 | + | 46 | 15 February 2026 | 50.00 | | 6700.00 | 0.00 | | 0.00 | + | 47 | 16 February 2026 | 50.00 | | 6650.00 | 0.00 | | 0.00 | + | 48 | 17 February 2026 | 50.00 | | 6600.00 | 0.00 | | 0.00 | + | 49 | 18 February 2026 | 50.00 | | 6550.00 | 0.00 | | 0.00 | + | 50 | 19 February 2026 | 50.00 | | 6500.00 | 0.00 | | 0.00 | + | 51 | 20 February 2026 | 50.00 | | 6450.00 | 0.00 | | 0.00 | + | 52 | 21 February 2026 | 50.00 | | 6400.00 | 0.00 | | 0.00 | + | 53 | 22 February 2026 | 50.00 | | 6350.00 | 0.00 | | 0.00 | + | 54 | 23 February 2026 | 50.00 | | 6300.00 | 0.00 | | 0.00 | + | 55 | 24 February 2026 | 50.00 | | 6250.00 | 0.00 | | 0.00 | + | 56 | 25 February 2026 | 50.00 | | 6200.00 | 0.00 | | 0.00 | + | 57 | 26 February 2026 | 50.00 | | 6150.00 | 0.00 | | 0.00 | + | 58 | 27 February 2026 | 50.00 | | 6100.00 | 0.00 | | 0.00 | + | 59 | 28 February 2026 | 50.00 | | 6050.00 | 0.00 | | 0.00 | + | 60 | 01 March 2026 | 50.00 | | 6000.00 | 0.00 | | 0.00 | + | 61 | 02 March 2026 | 50.00 | | 5950.00 | 0.00 | | 0.00 | + | 62 | 03 March 2026 | 50.00 | | 5900.00 | 0.00 | | 0.00 | + | 63 | 04 March 2026 | 50.00 | | 5850.00 | 0.00 | | 0.00 | + | 64 | 05 March 2026 | 50.00 | | 5800.00 | 0.00 | | 0.00 | + | 65 | 06 March 2026 | 50.00 | | 5750.00 | 0.00 | | 0.00 | + | 66 | 07 March 2026 | 50.00 | | 5700.00 | 0.00 | | 0.00 | + | 67 | 08 March 2026 | 50.00 | | 5650.00 | 0.00 | | 0.00 | + | 68 | 09 March 2026 | 50.00 | | 5600.00 | 0.00 | | 0.00 | + | 69 | 10 March 2026 | 50.00 | | 5550.00 | 0.00 | | 0.00 | + | 70 | 11 March 2026 | 50.00 | | 5500.00 | 0.00 | | 0.00 | + | 71 | 12 March 2026 | 50.00 | | 5450.00 | 0.00 | | 0.00 | + | 72 | 13 March 2026 | 50.00 | | 5400.00 | 0.00 | | 0.00 | + | 73 | 14 March 2026 | 50.00 | | 5350.00 | 0.00 | | 0.00 | + | 74 | 15 March 2026 | 50.00 | | 5300.00 | 0.00 | | 0.00 | + | 75 | 16 March 2026 | 50.00 | | 5250.00 | 0.00 | | 0.00 | + | 76 | 17 March 2026 | 50.00 | | 5200.00 | 0.00 | | 0.00 | + | 77 | 18 March 2026 | 50.00 | | 5150.00 | 0.00 | | 0.00 | + | 78 | 19 March 2026 | 50.00 | | 5100.00 | 0.00 | | 0.00 | + | 79 | 20 March 2026 | 50.00 | | 5050.00 | 0.00 | | 0.00 | + | 80 | 21 March 2026 | 50.00 | | 5000.00 | 0.00 | | 0.00 | + | 81 | 22 March 2026 | 50.00 | | 4950.00 | 0.00 | | 0.00 | + | 82 | 23 March 2026 | 50.00 | | 4900.00 | 0.00 | | 0.00 | + | 83 | 24 March 2026 | 50.00 | | 4850.00 | 0.00 | | 0.00 | + | 84 | 25 March 2026 | 50.00 | | 4800.00 | 0.00 | | 0.00 | + | 85 | 26 March 2026 | 50.00 | | 4750.00 | 0.00 | | 0.00 | + | 86 | 27 March 2026 | 50.00 | | 4700.00 | 0.00 | | 0.00 | + | 87 | 28 March 2026 | 50.00 | | 4650.00 | 0.00 | | 0.00 | + | 88 | 29 March 2026 | 50.00 | | 4600.00 | 0.00 | | 0.00 | + | 89 | 30 March 2026 | 50.00 | | 4550.00 | 0.00 | | 0.00 | + | 90 | 31 March 2026 | 50.00 | | 4500.00 | 0.00 | | 0.00 | + | 91 | 01 April 2026 | 50.00 | | 4450.00 | 0.00 | | 0.00 | + | 92 | 02 April 2026 | 50.00 | | 4400.00 | 0.00 | | 0.00 | + | 93 | 03 April 2026 | 50.00 | | 4350.00 | 0.00 | | 0.00 | + | 94 | 04 April 2026 | 50.00 | | 4300.00 | 0.00 | | 0.00 | + | 95 | 05 April 2026 | 50.00 | | 4250.00 | 0.00 | | 0.00 | + | 96 | 06 April 2026 | 50.00 | | 4200.00 | 0.00 | | 0.00 | + | 97 | 07 April 2026 | 50.00 | | 4150.00 | 0.00 | | 0.00 | + | 98 | 08 April 2026 | 50.00 | | 4100.00 | 0.00 | | 0.00 | + | 99 | 09 April 2026 | 50.00 | | 4050.00 | 0.00 | | 0.00 | + | 100 | 10 April 2026 | 50.00 | | 4000.00 | 0.00 | | 0.00 | + | 101 | 11 April 2026 | 50.00 | | 3950.00 | 0.00 | | 0.00 | + | 102 | 12 April 2026 | 50.00 | | 3900.00 | 0.00 | | 0.00 | + | 103 | 13 April 2026 | 50.00 | | 3850.00 | 0.00 | | 0.00 | + | 104 | 14 April 2026 | 50.00 | | 3800.00 | 0.00 | | 0.00 | + | 105 | 15 April 2026 | 50.00 | | 3750.00 | 0.00 | | 0.00 | + | 106 | 16 April 2026 | 50.00 | | 3700.00 | 0.00 | | 0.00 | + | 107 | 17 April 2026 | 50.00 | | 3650.00 | 0.00 | | 0.00 | + | 108 | 18 April 2026 | 50.00 | | 3600.00 | 0.00 | | 0.00 | + | 109 | 19 April 2026 | 50.00 | | 3550.00 | 0.00 | | 0.00 | + | 110 | 20 April 2026 | 50.00 | | 3500.00 | 0.00 | | 0.00 | + | 111 | 21 April 2026 | 50.00 | | 3450.00 | 0.00 | | 0.00 | + | 112 | 22 April 2026 | 50.00 | | 3400.00 | 0.00 | | 0.00 | + | 113 | 23 April 2026 | 50.00 | | 3350.00 | 0.00 | | 0.00 | + | 114 | 24 April 2026 | 50.00 | | 3300.00 | 0.00 | | 0.00 | + | 115 | 25 April 2026 | 50.00 | | 3250.00 | 0.00 | | 0.00 | + | 116 | 26 April 2026 | 50.00 | | 3200.00 | 0.00 | | 0.00 | + | 117 | 27 April 2026 | 50.00 | | 3150.00 | 0.00 | | 0.00 | + | 118 | 28 April 2026 | 50.00 | | 3100.00 | 0.00 | | 0.00 | + | 119 | 29 April 2026 | 50.00 | | 3050.00 | 0.00 | | 0.00 | + | 120 | 30 April 2026 | 50.00 | | 3000.00 | 0.00 | | 0.00 | + | 121 | 01 May 2026 | 50.00 | | 2950.00 | 0.00 | | 0.00 | + | 122 | 02 May 2026 | 50.00 | | 2900.00 | 0.00 | | 0.00 | + | 123 | 03 May 2026 | 50.00 | | 2850.00 | 0.00 | | 0.00 | + | 124 | 04 May 2026 | 50.00 | | 2800.00 | 0.00 | | 0.00 | + | 125 | 05 May 2026 | 50.00 | | 2750.00 | 0.00 | | 0.00 | + | 126 | 06 May 2026 | 50.00 | | 2700.00 | 0.00 | | 0.00 | + | 127 | 07 May 2026 | 50.00 | | 2650.00 | 0.00 | | 0.00 | + | 128 | 08 May 2026 | 50.00 | | 2600.00 | 0.00 | | 0.00 | + | 129 | 09 May 2026 | 50.00 | | 2550.00 | 0.00 | | 0.00 | + | 130 | 10 May 2026 | 50.00 | | 2500.00 | 0.00 | | 0.00 | + | 131 | 11 May 2026 | 50.00 | | 2450.00 | 0.00 | | 0.00 | + | 132 | 12 May 2026 | 50.00 | | 2400.00 | 0.00 | | 0.00 | + | 133 | 13 May 2026 | 50.00 | | 2350.00 | 0.00 | | 0.00 | + | 134 | 14 May 2026 | 50.00 | | 2300.00 | 0.00 | | 0.00 | + | 135 | 15 May 2026 | 50.00 | | 2250.00 | 0.00 | | 0.00 | + | 136 | 16 May 2026 | 50.00 | | 2200.00 | 0.00 | | 0.00 | + | 137 | 17 May 2026 | 50.00 | | 2150.00 | 0.00 | | 0.00 | + | 138 | 18 May 2026 | 50.00 | | 2100.00 | 0.00 | | 0.00 | + | 139 | 19 May 2026 | 50.00 | | 2050.00 | 0.00 | | 0.00 | + | 140 | 20 May 2026 | 50.00 | | 2000.00 | 0.00 | | 0.00 | + | 141 | 21 May 2026 | 50.00 | | 1950.00 | 0.00 | | 0.00 | + | 142 | 22 May 2026 | 50.00 | | 1900.00 | 0.00 | | 0.00 | + | 143 | 23 May 2026 | 50.00 | | 1850.00 | 0.00 | | 0.00 | + | 144 | 24 May 2026 | 50.00 | | 1800.00 | 0.00 | | 0.00 | + | 145 | 25 May 2026 | 50.00 | | 1750.00 | 0.00 | | 0.00 | + | 146 | 26 May 2026 | 50.00 | | 1700.00 | 0.00 | | 0.00 | + | 147 | 27 May 2026 | 50.00 | | 1650.00 | 0.00 | | 0.00 | + | 148 | 28 May 2026 | 50.00 | | 1600.00 | 0.00 | | 0.00 | + | 149 | 29 May 2026 | 50.00 | | 1550.00 | 0.00 | | 0.00 | + | 150 | 30 May 2026 | 50.00 | | 1500.00 | 0.00 | | 0.00 | + | 151 | 31 May 2026 | 50.00 | | 1450.00 | 0.00 | | 0.00 | + | 152 | 01 June 2026 | 50.00 | | 1400.00 | 0.00 | | 0.00 | + | 153 | 02 June 2026 | 50.00 | | 1350.00 | 0.00 | | 0.00 | + | 154 | 03 June 2026 | 50.00 | | 1300.00 | 0.00 | | 0.00 | + | 155 | 04 June 2026 | 50.00 | | 1250.00 | 0.00 | | 0.00 | + | 156 | 05 June 2026 | 50.00 | | 1200.00 | 0.00 | | 0.00 | + | 157 | 06 June 2026 | 50.00 | | 1150.00 | 0.00 | | 0.00 | + | 158 | 07 June 2026 | 50.00 | | 1100.00 | 0.00 | | 0.00 | + | 159 | 08 June 2026 | 50.00 | | 1050.00 | 0.00 | | 0.00 | + | 160 | 09 June 2026 | 50.00 | | 1000.00 | 0.00 | | 0.00 | + | 161 | 10 June 2026 | 50.00 | | 950.00 | 0.00 | | 0.00 | + | 162 | 11 June 2026 | 50.00 | | 900.00 | 0.00 | | 0.00 | + | 163 | 12 June 2026 | 50.00 | | 850.00 | 0.00 | | 0.00 | + | 164 | 13 June 2026 | 50.00 | | 800.00 | 0.00 | | 0.00 | + | 165 | 14 June 2026 | 50.00 | | 750.00 | 0.00 | | 0.00 | + | 166 | 15 June 2026 | 50.00 | | 700.00 | 0.00 | | 0.00 | + | 167 | 16 June 2026 | 50.00 | | 650.00 | 0.00 | | 0.00 | + | 168 | 17 June 2026 | 50.00 | | 600.00 | 0.00 | | 0.00 | + | 169 | 18 June 2026 | 50.00 | | 550.00 | 0.00 | | 0.00 | + | 170 | 19 June 2026 | 50.00 | | 500.00 | 0.00 | | 0.00 | + | 171 | 20 June 2026 | 50.00 | | 450.00 | 0.00 | | 0.00 | + | 172 | 21 June 2026 | 50.00 | | 400.00 | 0.00 | | 0.00 | + | 173 | 22 June 2026 | 50.00 | | 350.00 | 0.00 | | 0.00 | + | 174 | 23 June 2026 | 50.00 | | 300.00 | 0.00 | | 0.00 | + | 175 | 24 June 2026 | 50.00 | | 250.00 | 0.00 | | 0.00 | + | 176 | 25 June 2026 | 50.00 | | 200.00 | 0.00 | | 0.00 | + | 177 | 26 June 2026 | 50.00 | | 150.00 | 0.00 | | 0.00 | + | 178 | 27 June 2026 | 50.00 | | 100.00 | 0.00 | | 0.00 | + | 179 | 28 June 2026 | 50.00 | | 50.00 | 0.00 | | 0.00 | + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 100.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 20.0 | 20.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 30.0 | 30.0 | 0.0 | 0.0 | false | + When Admin sets the business date to "02 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 9000.0 | 100.0 | 100000.0 | 0.0 | 0.0 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 20.0 | 20.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 30.0 | 30.0 | 0.0 | 0.0 | false | + + @TestRailId:C85171 + Scenario: Verify working capital loan repayment - discount after repayment on disbursement day - UC6.8 + 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_ADVANCED_ACCOUNTING | 01 January 2026 | 01 January 2026 | 9000 | 100000 | 18 | 0 | + And Admin successfully approves the working capital loan on "01 January 2026" with "9000" amount and expected disbursement date on "01 January 2026" + Then Working capital loan approval was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | proposedPrincipal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discountApproved | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Approved | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin successfully disburse the Working Capital loan on "01 January 2026" with "9000" EUR transaction amount + Then Working Capital loan status will be "ACTIVE" + And Verify Working Capital loan disbursement was successful + And Working capital loan account has the correct data: + | product.name | submittedOnDate | expectedDisbursementDate | status | principal | approvedPrincipal | totalPaymentVolume | periodPaymentRate | discount | + | WCLP_ADVANCED_ACCOUNTING | 2026-01-01 | 2026-01-01 | Active | 9000.0 | 9000.0 | 100000.0 | 18.0 | null | + When Admin runs inline COB job for Working Capital Loan by loanId + And Customer makes repayment on "01 January 2026" with 50 transaction amount on Working Capital loan +# --- add discount after disbursement on the same disbursement date --- # + Then Admin adds Discount fee with "1000" amount on Working Capital loan account for last disbursement + Then Working Capital loan delinquency range schedule has the following data: + | periodNumber | fromDate | toDate | expectedAmount | paidAmount | outstandingAmount | minPaymentCriteriaMet | delinquentAmount | delinquentDays | + | 1 | 2026-01-01 | 2026-01-30 | 270.0 | 50.0 | 220.0 | null | null | null | + Then Working Capital loan amortization schedule has 201 periods, with the following data for periods: + | paymentNo | paymentDate | expectedPaymentAmount | actualPaymentAmount | expectedBalance | expectedAmortizationAmount | actualAmortizationAmount | expectedDiscountFeeBalance | actualDiscountFeeBalance | + | 0 | 01 January 2026 | -9000.00 | | 9000.00 | | | 1000.00 | 1000.00 | + | 1 | 01 January 2026 | 50.00 | 50.00 | 8959.61 | 9.61 | 9.61 | 990.39 | 990.39 | + | 2 | 02 January 2026 | 50.00 | | 8919.18 | 9.57 | | 980.82 | | + | 3 | 03 January 2026 | 50.00 | | 8878.70 | 9.52 | | 971.30 | | + | 4 | 04 January 2026 | 50.00 | | 8838.18 | 9.48 | | 961.82 | | + | 5 | 05 January 2026 | 50.00 | | 8797.62 | 9.44 | | 952.38 | | + | 6 | 06 January 2026 | 50.00 | | 8757.01 | 9.39 | | 942.99 | | + | 7 | 07 January 2026 | 50.00 | | 8716.36 | 9.35 | | 933.64 | | + | 8 | 08 January 2026 | 50.00 | | 8675.67 | 9.31 | | 924.33 | | + | 9 | 09 January 2026 | 50.00 | | 8634.94 | 9.26 | | 915.07 | | + | 10 | 10 January 2026 | 50.00 | | 8594.16 | 9.22 | | 905.85 | | + | 11 | 11 January 2026 | 50.00 | | 8553.33 | 9.18 | | 896.67 | | + | 12 | 12 January 2026 | 50.00 | | 8512.47 | 9.13 | | 887.54 | | + | 13 | 13 January 2026 | 50.00 | | 8471.56 | 9.09 | | 878.45 | | + | 14 | 14 January 2026 | 50.00 | | 8430.60 | 9.05 | | 869.40 | | + | 15 | 15 January 2026 | 50.00 | | 8389.61 | 9.00 | | 860.40 | | + | 16 | 16 January 2026 | 50.00 | | 8348.56 | 8.96 | | 851.44 | | + | 17 | 17 January 2026 | 50.00 | | 8307.48 | 8.91 | | 842.53 | | + | 18 | 18 January 2026 | 50.00 | | 8266.35 | 8.87 | | 833.66 | | + | 19 | 19 January 2026 | 50.00 | | 8225.18 | 8.83 | | 824.83 | | + | 20 | 20 January 2026 | 50.00 | | 8183.96 | 8.78 | | 816.05 | | + | 21 | 21 January 2026 | 50.00 | | 8142.70 | 8.74 | | 807.31 | | + | 22 | 22 January 2026 | 50.00 | | 8101.39 | 8.69 | | 798.62 | | + | 23 | 23 January 2026 | 50.00 | | 8060.04 | 8.65 | | 789.97 | | + | 24 | 24 January 2026 | 50.00 | | 8018.65 | 8.61 | | 781.36 | | + | 25 | 25 January 2026 | 50.00 | | 7977.21 | 8.56 | | 772.80 | | + | 26 | 26 January 2026 | 50.00 | | 7935.73 | 8.52 | | 764.28 | | + | 27 | 27 January 2026 | 50.00 | | 7894.21 | 8.47 | | 755.81 | | + | 28 | 28 January 2026 | 50.00 | | 7852.63 | 8.43 | | 747.38 | | + | 29 | 29 January 2026 | 50.00 | | 7811.02 | 8.39 | | 738.99 | | + | 30 | 30 January 2026 | 50.00 | | 7769.36 | 8.34 | | 730.65 | | + | 31 | 31 January 2026 | 50.00 | | 7727.66 | 8.30 | | 722.35 | | + | 32 | 01 February 2026 | 50.00 | | 7685.91 | 8.25 | | 714.10 | | + | 33 | 02 February 2026 | 50.00 | | 7644.12 | 8.21 | | 705.89 | | + | 34 | 03 February 2026 | 50.00 | | 7602.28 | 8.16 | | 697.73 | | + | 35 | 04 February 2026 | 50.00 | | 7560.40 | 8.12 | | 689.61 | | + | 36 | 05 February 2026 | 50.00 | | 7518.47 | 8.07 | | 681.54 | | + | 37 | 06 February 2026 | 50.00 | | 7476.50 | 8.03 | | 673.51 | | + | 38 | 07 February 2026 | 50.00 | | 7434.48 | 7.98 | | 665.53 | | + | 39 | 08 February 2026 | 50.00 | | 7392.42 | 7.94 | | 657.59 | | + | 40 | 09 February 2026 | 50.00 | | 7350.31 | 7.89 | | 649.70 | | + | 41 | 10 February 2026 | 50.00 | | 7308.16 | 7.85 | | 641.85 | | + | 42 | 11 February 2026 | 50.00 | | 7265.97 | 7.80 | | 634.05 | | + | 43 | 12 February 2026 | 50.00 | | 7223.72 | 7.76 | | 626.29 | | + | 44 | 13 February 2026 | 50.00 | | 7181.44 | 7.71 | | 618.58 | | + | 45 | 14 February 2026 | 50.00 | | 7139.11 | 7.67 | | 610.91 | | + | 46 | 15 February 2026 | 50.00 | | 7096.73 | 7.62 | | 603.29 | | + | 47 | 16 February 2026 | 50.00 | | 7054.31 | 7.58 | | 595.71 | | + | 48 | 17 February 2026 | 50.00 | | 7011.84 | 7.53 | | 588.18 | | + | 49 | 18 February 2026 | 50.00 | | 6969.33 | 7.49 | | 580.69 | | + | 50 | 19 February 2026 | 50.00 | | 6926.77 | 7.44 | | 573.25 | | + | 51 | 20 February 2026 | 50.00 | | 6884.17 | 7.40 | | 565.85 | | + | 52 | 21 February 2026 | 50.00 | | 6841.52 | 7.35 | | 558.50 | | + | 53 | 22 February 2026 | 50.00 | | 6798.82 | 7.31 | | 551.19 | | + | 54 | 23 February 2026 | 50.00 | | 6756.08 | 7.26 | | 543.93 | | + | 55 | 24 February 2026 | 50.00 | | 6713.30 | 7.21 | | 536.72 | | + | 56 | 25 February 2026 | 50.00 | | 6670.47 | 7.17 | | 529.55 | | + | 57 | 26 February 2026 | 50.00 | | 6627.59 | 7.12 | | 522.43 | | + | 58 | 27 February 2026 | 50.00 | | 6584.67 | 7.08 | | 515.35 | | + | 59 | 28 February 2026 | 50.00 | | 6541.70 | 7.03 | | 508.32 | | + | 60 | 01 March 2026 | 50.00 | | 6498.68 | 6.99 | | 501.33 | | + | 61 | 02 March 2026 | 50.00 | | 6455.62 | 6.94 | | 494.39 | | + | 62 | 03 March 2026 | 50.00 | | 6412.51 | 6.89 | | 487.50 | | + | 63 | 04 March 2026 | 50.00 | | 6369.36 | 6.85 | | 480.65 | | + | 64 | 05 March 2026 | 50.00 | | 6326.16 | 6.80 | | 473.85 | | + | 65 | 06 March 2026 | 50.00 | | 6282.92 | 6.76 | | 467.09 | | + | 66 | 07 March 2026 | 50.00 | | 6239.63 | 6.71 | | 460.38 | | + | 67 | 08 March 2026 | 50.00 | | 6196.29 | 6.66 | | 453.72 | | + | 68 | 09 March 2026 | 50.00 | | 6152.91 | 6.62 | | 447.10 | | + | 69 | 10 March 2026 | 50.00 | | 6109.48 | 6.57 | | 440.53 | | + | 70 | 11 March 2026 | 50.00 | | 6066.00 | 6.52 | | 434.01 | | + | 71 | 12 March 2026 | 50.00 | | 6022.48 | 6.48 | | 427.53 | | + | 72 | 13 March 2026 | 50.00 | | 5978.91 | 6.43 | | 421.10 | | + | 73 | 14 March 2026 | 50.00 | | 5935.29 | 6.38 | | 414.72 | | + | 74 | 15 March 2026 | 50.00 | | 5891.63 | 6.34 | | 408.38 | | + | 75 | 16 March 2026 | 50.00 | | 5847.92 | 6.29 | | 402.09 | | + | 76 | 17 March 2026 | 50.00 | | 5804.17 | 6.24 | | 395.85 | | + | 77 | 18 March 2026 | 50.00 | | 5760.36 | 6.20 | | 389.65 | | + | 78 | 19 March 2026 | 50.00 | | 5716.52 | 6.15 | | 383.50 | | + | 79 | 20 March 2026 | 50.00 | | 5672.62 | 6.10 | | 377.40 | | + | 80 | 21 March 2026 | 50.00 | | 5628.68 | 6.06 | | 371.34 | | + | 81 | 22 March 2026 | 50.00 | | 5584.69 | 6.01 | | 365.33 | | + | 82 | 23 March 2026 | 50.00 | | 5540.65 | 5.96 | | 359.37 | | + | 83 | 24 March 2026 | 50.00 | | 5496.57 | 5.92 | | 353.45 | | + | 84 | 25 March 2026 | 50.00 | | 5452.44 | 5.87 | | 347.58 | | + | 85 | 26 March 2026 | 50.00 | | 5408.26 | 5.82 | | 341.76 | | + | 86 | 27 March 2026 | 50.00 | | 5364.03 | 5.78 | | 335.98 | | + | 87 | 28 March 2026 | 50.00 | | 5319.76 | 5.73 | | 330.25 | | + | 88 | 29 March 2026 | 50.00 | | 5275.44 | 5.68 | | 324.57 | | + | 89 | 30 March 2026 | 50.00 | | 5231.08 | 5.63 | | 318.94 | | + | 90 | 31 March 2026 | 50.00 | | 5186.66 | 5.59 | | 313.35 | | + | 91 | 01 April 2026 | 50.00 | | 5142.20 | 5.54 | | 307.81 | | + | 92 | 02 April 2026 | 50.00 | | 5097.69 | 5.49 | | 302.32 | | + | 93 | 03 April 2026 | 50.00 | | 5053.13 | 5.44 | | 296.88 | | + | 94 | 04 April 2026 | 50.00 | | 5008.53 | 5.40 | | 291.48 | | + | 95 | 05 April 2026 | 50.00 | | 4963.88 | 5.35 | | 286.13 | | + | 96 | 06 April 2026 | 50.00 | | 4919.18 | 5.30 | | 280.83 | | + | 97 | 07 April 2026 | 50.00 | | 4874.43 | 5.25 | | 275.58 | | + | 98 | 08 April 2026 | 50.00 | | 4829.64 | 5.20 | | 270.38 | | + | 99 | 09 April 2026 | 50.00 | | 4784.79 | 5.16 | | 265.22 | | + | 100 | 10 April 2026 | 50.00 | | 4739.90 | 5.11 | | 260.11 | | + | 101 | 11 April 2026 | 50.00 | | 4694.96 | 5.06 | | 255.05 | | + | 102 | 12 April 2026 | 50.00 | | 4649.98 | 5.01 | | 250.04 | | + | 103 | 13 April 2026 | 50.00 | | 4604.94 | 4.97 | | 245.07 | | + | 104 | 14 April 2026 | 50.00 | | 4559.86 | 4.92 | | 240.15 | | + | 105 | 15 April 2026 | 50.00 | | 4514.73 | 4.87 | | 235.28 | | + | 106 | 16 April 2026 | 50.00 | | 4469.55 | 4.82 | | 230.46 | | + | 107 | 17 April 2026 | 50.00 | | 4424.32 | 4.77 | | 225.69 | | + | 108 | 18 April 2026 | 50.00 | | 4379.05 | 4.72 | | 220.97 | | + | 109 | 19 April 2026 | 50.00 | | 4333.72 | 4.68 | | 216.29 | | + | 110 | 20 April 2026 | 50.00 | | 4288.35 | 4.63 | | 211.66 | | + | 111 | 21 April 2026 | 50.00 | | 4242.93 | 4.58 | | 207.08 | | + | 112 | 22 April 2026 | 50.00 | | 4197.46 | 4.53 | | 202.55 | | + | 113 | 23 April 2026 | 50.00 | | 4151.94 | 4.48 | | 198.07 | | + | 114 | 24 April 2026 | 50.00 | | 4106.38 | 4.43 | | 193.64 | | + | 115 | 25 April 2026 | 50.00 | | 4060.76 | 4.38 | | 189.26 | | + | 116 | 26 April 2026 | 50.00 | | 4015.10 | 4.34 | | 184.92 | | + | 117 | 27 April 2026 | 50.00 | | 3969.38 | 4.29 | | 180.63 | | + | 118 | 28 April 2026 | 50.00 | | 3923.62 | 4.24 | | 176.39 | | + | 119 | 29 April 2026 | 50.00 | | 3877.81 | 4.19 | | 172.20 | | + | 120 | 30 April 2026 | 50.00 | | 3831.95 | 4.14 | | 168.06 | | + | 121 | 01 May 2026 | 50.00 | | 3786.04 | 4.09 | | 163.97 | | + | 122 | 02 May 2026 | 50.00 | | 3740.09 | 4.04 | | 159.93 | | + | 123 | 03 May 2026 | 50.00 | | 3694.08 | 3.99 | | 155.94 | | + | 124 | 04 May 2026 | 50.00 | | 3648.03 | 3.94 | | 152.00 | | + | 125 | 05 May 2026 | 50.00 | | 3601.92 | 3.90 | | 148.10 | | + | 126 | 06 May 2026 | 50.00 | | 3555.77 | 3.85 | | 144.25 | | + | 127 | 07 May 2026 | 50.00 | | 3509.56 | 3.80 | | 140.45 | | + | 128 | 08 May 2026 | 50.00 | | 3463.31 | 3.75 | | 136.70 | | + | 129 | 09 May 2026 | 50.00 | | 3417.01 | 3.70 | | 133.00 | | + | 130 | 10 May 2026 | 50.00 | | 3370.66 | 3.65 | | 129.35 | | + | 131 | 11 May 2026 | 50.00 | | 3324.26 | 3.60 | | 125.75 | | + | 132 | 12 May 2026 | 50.00 | | 3277.81 | 3.55 | | 122.20 | | + | 133 | 13 May 2026 | 50.00 | | 3231.31 | 3.50 | | 118.70 | | + | 134 | 14 May 2026 | 50.00 | | 3184.76 | 3.45 | | 115.25 | | + | 135 | 15 May 2026 | 50.00 | | 3138.16 | 3.40 | | 111.85 | | + | 136 | 16 May 2026 | 50.00 | | 3091.51 | 3.35 | | 108.50 | | + | 137 | 17 May 2026 | 50.00 | | 3044.81 | 3.30 | | 105.20 | | + | 138 | 18 May 2026 | 50.00 | | 2998.06 | 3.25 | | 101.95 | | + | 139 | 19 May 2026 | 50.00 | | 2951.26 | 3.20 | | 98.75 | | + | 140 | 20 May 2026 | 50.00 | | 2904.42 | 3.15 | | 95.60 | | + | 141 | 21 May 2026 | 50.00 | | 2857.52 | 3.10 | | 92.50 | | + | 142 | 22 May 2026 | 50.00 | | 2810.57 | 3.05 | | 89.45 | | + | 143 | 23 May 2026 | 50.00 | | 2763.57 | 3.00 | | 86.45 | | + | 144 | 24 May 2026 | 50.00 | | 2716.52 | 2.95 | | 83.50 | | + | 145 | 25 May 2026 | 50.00 | | 2669.42 | 2.90 | | 80.60 | | + | 146 | 26 May 2026 | 50.00 | | 2622.27 | 2.85 | | 77.75 | | + | 147 | 27 May 2026 | 50.00 | | 2575.07 | 2.80 | | 74.95 | | + | 148 | 28 May 2026 | 50.00 | | 2527.82 | 2.75 | | 72.20 | | + | 149 | 29 May 2026 | 50.00 | | 2480.52 | 2.70 | | 69.50 | | + | 150 | 30 May 2026 | 50.00 | | 2433.17 | 2.65 | | 66.85 | | + | 151 | 31 May 2026 | 50.00 | | 2385.77 | 2.60 | | 64.25 | | + | 152 | 01 June 2026 | 50.00 | | 2338.31 | 2.55 | | 61.70 | | + | 153 | 02 June 2026 | 50.00 | | 2290.81 | 2.50 | | 59.20 | | + | 154 | 03 June 2026 | 50.00 | | 2243.26 | 2.45 | | 56.75 | | + | 155 | 04 June 2026 | 50.00 | | 2195.65 | 2.40 | | 54.35 | | + | 156 | 05 June 2026 | 50.00 | | 2148.00 | 2.34 | | 52.01 | | + | 157 | 06 June 2026 | 50.00 | | 2100.29 | 2.29 | | 49.72 | | + | 158 | 07 June 2026 | 50.00 | | 2052.53 | 2.24 | | 47.48 | | + | 159 | 08 June 2026 | 50.00 | | 2004.73 | 2.19 | | 45.29 | | + | 160 | 09 June 2026 | 50.00 | | 1956.87 | 2.14 | | 43.15 | | + | 161 | 10 June 2026 | 50.00 | | 1908.96 | 2.09 | | 41.06 | | + | 162 | 11 June 2026 | 50.00 | | 1860.99 | 2.04 | | 39.02 | | + | 163 | 12 June 2026 | 50.00 | | 1812.98 | 1.99 | | 37.03 | | + | 164 | 13 June 2026 | 50.00 | | 1764.92 | 1.94 | | 35.09 | | + | 165 | 14 June 2026 | 50.00 | | 1716.80 | 1.88 | | 33.21 | | + | 166 | 15 June 2026 | 50.00 | | 1668.64 | 1.83 | | 31.38 | | + | 167 | 16 June 2026 | 50.00 | | 1620.42 | 1.78 | | 29.60 | | + | 168 | 17 June 2026 | 50.00 | | 1572.15 | 1.73 | | 27.87 | | + | 169 | 18 June 2026 | 50.00 | | 1523.83 | 1.68 | | 26.19 | | + | 170 | 19 June 2026 | 50.00 | | 1475.45 | 1.63 | | 24.56 | | + | 171 | 20 June 2026 | 50.00 | | 1427.03 | 1.58 | | 22.98 | | + | 172 | 21 June 2026 | 50.00 | | 1378.55 | 1.52 | | 21.46 | | + | 173 | 22 June 2026 | 50.00 | | 1330.02 | 1.47 | | 19.99 | | + | 174 | 23 June 2026 | 50.00 | | 1281.45 | 1.42 | | 18.57 | | + | 175 | 24 June 2026 | 50.00 | | 1232.81 | 1.37 | | 17.20 | | + | 176 | 25 June 2026 | 50.00 | | 1184.13 | 1.32 | | 15.88 | | + | 177 | 26 June 2026 | 50.00 | | 1135.39 | 1.26 | | 14.62 | | + | 178 | 27 June 2026 | 50.00 | | 1086.61 | 1.21 | | 13.41 | | + | 179 | 28 June 2026 | 50.00 | | 1037.77 | 1.16 | | 12.25 | | + | 180 | 29 June 2026 | 50.00 | | 988.88 | 1.11 | | 11.14 | | + | 181 | 30 June 2026 | 50.00 | | 939.93 | 1.06 | | 10.08 | | + | 182 | 01 July 2026 | 50.00 | | 890.93 | 1.00 | | 9.08 | | + | 183 | 02 July 2026 | 50.00 | | 841.89 | 0.95 | | 8.13 | | + | 184 | 03 July 2026 | 50.00 | | 792.79 | 0.90 | | 7.23 | | + | 185 | 04 July 2026 | 50.00 | | 743.63 | 0.85 | | 6.38 | | + | 186 | 05 July 2026 | 50.00 | | 694.43 | 0.79 | | 5.59 | | + | 187 | 06 July 2026 | 50.00 | | 645.17 | 0.74 | | 4.85 | | + | 188 | 07 July 2026 | 50.00 | | 595.86 | 0.69 | | 4.16 | | + | 189 | 08 July 2026 | 50.00 | | 546.49 | 0.64 | | 3.52 | | + | 190 | 09 July 2026 | 50.00 | | 497.08 | 0.58 | | 2.94 | | + | 191 | 10 July 2026 | 50.00 | | 447.61 | 0.53 | | 2.41 | | + | 192 | 11 July 2026 | 50.00 | | 398.08 | 0.48 | | 1.93 | | + | 193 | 12 July 2026 | 50.00 | | 348.51 | 0.43 | | 1.50 | | + | 194 | 13 July 2026 | 50.00 | | 298.88 | 0.37 | | 1.13 | | + | 195 | 14 July 2026 | 50.00 | | 249.20 | 0.32 | | 0.81 | | + | 196 | 15 July 2026 | 50.00 | | 199.47 | 0.27 | | 0.54 | | + | 197 | 16 July 2026 | 50.00 | | 149.68 | 0.21 | | 0.33 | | + | 198 | 17 July 2026 | 50.00 | | 99.84 | 0.16 | | 0.17 | | + | 199 | 18 July 2026 | 50.00 | | 49.95 | 0.11 | | 0.06 | | + | 200 | 19 July 2026 | 50.00 | | 0.00 | 0.05 | | 0.01 | | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee | 1000.0 | 1000.0 | 0.0 | 0.0 | false | +# --- one more repayment - with amount 40 on disbursement day --- # + And Customer makes repayment on "01 January 2026" with 40 transaction amount on Working Capital loan + Then Working Capital loan amortization schedule has 201 periods, with the following data for periods: + | paymentNo | paymentDate | expectedPaymentAmount | actualPaymentAmount | expectedBalance | expectedAmortizationAmount | actualAmortizationAmount | expectedDiscountFeeBalance | actualDiscountFeeBalance | + | 0 | 01 January 2026 | -9000.00 | | 9000.00 | | | 1000.00 | 1000.00 | + | 1 | 01 January 2026 | 50.00 | 90.00 | 8959.61 | 9.61 | 17.27 | 990.39 | 982.73 | + | 2 | 02 January 2026 | 50.00 | | 8919.18 | 9.57 | | 980.82 | | + | 3 | 03 January 2026 | 50.00 | | 8878.70 | 9.52 | | 971.30 | | + | 4 | 04 January 2026 | 50.00 | | 8838.18 | 9.48 | | 961.82 | | + | 5 | 05 January 2026 | 50.00 | | 8797.62 | 9.44 | | 952.38 | | + | 6 | 06 January 2026 | 50.00 | | 8757.01 | 9.39 | | 942.99 | | + | 7 | 07 January 2026 | 50.00 | | 8716.36 | 9.35 | | 933.64 | | + | 8 | 08 January 2026 | 50.00 | | 8675.67 | 9.31 | | 924.33 | | + | 9 | 09 January 2026 | 50.00 | | 8634.94 | 9.26 | | 915.07 | | + | 10 | 10 January 2026 | 50.00 | | 8594.16 | 9.22 | | 905.85 | | + | 11 | 11 January 2026 | 50.00 | | 8553.33 | 9.18 | | 896.67 | | + | 12 | 12 January 2026 | 50.00 | | 8512.47 | 9.13 | | 887.54 | | + | 13 | 13 January 2026 | 50.00 | | 8471.56 | 9.09 | | 878.45 | | + | 14 | 14 January 2026 | 50.00 | | 8430.60 | 9.05 | | 869.40 | | + | 15 | 15 January 2026 | 50.00 | | 8389.61 | 9.00 | | 860.40 | | + | 16 | 16 January 2026 | 50.00 | | 8348.56 | 8.96 | | 851.44 | | + | 17 | 17 January 2026 | 50.00 | | 8307.48 | 8.91 | | 842.53 | | + | 18 | 18 January 2026 | 50.00 | | 8266.35 | 8.87 | | 833.66 | | + | 19 | 19 January 2026 | 50.00 | | 8225.18 | 8.83 | | 824.83 | | + | 20 | 20 January 2026 | 50.00 | | 8183.96 | 8.78 | | 816.05 | | + | 21 | 21 January 2026 | 50.00 | | 8142.70 | 8.74 | | 807.31 | | + | 22 | 22 January 2026 | 50.00 | | 8101.39 | 8.69 | | 798.62 | | + | 23 | 23 January 2026 | 50.00 | | 8060.04 | 8.65 | | 789.97 | | + | 24 | 24 January 2026 | 50.00 | | 8018.65 | 8.61 | | 781.36 | | + | 25 | 25 January 2026 | 50.00 | | 7977.21 | 8.56 | | 772.80 | | + | 26 | 26 January 2026 | 50.00 | | 7935.73 | 8.52 | | 764.28 | | + | 27 | 27 January 2026 | 50.00 | | 7894.21 | 8.47 | | 755.81 | | + | 28 | 28 January 2026 | 50.00 | | 7852.63 | 8.43 | | 747.38 | | + | 29 | 29 January 2026 | 50.00 | | 7811.02 | 8.39 | | 738.99 | | + | 30 | 30 January 2026 | 50.00 | | 7769.36 | 8.34 | | 730.65 | | + | 31 | 31 January 2026 | 50.00 | | 7727.66 | 8.30 | | 722.35 | | + | 32 | 01 February 2026 | 50.00 | | 7685.91 | 8.25 | | 714.10 | | + | 33 | 02 February 2026 | 50.00 | | 7644.12 | 8.21 | | 705.89 | | + | 34 | 03 February 2026 | 50.00 | | 7602.28 | 8.16 | | 697.73 | | + | 35 | 04 February 2026 | 50.00 | | 7560.40 | 8.12 | | 689.61 | | + | 36 | 05 February 2026 | 50.00 | | 7518.47 | 8.07 | | 681.54 | | + | 37 | 06 February 2026 | 50.00 | | 7476.50 | 8.03 | | 673.51 | | + | 38 | 07 February 2026 | 50.00 | | 7434.48 | 7.98 | | 665.53 | | + | 39 | 08 February 2026 | 50.00 | | 7392.42 | 7.94 | | 657.59 | | + | 40 | 09 February 2026 | 50.00 | | 7350.31 | 7.89 | | 649.70 | | + | 41 | 10 February 2026 | 50.00 | | 7308.16 | 7.85 | | 641.85 | | + | 42 | 11 February 2026 | 50.00 | | 7265.97 | 7.80 | | 634.05 | | + | 43 | 12 February 2026 | 50.00 | | 7223.72 | 7.76 | | 626.29 | | + | 44 | 13 February 2026 | 50.00 | | 7181.44 | 7.71 | | 618.58 | | + | 45 | 14 February 2026 | 50.00 | | 7139.11 | 7.67 | | 610.91 | | + | 46 | 15 February 2026 | 50.00 | | 7096.73 | 7.62 | | 603.29 | | + | 47 | 16 February 2026 | 50.00 | | 7054.31 | 7.58 | | 595.71 | | + | 48 | 17 February 2026 | 50.00 | | 7011.84 | 7.53 | | 588.18 | | + | 49 | 18 February 2026 | 50.00 | | 6969.33 | 7.49 | | 580.69 | | + | 50 | 19 February 2026 | 50.00 | | 6926.77 | 7.44 | | 573.25 | | + | 51 | 20 February 2026 | 50.00 | | 6884.17 | 7.40 | | 565.85 | | + | 52 | 21 February 2026 | 50.00 | | 6841.52 | 7.35 | | 558.50 | | + | 53 | 22 February 2026 | 50.00 | | 6798.82 | 7.31 | | 551.19 | | + | 54 | 23 February 2026 | 50.00 | | 6756.08 | 7.26 | | 543.93 | | + | 55 | 24 February 2026 | 50.00 | | 6713.30 | 7.21 | | 536.72 | | + | 56 | 25 February 2026 | 50.00 | | 6670.47 | 7.17 | | 529.55 | | + | 57 | 26 February 2026 | 50.00 | | 6627.59 | 7.12 | | 522.43 | | + | 58 | 27 February 2026 | 50.00 | | 6584.67 | 7.08 | | 515.35 | | + | 59 | 28 February 2026 | 50.00 | | 6541.70 | 7.03 | | 508.32 | | + | 60 | 01 March 2026 | 50.00 | | 6498.68 | 6.99 | | 501.33 | | + | 61 | 02 March 2026 | 50.00 | | 6455.62 | 6.94 | | 494.39 | | + | 62 | 03 March 2026 | 50.00 | | 6412.51 | 6.89 | | 487.50 | | + | 63 | 04 March 2026 | 50.00 | | 6369.36 | 6.85 | | 480.65 | | + | 64 | 05 March 2026 | 50.00 | | 6326.16 | 6.80 | | 473.85 | | + | 65 | 06 March 2026 | 50.00 | | 6282.92 | 6.76 | | 467.09 | | + | 66 | 07 March 2026 | 50.00 | | 6239.63 | 6.71 | | 460.38 | | + | 67 | 08 March 2026 | 50.00 | | 6196.29 | 6.66 | | 453.72 | | + | 68 | 09 March 2026 | 50.00 | | 6152.91 | 6.62 | | 447.10 | | + | 69 | 10 March 2026 | 50.00 | | 6109.48 | 6.57 | | 440.53 | | + | 70 | 11 March 2026 | 50.00 | | 6066.00 | 6.52 | | 434.01 | | + | 71 | 12 March 2026 | 50.00 | | 6022.48 | 6.48 | | 427.53 | | + | 72 | 13 March 2026 | 50.00 | | 5978.91 | 6.43 | | 421.10 | | + | 73 | 14 March 2026 | 50.00 | | 5935.29 | 6.38 | | 414.72 | | + | 74 | 15 March 2026 | 50.00 | | 5891.63 | 6.34 | | 408.38 | | + | 75 | 16 March 2026 | 50.00 | | 5847.92 | 6.29 | | 402.09 | | + | 76 | 17 March 2026 | 50.00 | | 5804.17 | 6.24 | | 395.85 | | + | 77 | 18 March 2026 | 50.00 | | 5760.36 | 6.20 | | 389.65 | | + | 78 | 19 March 2026 | 50.00 | | 5716.52 | 6.15 | | 383.50 | | + | 79 | 20 March 2026 | 50.00 | | 5672.62 | 6.10 | | 377.40 | | + | 80 | 21 March 2026 | 50.00 | | 5628.68 | 6.06 | | 371.34 | | + | 81 | 22 March 2026 | 50.00 | | 5584.69 | 6.01 | | 365.33 | | + | 82 | 23 March 2026 | 50.00 | | 5540.65 | 5.96 | | 359.37 | | + | 83 | 24 March 2026 | 50.00 | | 5496.57 | 5.92 | | 353.45 | | + | 84 | 25 March 2026 | 50.00 | | 5452.44 | 5.87 | | 347.58 | | + | 85 | 26 March 2026 | 50.00 | | 5408.26 | 5.82 | | 341.76 | | + | 86 | 27 March 2026 | 50.00 | | 5364.03 | 5.78 | | 335.98 | | + | 87 | 28 March 2026 | 50.00 | | 5319.76 | 5.73 | | 330.25 | | + | 88 | 29 March 2026 | 50.00 | | 5275.44 | 5.68 | | 324.57 | | + | 89 | 30 March 2026 | 50.00 | | 5231.08 | 5.63 | | 318.94 | | + | 90 | 31 March 2026 | 50.00 | | 5186.66 | 5.59 | | 313.35 | | + | 91 | 01 April 2026 | 50.00 | | 5142.20 | 5.54 | | 307.81 | | + | 92 | 02 April 2026 | 50.00 | | 5097.69 | 5.49 | | 302.32 | | + | 93 | 03 April 2026 | 50.00 | | 5053.13 | 5.44 | | 296.88 | | + | 94 | 04 April 2026 | 50.00 | | 5008.53 | 5.40 | | 291.48 | | + | 95 | 05 April 2026 | 50.00 | | 4963.88 | 5.35 | | 286.13 | | + | 96 | 06 April 2026 | 50.00 | | 4919.18 | 5.30 | | 280.83 | | + | 97 | 07 April 2026 | 50.00 | | 4874.43 | 5.25 | | 275.58 | | + | 98 | 08 April 2026 | 50.00 | | 4829.64 | 5.20 | | 270.38 | | + | 99 | 09 April 2026 | 50.00 | | 4784.79 | 5.16 | | 265.22 | | + | 100 | 10 April 2026 | 50.00 | | 4739.90 | 5.11 | | 260.11 | | + | 101 | 11 April 2026 | 50.00 | | 4694.96 | 5.06 | | 255.05 | | + | 102 | 12 April 2026 | 50.00 | | 4649.98 | 5.01 | | 250.04 | | + | 103 | 13 April 2026 | 50.00 | | 4604.94 | 4.97 | | 245.07 | | + | 104 | 14 April 2026 | 50.00 | | 4559.86 | 4.92 | | 240.15 | | + | 105 | 15 April 2026 | 50.00 | | 4514.73 | 4.87 | | 235.28 | | + | 106 | 16 April 2026 | 50.00 | | 4469.55 | 4.82 | | 230.46 | | + | 107 | 17 April 2026 | 50.00 | | 4424.32 | 4.77 | | 225.69 | | + | 108 | 18 April 2026 | 50.00 | | 4379.05 | 4.72 | | 220.97 | | + | 109 | 19 April 2026 | 50.00 | | 4333.72 | 4.68 | | 216.29 | | + | 110 | 20 April 2026 | 50.00 | | 4288.35 | 4.63 | | 211.66 | | + | 111 | 21 April 2026 | 50.00 | | 4242.93 | 4.58 | | 207.08 | | + | 112 | 22 April 2026 | 50.00 | | 4197.46 | 4.53 | | 202.55 | | + | 113 | 23 April 2026 | 50.00 | | 4151.94 | 4.48 | | 198.07 | | + | 114 | 24 April 2026 | 50.00 | | 4106.38 | 4.43 | | 193.64 | | + | 115 | 25 April 2026 | 50.00 | | 4060.76 | 4.38 | | 189.26 | | + | 116 | 26 April 2026 | 50.00 | | 4015.10 | 4.34 | | 184.92 | | + | 117 | 27 April 2026 | 50.00 | | 3969.38 | 4.29 | | 180.63 | | + | 118 | 28 April 2026 | 50.00 | | 3923.62 | 4.24 | | 176.39 | | + | 119 | 29 April 2026 | 50.00 | | 3877.81 | 4.19 | | 172.20 | | + | 120 | 30 April 2026 | 50.00 | | 3831.95 | 4.14 | | 168.06 | | + | 121 | 01 May 2026 | 50.00 | | 3786.04 | 4.09 | | 163.97 | | + | 122 | 02 May 2026 | 50.00 | | 3740.09 | 4.04 | | 159.93 | | + | 123 | 03 May 2026 | 50.00 | | 3694.08 | 3.99 | | 155.94 | | + | 124 | 04 May 2026 | 50.00 | | 3648.03 | 3.94 | | 152.00 | | + | 125 | 05 May 2026 | 50.00 | | 3601.92 | 3.90 | | 148.10 | | + | 126 | 06 May 2026 | 50.00 | | 3555.77 | 3.85 | | 144.25 | | + | 127 | 07 May 2026 | 50.00 | | 3509.56 | 3.80 | | 140.45 | | + | 128 | 08 May 2026 | 50.00 | | 3463.31 | 3.75 | | 136.70 | | + | 129 | 09 May 2026 | 50.00 | | 3417.01 | 3.70 | | 133.00 | | + | 130 | 10 May 2026 | 50.00 | | 3370.66 | 3.65 | | 129.35 | | + | 131 | 11 May 2026 | 50.00 | | 3324.26 | 3.60 | | 125.75 | | + | 132 | 12 May 2026 | 50.00 | | 3277.81 | 3.55 | | 122.20 | | + | 133 | 13 May 2026 | 50.00 | | 3231.31 | 3.50 | | 118.70 | | + | 134 | 14 May 2026 | 50.00 | | 3184.76 | 3.45 | | 115.25 | | + | 135 | 15 May 2026 | 50.00 | | 3138.16 | 3.40 | | 111.85 | | + | 136 | 16 May 2026 | 50.00 | | 3091.51 | 3.35 | | 108.50 | | + | 137 | 17 May 2026 | 50.00 | | 3044.81 | 3.30 | | 105.20 | | + | 138 | 18 May 2026 | 50.00 | | 2998.06 | 3.25 | | 101.95 | | + | 139 | 19 May 2026 | 50.00 | | 2951.26 | 3.20 | | 98.75 | | + | 140 | 20 May 2026 | 50.00 | | 2904.42 | 3.15 | | 95.60 | | + | 141 | 21 May 2026 | 50.00 | | 2857.52 | 3.10 | | 92.50 | | + | 142 | 22 May 2026 | 50.00 | | 2810.57 | 3.05 | | 89.45 | | + | 143 | 23 May 2026 | 50.00 | | 2763.57 | 3.00 | | 86.45 | | + | 144 | 24 May 2026 | 50.00 | | 2716.52 | 2.95 | | 83.50 | | + | 145 | 25 May 2026 | 50.00 | | 2669.42 | 2.90 | | 80.60 | | + | 146 | 26 May 2026 | 50.00 | | 2622.27 | 2.85 | | 77.75 | | + | 147 | 27 May 2026 | 50.00 | | 2575.07 | 2.80 | | 74.95 | | + | 148 | 28 May 2026 | 50.00 | | 2527.82 | 2.75 | | 72.20 | | + | 149 | 29 May 2026 | 50.00 | | 2480.52 | 2.70 | | 69.50 | | + | 150 | 30 May 2026 | 50.00 | | 2433.17 | 2.65 | | 66.85 | | + | 151 | 31 May 2026 | 50.00 | | 2385.77 | 2.60 | | 64.25 | | + | 152 | 01 June 2026 | 50.00 | | 2338.31 | 2.55 | | 61.70 | | + | 153 | 02 June 2026 | 50.00 | | 2290.81 | 2.50 | | 59.20 | | + | 154 | 03 June 2026 | 50.00 | | 2243.26 | 2.45 | | 56.75 | | + | 155 | 04 June 2026 | 50.00 | | 2195.65 | 2.40 | | 54.35 | | + | 156 | 05 June 2026 | 50.00 | | 2148.00 | 2.34 | | 52.01 | | + | 157 | 06 June 2026 | 50.00 | | 2100.29 | 2.29 | | 49.72 | | + | 158 | 07 June 2026 | 50.00 | | 2052.53 | 2.24 | | 47.48 | | + | 159 | 08 June 2026 | 50.00 | | 2004.73 | 2.19 | | 45.29 | | + | 160 | 09 June 2026 | 50.00 | | 1956.87 | 2.14 | | 43.15 | | + | 161 | 10 June 2026 | 50.00 | | 1908.96 | 2.09 | | 41.06 | | + | 162 | 11 June 2026 | 50.00 | | 1860.99 | 2.04 | | 39.02 | | + | 163 | 12 June 2026 | 50.00 | | 1812.98 | 1.99 | | 37.03 | | + | 164 | 13 June 2026 | 50.00 | | 1764.92 | 1.94 | | 35.09 | | + | 165 | 14 June 2026 | 50.00 | | 1716.80 | 1.88 | | 33.21 | | + | 166 | 15 June 2026 | 50.00 | | 1668.64 | 1.83 | | 31.38 | | + | 167 | 16 June 2026 | 50.00 | | 1620.42 | 1.78 | | 29.60 | | + | 168 | 17 June 2026 | 50.00 | | 1572.15 | 1.73 | | 27.87 | | + | 169 | 18 June 2026 | 50.00 | | 1523.83 | 1.68 | | 26.19 | | + | 170 | 19 June 2026 | 50.00 | | 1475.45 | 1.63 | | 24.56 | | + | 171 | 20 June 2026 | 50.00 | | 1427.03 | 1.58 | | 22.98 | | + | 172 | 21 June 2026 | 50.00 | | 1378.55 | 1.52 | | 21.46 | | + | 173 | 22 June 2026 | 50.00 | | 1330.02 | 1.47 | | 19.99 | | + | 174 | 23 June 2026 | 50.00 | | 1281.45 | 1.42 | | 18.57 | | + | 175 | 24 June 2026 | 50.00 | | 1232.81 | 1.37 | | 17.20 | | + | 176 | 25 June 2026 | 50.00 | | 1184.13 | 1.32 | | 15.88 | | + | 177 | 26 June 2026 | 50.00 | | 1135.39 | 1.26 | | 14.62 | | + | 178 | 27 June 2026 | 50.00 | | 1086.61 | 1.21 | | 13.41 | | + | 179 | 28 June 2026 | 50.00 | | 1037.77 | 1.16 | | 12.25 | | + | 180 | 29 June 2026 | 50.00 | | 988.88 | 1.11 | | 11.14 | | + | 181 | 30 June 2026 | 50.00 | | 939.93 | 1.06 | | 10.08 | | + | 182 | 01 July 2026 | 50.00 | | 890.93 | 1.00 | | 9.08 | | + | 183 | 02 July 2026 | 50.00 | | 841.89 | 0.95 | | 8.13 | | + | 184 | 03 July 2026 | 50.00 | | 792.79 | 0.90 | | 7.23 | | + | 185 | 04 July 2026 | 50.00 | | 743.63 | 0.85 | | 6.38 | | + | 186 | 05 July 2026 | 50.00 | | 694.43 | 0.79 | | 5.59 | | + | 187 | 06 July 2026 | 50.00 | | 645.17 | 0.74 | | 4.85 | | + | 188 | 07 July 2026 | 50.00 | | 595.86 | 0.69 | | 4.16 | | + | 189 | 08 July 2026 | 50.00 | | 546.49 | 0.64 | | 3.52 | | + | 190 | 09 July 2026 | 50.00 | | 497.08 | 0.58 | | 2.94 | | + | 191 | 10 July 2026 | 50.00 | | 447.61 | 0.53 | | 2.41 | | + | 192 | 11 July 2026 | 50.00 | | 398.08 | 0.48 | | 1.93 | | + | 193 | 12 July 2026 | 50.00 | | 348.51 | 0.43 | | 1.50 | | + | 194 | 13 July 2026 | 50.00 | | 298.88 | 0.37 | | 1.13 | | + | 195 | 14 July 2026 | 50.00 | | 249.20 | 0.32 | | 0.81 | | + | 196 | 15 July 2026 | 50.00 | | 199.47 | 0.27 | | 0.54 | | + | 197 | 16 July 2026 | 50.00 | | 149.68 | 0.21 | | 0.33 | | + | 198 | 17 July 2026 | 50.00 | | 99.84 | 0.16 | | 0.17 | | + | 199 | 18 July 2026 | 50.00 | | 49.95 | 0.11 | | 0.06 | | + | 200 | 19 July 2026 | 50.00 | | 0.00 | 0.05 | | 0.01 | | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee | 1000.0 | 1000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 40.0 | 40.0 | 0.0 | 0.0 | false | + When Admin sets the business date to "03 January 2026" + When Admin runs inline COB job for Working Capital Loan + And Working capital loan account has the correct data: + | principal | totalPaidPrincipal | totalPaymentVolume | realizedIncome | unrealizedIncome | overpaymentAmount | + | 10000.0 | 90.0 | 100000.0 | 17.27 | 982.73 | 0.0 | + And Working Capital Loan has transactions: + | transactionDate | type | transactionAmount | principalPortion | feeChargesPortion | penaltyChargesPortion | reversed | + | 01 January 2026 | Disbursement | 9000.0 | 9000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee | 1000.0 | 1000.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Repayment | 40.0 | 40.0 | 0.0 | 0.0 | false | + | 01 January 2026 | Discount Fee Amortization | 17.27 | | | | false | + Then Working Capital Loan Transactions tab has a "DISCOUNT_FEE_AMORTIZATION" transaction with date "01 January 2026" which has the following Journal entries: + | Type | Account code | Account name | Debit | Credit | + | INCOME | 404000 | Interest Income | | 17.27 | + | LIABILITY | 240005 | Deferred Interest Revenue | 17.27 | | + @TestRailId:C76623 Scenario: Verify working capital loan repayment - UC7: full minimum payment after disbursement day When Admin sets the business date to "01 January 2026"