adamsaghy commented on code in PR #4107:
URL: https://github.com/apache/fineract/pull/4107#discussion_r1814707204
##########
fineract-e2e-tests-runner/src/test/resources/features/LoanCharge.feature:
##########
@@ -1673,3 +1672,43 @@ Feature: LoanCharge
Then Loan Charges tab has the following data:
| Name | isPenalty | Payment due at | Due as of |
Calculation type | Due | Paid | Waived | Outstanding |
| NSF fee | true | Specified due date | 22 February 2023 | Flat
| 100.0 | 0.0 | 100.0 | 0.0 |
+
+ Scenario: Verify that there are no payable interest after charge adjustment
made on the same date for progressive loan with custom payment allocation order
+ When Admin sets the business date to "27 September 2024"
+ When Admin creates a client with random data
+ 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_DOWNPAYMENT_ADV_CUST_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 27
Sep 2024 | 100 | 9.99 | DECLINING_BALANCE |
DAILY | EQUAL_INSTALLMENTS | 1 | MONTHS
| 1 | MONTHS | 1 | 0
| 0 | 0 |
ADVANCED_PAYMENT_ALLOCATION |
+ And Admin successfully approves the loan on "27 September 2024" with "40"
amount and expected disbursement date on "27 September 2024"
+ When Admin successfully disburse the loan on "27 September 2024" with "40"
EUR transaction amount
+ Then Loan Repayment schedule has 2 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 |
+ | | | 27 September 2024 | | 40.0 |
| | 0.0 | | 0.0 | 0.0 | |
| |
+ | 1 | 0 | 27 September 2024 | 27 September 2024 | 30.0 |
10.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0
| 0.0 |
+ | 2 | 30 | 27 October 2024 | | 0.0 |
30.0 | 0.25 | 0.0 | 0.0 | 30.25 | 0.0 | 0.0 | 0.0
| 30.25 |
+ Then Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In
advance | Late | Outstanding |
+ | 40.0 | 0.25 | 0.0 | 0.0 | 40.25 | 10.0 | 0.0
| 0.0 | 30.25 |
+ Then Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest |
Fees | Penalties | Loan Balance |
+ | 27 September 2024 | Disbursement | 40.0 | 0.0 | 0.0 |
0.0 | 0.0 | 40.0 |
+ | 27 September 2024 | Accrual | 0.25 | 0.0 | 0.25 |
0.0 | 0.0 | 0.0 |
+ | 27 September 2024 | Down Payment | 10.0 | 10.0 | 0.0 |
0.0 | 0.0 | 30.0 |
+ When Admin adds "LOAN_NSF_FEE" due date charge with "27 September 2024"
due date and 1 EUR transaction amount
+ When Admin makes a charge adjustment for the last "LOAN_NSF_FEE" type
charge which is due on "27 September 2024" with 1 EUR transaction amount and
externalId ""
+ Then Loan has 30.16 outstanding amount
+ Then Loan Repayment schedule has 2 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 |
+ | | | 27 September 2024 | | 40.0 |
| | 0.0 | | 0.0 | 0.0 | |
| |
+ | 1 | 0 | 27 September 2024 | 27 September 2024 | 30.0 |
10.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0
| 0.0 |
+ | 2 | 30 | 27 October 2024 | | 0.0 |
30.0 | 0.16 | 0.0 | 1.0 | 31.16 | 1.0 | 1.0 | 0.0
| 30.16 |
+ Then Loan Repayment schedule has the following data in Total row:
+ | Principal due | Interest | Fees | Penalties | Due | Paid | In
advance | Late | Outstanding |
+ | 40.0 | 0.16 | 0.0 | 1.0 | 41.16 | 11.0 | 1.0
| 0.0 | 30.16 |
+ Then Loan Transactions tab has the following data:
+ | Transaction date | Transaction Type | Amount | Principal | Interest |
Fees | Penalties | Loan Balance |
Review Comment:
This look not correct. Please double check why it is happening!
--
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]