@@ -1317,3 +1317,53 @@ Feature: Contract Termination
13171317      | 31  March  2024     | Accrual  Adjustment    | 0 .15    | 0 .0        | 0 .15      | 0 .0   | 0 .0        | 0 .0           | false     | false     | 
13181318      | 31  March  2024     | Contract  Termination  | 57 .37   | 57 .05      | 0 .32      | 0 .0   | 0 .0        | 0 .0           | true      | true      | 
13191319    And  Global configuration "is-principal-compounding-disabled-for-overdue-loans"  is disabled
1320+ 
1321+   @TestRailId:C4133 
1322+   Scenario : Contract termination on disbursement date 
1323+     When  Admin sets the business date to "01 January 2025" 
1324+     And  Admin creates a client with random data
1325+     And  Admin creates a fully customized loan with the following data:
1326+       | LoanProduct                                                               | submitted  on  date  | with  Principal  | ANNUAL  interest  rate  % | interest  type      | interest  calculation  period  | amortization  type   | loanTermFrequency  | loanTermFrequencyType  | repaymentEvery  | repaymentFrequencyType  | numberOfRepayments  | graceOnPrincipalPayment  | graceOnInterestPayment  | interest  free  period  | Payment  strategy             | 
1327+       | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_CONTRACT_TERMINATION  | 01  January  2025    | 100             | 7                       | DECLINING_BALANCE  | DAILY                        | EQUAL_INSTALLMENTS  | 4                  | MONTHS                 | 1               | MONTHS                  | 4                   | 0                        | 0                       | 0                     | ADVANCED_PAYMENT_ALLOCATION  | 
1328+     And  Admin successfully approves the loan on "01 January 2025"  with "100"  amount and expected disbursement date on "01 January 2025" 
1329+     And  Admin successfully disburse the loan on "01 January 2025"  with "100"  EUR transaction amount
1330+     And  Admin successfully terminates loan contract
1331+     Then  Loan Repayment schedule has 4 periods, with the following data for periods:
1332+       | Nr  | Days  | Date              | Paid  date  | Balance  of  loan  | Principal  due  | Interest  | Fees  | Penalties  | Due    | Paid  | In  advance  | Late  | Outstanding  | 
1333+       |    |      | 01  January  2025   |           | 100 .0            |               |          | 0 .0   |           | 0 .0    | 0 .0   |            |      |             | 
1334+       | 1   | 31    | 01  February  2025  |           | 75 .21            | 24 .79          | 0 .58      | 0 .0   | 0 .0        | 25 .37  | 0 .0   | 0 .0         | 0 .0   | 25 .37        | 
1335+       | 2   | 28    | 01  March  2025     |           | 50 .28            | 24 .93          | 0 .44      | 0 .0   | 0 .0        | 25 .37  | 0 .0   | 0 .0         | 0 .0   | 25 .37        | 
1336+       | 3   | 31    | 01  April  2025     |           | 25 .2             | 25 .08          | 0 .29      | 0 .0   | 0 .0        | 25 .37  | 0 .0   | 0 .0         | 0 .0   | 25 .37        | 
1337+       | 4   | 30    | 01  May  2025       |           | 0 .0              | 25 .2           | 0 .15      | 0 .0   | 0 .0        | 25 .35  | 0 .0   | 0 .0         | 0 .0   | 25 .35        | 
1338+     And  Loan Repayment schedule has the following data in Total row:
1339+       | Principal  due  | Interest  | Fees  | Penalties  | Due     | Paid  | In  advance  | Late  | Outstanding  | 
1340+       | 100 .0          | 1 .46      | 0 .0   | 0 .0        | 101 .46  | 0 .0   | 0 .0         | 0 .0   | 101 .46       | 
1341+     And  Loan Transactions tab has the following data:
1342+       | Transaction  date  | Transaction  Type      | Amount  | Principal  | Interest  | Fees  | Penalties  | Loan  Balance  | Reverted  | Replayed  | 
1343+       | 01  January  2025   | Disbursement          | 100 .0   | 0 .0        | 0 .0       | 0 .0   | 0 .0        | 100 .0         | false     | false     | 
1344+       | 01  January  2025   | Contract  Termination  | 101 .46  | 100 .0      | 0 .0       | 0 .0   | 0 .0        | 0 .0           | false     | false     | 
1345+ 
1346+   @TestRailId:C4134 
1347+   Scenario : Contract termination on disbursement date with interest recognition 
1348+     When  Admin sets the business date to "01 January 2025" 
1349+     And  Admin creates a client with random data
1350+     And  Admin creates a fully customized loan with the following data:
1351+       | LoanProduct                                                                               | submitted  on  date  | with  Principal  | ANNUAL  interest  rate  % | interest  type      | interest  calculation  period  | amortization  type   | loanTermFrequency  | loanTermFrequencyType  | repaymentEvery  | repaymentFrequencyType  | numberOfRepayments  | graceOnPrincipalPayment  | graceOnInterestPayment  | interest  free  period  | Payment  strategy             | 
1352+       | LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_CONTRACT_TERMINATION_INT_RECOGNITION  | 01  January  2025    | 100             | 7                       | DECLINING_BALANCE  | DAILY                        | EQUAL_INSTALLMENTS  | 4                  | MONTHS                 | 1               | MONTHS                  | 4                   | 0                        | 0                       | 0                     | ADVANCED_PAYMENT_ALLOCATION  | 
1353+     And  Admin successfully approves the loan on "01 January 2025"  with "100"  amount and expected disbursement date on "01 January 2025" 
1354+     And  Admin successfully disburse the loan on "01 January 2025"  with "100"  EUR transaction amount
1355+     And  Admin successfully terminates loan contract
1356+     Then  Loan Repayment schedule has 4 periods, with the following data for periods:
1357+       | Nr  | Days  | Date              | Paid  date  | Balance  of  loan  | Principal  due  | Interest  | Fees  | Penalties  | Due    | Paid  | In  advance  | Late  | Outstanding  | 
1358+       |    |      | 01  January  2025   |           | 100 .0            |               |          | 0 .0   |           | 0 .0    | 0 .0   |            |      |             | 
1359+       | 1   | 31    | 01  February  2025  |           | 75 .21            | 24 .79          | 0 .58      | 0 .0   | 0 .0        | 25 .37  | 0 .0   | 0 .0         | 0 .0   | 25 .37        | 
1360+       | 2   | 28    | 01  March  2025     |           | 50 .28            | 24 .93          | 0 .44      | 0 .0   | 0 .0        | 25 .37  | 0 .0   | 0 .0         | 0 .0   | 25 .37        | 
1361+       | 3   | 31    | 01  April  2025     |           | 25 .2             | 25 .08          | 0 .29      | 0 .0   | 0 .0        | 25 .37  | 0 .0   | 0 .0         | 0 .0   | 25 .37        | 
1362+       | 4   | 30    | 01  May  2025       |           | 0 .0              | 25 .2           | 0 .15      | 0 .0   | 0 .0        | 25 .35  | 0 .0   | 0 .0         | 0 .0   | 25 .35        | 
1363+     And  Loan Repayment schedule has the following data in Total row:
1364+       | Principal  due  | Interest  | Fees  | Penalties  | Due     | Paid  | In  advance  | Late  | Outstanding  | 
1365+       | 100 .0          | 1 .46      | 0 .0   | 0 .0        | 101 .46  | 0 .0   | 0 .0         | 0 .0   | 101 .46       | 
1366+     And  Loan Transactions tab has the following data:
1367+       | Transaction  date  | Transaction  Type      | Amount  | Principal  | Interest  | Fees  | Penalties  | Loan  Balance  | Reverted  | Replayed  | 
1368+       | 01  January  2025   | Disbursement          | 100 .0   | 0 .0        | 0 .0       | 0 .0   | 0 .0        | 100 .0         | false     | false     | 
1369+       | 01  January  2025   | Contract  Termination  | 101 .46  | 100 .0      | 1 .46      | 0 .0   | 0 .0        | 0 .0           | false     | false     | 
0 commit comments