mariiaKraievska commented on code in PR #4449:
URL: https://github.com/apache/fineract/pull/4449#discussion_r1990926773


##########
fineract-e2e-tests-runner/src/test/resources/features/Loan.feature:
##########
@@ -6362,4 +6362,83 @@ Feature: Loan
       | 23 December 2024 | Disbursement     | 100.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 100.0        |
       | 22 March 2025    | Accrual          | 0.67   | 0.0       | 0.67     | 
0.0  | 0.0       |  0.0         |
 
-
+  @TestRailId:C3534 @AdvancedPaymentAllocation
+  Scenario: Verify advanced payment allocation - future installments: 
LAST_INSTALLMENT, full repayment on the disbursement date, 2nd disbursement on 
the same date
+    When Admin sets the business date to "11 March 2025"
+    And Admin creates a client with random data
+    When Admin set 
"LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL" loan 
product "DEFAULT" transaction type to "LAST_INSTALLMENT" future installment 
allocation rule
+    When Admin creates a fully customized loan with the following data:
+      | 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            |
+      | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_ACTUAL_ACTUAL_INTEREST_REFUND_FULL | 
11 March 2025     | 1000           | 26                     | DECLINING_BALANCE 
         | DAILY                       | EQUAL_INSTALLMENTS | 12                
| MONTHS                | 1              | MONTHS                 | 12          
       | 0                       | 0                      | 0                   
 | ADVANCED_PAYMENT_ALLOCATION |
+    And Admin successfully approves the loan on "11 March 2025" with "1000" 
amount and expected disbursement date on "11 March 2025"
+    And Admin successfully disburse the loan on "11 March 2025" with "200" EUR 
transaction amount
+    Then Loan Repayment schedule has 12 periods, with the following data for 
periods:
+      | Nr | Days | Date              | Paid date         | Balance of loan | 
Principal due | Interest | Fees | Penalties | Due   | Paid  | In advance | Late 
| Outstanding |
+      |    |      | 11 March 2025     |                   | 200.0           |  
             |          | 0.0  |           | 0.0   | 0.0   |            |      
|             |
+      | 1  | 31   | 11 April 2025     |                   | 185.3           | 
14.7          | 4.42     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 2  | 30   | 11 May 2025       |                   | 170.14          | 
15.16         | 3.96     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 3  | 31   | 11 June 2025      |                   | 154.78          | 
15.36         | 3.76     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 4  | 30   | 11 July 2025      |                   | 138.97          | 
15.81         | 3.31     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 5  | 31   | 11 August 2025    |                   | 122.92          | 
16.05         | 3.07     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 6  | 31   | 11 September 2025 |                   | 106.51          | 
16.41         | 2.71     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 7  | 30   | 11 October 2025   |                   |  89.67          | 
16.84         | 2.28     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 8  | 31   | 11 November 2025  |                   |  72.53          | 
17.14         | 1.98     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 9  | 30   | 11 December 2025  |                   |  54.96          | 
17.57         | 1.55     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 10 | 31   | 11 January 2026   |                   |  37.05          | 
17.91         | 1.21     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 11 | 31   | 11 February 2026  |                   |  18.75          | 
18.3          | 0.82     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+      | 12 | 28   | 11 March 2026     |                   |    0.0          | 
18.75         | 0.37     | 0.0  | 0.0       | 19.12 | 0.0   | 0.0        | 0.0  
| 19.12       |
+    Then Loan Repayment schedule has the following data in Total row:
+      | Principal due | Interest | Fees | Penalties | Due    | Paid  | In 
advance | Late | Outstanding |
+      | 200.0         | 29.44    | 0.0  | 0         | 229.44 | 0.0   | 0.0     
   | 0.0  | 229.44      |
+    Then Loan Transactions tab has the following data:
+      | Transaction date  | Transaction Type | Amount | Principal | Interest | 
Fees | Penalties | Loan Balance |
+      | 11 March 2025     | Disbursement     | 200.0  | 0.0       | 0.0      | 
0.0  | 0.0       | 200.0        |
+    And Customer makes "AUTOPAY" repayment on "11 March 2025" with 200 EUR 
transaction amount

Review Comment:
   Shouldn't there be a step like this:
   
   "When Customer makes 'MERCHANT_ISSUED_REFUND' transaction with 'AUTOPAY' 
payment type on '11 March 2025' with 200 EUR transaction amount..."
   
   instead of a repayment?
   
   I might be out of context or mistaken here, please correct me if I'm wrong, 
but I see in the task description that it is about a transaction with the 
“Merchant Issued Refund” type:
   "Issue - Merchant issued refund with $200 on 03/11/2025"



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to