@@ -3063,3 +3063,106 @@ Feature: LoanReAging
30633063 | NSF fee | true | Specified due date | 01 October 2024 | Flat | 20 .0 | 0 .0 | 0 .0 | 20 .0 |
30643064 | NSF fee | true | Specified due date | 01 November 2024 | Flat | 30 .0 | 0 .0 | 0 .0 | 30 .0 |
30653065
3066+ Scenario : Verify that Loan re-aging with zero outstanding balance is rejected in real-time
3067+ When Admin sets the business date to "01 January 2024"
3068+ When Admin creates a client with random data
3069+ When Admin set "LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule
3070+ When Admin creates a fully customized loan with the following data:
3071+ | 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 |
3072+ | LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION | 01 January 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
3073+ And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024"
3074+ When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount
3075+ Then Loan Repayment schedule has 4 periods, with the following data for periods:
3076+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
3077+ | | | 01 January 2024 | | 1000 .0 | | | 0 .0 | | 0 .0 | 0 .0 | | | |
3078+ | 1 | 0 | 01 January 2024 | 01 January 2024 | 750 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 |
3079+ | 2 | 15 | 16 January 2024 | | 500 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 |
3080+ | 3 | 15 | 31 January 2024 | | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 |
3081+ | 4 | 15 | 15 February 2024 | | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 |
3082+ When Admin sets the business date to "20 February 2024"
3083+ And Customer makes "AUTOPAY" repayment on "20 February 2024" with 750 EUR transaction amount
3084+ Then Loan Repayment schedule has 4 periods, with the following data for periods:
3085+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
3086+ | | | 01 January 2024 | | 1000 .0 | | | 0 .0 | | 0 .0 | 0 .0 | | | |
3087+ | 1 | 0 | 01 January 2024 | 01 January 2024 | 750 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 |
3088+ | 2 | 15 | 16 January 2024 | 20 February 2024 | 500 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3089+ | 3 | 15 | 31 January 2024 | 20 February 2024 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3090+ | 4 | 15 | 15 February 2024 | 20 February 2024 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3091+ And Admin adds "LOAN_NSF_FEE" due date charge with "01 March 2024" due date and 10 EUR transaction amount
3092+ Then Loan Repayment schedule has 5 periods, with the following data for periods:
3093+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
3094+ | | | 01 January 2024 | | 1000 .0 | | | 0 .0 | | 0 .0 | 0 .0 | | | |
3095+ | 1 | 0 | 01 January 2024 | 01 January 2024 | 750 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 |
3096+ | 2 | 15 | 16 January 2024 | 20 February 2024 | 500 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3097+ | 3 | 15 | 31 January 2024 | 20 February 2024 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3098+ | 4 | 15 | 15 February 2024 | 20 February 2024 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3099+ | 5 | 15 | 01 March 2024 | | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 10 .0 | 10 .0 | 0 .0 | 0 .0 | 0 .0 | 10 .0 |
3100+ When Admin fails to create a Loan re-aging transaction with error "error.msg.loan.reage.no.outstanding.balance.to.reage" and with the following data:
3101+ | frequencyNumber | frequencyType | startDate | numberOfInstallments |
3102+ | 1 | MONTHS | 01 March 2024 | 3 |
3103+ Then Loan Repayment schedule has 5 periods, with the following data for periods:
3104+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
3105+ | | | 01 January 2024 | | 1000 .0 | | | 0 .0 | | 0 .0 | 0 .0 | | | |
3106+ | 1 | 0 | 01 January 2024 | 01 January 2024 | 750 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 |
3107+ | 2 | 15 | 16 January 2024 | 20 February 2024 | 500 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3108+ | 3 | 15 | 31 January 2024 | 20 February 2024 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3109+ | 4 | 15 | 15 February 2024 | 20 February 2024 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3110+ | 5 | 15 | 01 March 2024 | | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 10 .0 | 10 .0 | 0 .0 | 0 .0 | 0 .0 | 10 .0 |
3111+ Then Loan Transactions tab has the following data:
3112+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
3113+ | 01 January 2024 | Disbursement | 1000 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 1000 .0 | false |
3114+ | 01 January 2024 | Down Payment | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 750 .0 | false |
3115+ | 20 February 2024 | Repayment | 750 .0 | 750 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | false |
3116+ Then Loan Charges tab has the following data:
3117+ | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding |
3118+ | NSF fee | true | Specified due date | 01 March 2024 | Flat | 10 .0 | 0 .0 | 0 .0 | 10 .0 |
3119+
3120+ Scenario : Verify that zero amount reage transaction is reverted during reverse-replay
3121+ When Admin sets the business date to "01 January 2024"
3122+ When Admin creates a client with random data
3123+ When Admin set "LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule
3124+ When Admin creates a fully customized loan with the following data:
3125+ | 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 |
3126+ | LP2_DOWNPAYMENT_AUTO_ADVANCED_PAYMENT_ALLOCATION | 01 January 2024 | 1000 | 0 | FLAT | SAME_AS_REPAYMENT_PERIOD | EQUAL_INSTALLMENTS | 45 | DAYS | 15 | DAYS | 3 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION |
3127+ And Admin successfully approves the loan on "01 January 2024" with "1000" amount and expected disbursement date on "01 January 2024"
3128+ When Admin successfully disburse the loan on "01 January 2024" with "1000" EUR transaction amount
3129+ Then Loan Repayment schedule has 4 periods, with the following data for periods:
3130+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
3131+ | | | 01 January 2024 | | 1000 .0 | | | 0 .0 | | 0 .0 | 0 .0 | | | |
3132+ | 1 | 0 | 01 January 2024 | 01 January 2024 | 750 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 |
3133+ | 2 | 15 | 16 January 2024 | | 500 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 |
3134+ | 3 | 15 | 31 January 2024 | | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 |
3135+ | 4 | 15 | 15 February 2024 | | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 |
3136+ When Admin sets the business date to "20 February 2024"
3137+ When Admin creates a Loan re-aging transaction with the following data:
3138+ | frequencyNumber | frequencyType | startDate | numberOfInstallments |
3139+ | 1 | MONTHS | 01 March 2024 | 3 |
3140+ Then Loan Repayment schedule has 7 periods, with the following data for periods:
3141+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
3142+ | | | 01 January 2024 | | 1000 .0 | | | 0 .0 | | 0 .0 | 0 .0 | | | |
3143+ | 1 | 0 | 01 January 2024 | 01 January 2024 | 750 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 |
3144+ | 2 | 15 | 16 January 2024 | 20 February 2024 | 750 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 |
3145+ | 3 | 15 | 31 January 2024 | 20 February 2024 | 750 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 |
3146+ | 4 | 15 | 15 February 2024 | 20 February 2024 | 750 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 |
3147+ | 5 | 15 | 01 March 2024 | | 500 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 |
3148+ | 6 | 31 | 01 April 2024 | | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 |
3149+ | 7 | 30 | 01 May 2024 | | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 |
3150+ Then Loan Transactions tab has the following data:
3151+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
3152+ | 01 January 2024 | Disbursement | 1000 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 1000 .0 | false |
3153+ | 01 January 2024 | Down Payment | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 750 .0 | false |
3154+ | 20 February 2024 | Re -age | 750 .0 | 750 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | false |
3155+ When Admin sets the business date to "21 February 2024"
3156+ And Customer makes "AUTOPAY" repayment on "19 February 2024" with 750 EUR transaction amount
3157+ Then Loan Repayment schedule has 4 periods, with the following data for periods:
3158+ | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding |
3159+ | | | 01 January 2024 | | 1000 .0 | | | 0 .0 | | 0 .0 | 0 .0 | | | |
3160+ | 1 | 0 | 01 January 2024 | 01 January 2024 | 750 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 |
3161+ | 2 | 15 | 16 January 2024 | 19 February 2024 | 500 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3162+ | 3 | 15 | 31 January 2024 | 19 February 2024 | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3163+ | 4 | 15 | 15 February 2024 | 19 February 2024 | 0 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 250 .0 | 250 .0 | 0 .0 | 250 .0 | 0 .0 |
3164+ Then Loan Transactions tab has the following data:
3165+ | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted |
3166+ | 01 January 2024 | Disbursement | 1000 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | 1000 .0 | false |
3167+ | 01 January 2024 | Down Payment | 250 .0 | 250 .0 | 0 .0 | 0 .0 | 0 .0 | 750 .0 | false |
3168+ | 19 February 2024 | Repayment | 750 .0 | 750 .0 | 0 .0 | 0 .0 | 0 .0 | 0 .0 | false |
0 commit comments