diff --git a/.atr-rat-excludes-bin.txt b/.atr-rat-excludes-bin.txt deleted file mode 100644 index 62d78f0432c..00000000000 --- a/.atr-rat-excludes-bin.txt +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# See comment below license in .atr-rat-excludes-src.txt for an explanation of -# what this is. - -# if you make changes here, sort this list before committing asciibetically -# with en_US.UTF-8 lang/locale -.rat-excludes -README.md -fineract-documentation.pdf - -# vim:ft=conf diff --git a/.atr-rat-excludes-src.txt b/.atr-rat-excludes-src.txt deleted file mode 100644 index 715ddd1d7c1..00000000000 --- a/.atr-rat-excludes-src.txt +++ /dev/null @@ -1,54 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# Path patterns to exclude from RAT checks run by ATR. -# -# RAT = Release Audit Tool (https://creadur.apache.org/rat/) -# ATR = ASF Trusted Releases (https://release-test.apache.org , https://github.com/apache/tooling-trusted-releases/) -# -# This duplicates exclusions in build.gradle. -# This is probably only necessary until both RAT and org.nosphere.apache.rat plugin are using 0.17. -# See https://github.com/eskatos/creadur-rat-gradle/issues/28 . -# Once both are on 0.17, we should be able to move the RAT excludes used during -# the build from build.gradle into a .rat-excludes file shared by both our -# build and ATR. -# Right now ATR does something custom, see -# https://github.com/apache/tooling-trusted-releases/issues/312 . -# If we get tired of waiting for the RAT gradle plugin or the ATR to upgrade to -# 0.17, we could write our own exclusion lists generator. - -# if you make changes here, sort this list before committing asciibetically -# with en_US.UTF-8 lang/locale -**/META-INF/fineract-test.config -**/legacy-docs/ -*.adoc -*.avsc -*.feature -*.html -*.md -*.mustache -*.puml -*.txt -.openapi-generator-ignore -/.asf.yaml -/.rat-excludes -/config/fineractdev-eclipse-preferences.epf -/fineract-provider/src/test/resources/results/xbrl.xml -/gradle/wrapper/gradle-wrapper.properties -org.springframework.boot.autoconfigure.AutoConfiguration.imports - -# vim:ft=conf diff --git a/.github/workflows/build-cucumber.yml b/.github/workflows/build-cucumber.yml index d34b4b5a01c..613c764de6a 100644 --- a/.github/workflows/build-cucumber.yml +++ b/.github/workflows/build-cucumber.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 fetch-tags: true @@ -39,7 +39,7 @@ jobs: distribution: 'zulu' - name: Cache Gradle dependencies - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v4 + uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v4 with: path: | ~/.gradle/caches @@ -87,7 +87,7 @@ jobs: - name: Archive test results if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: test-results-${{ matrix.task }} path: | @@ -98,7 +98,7 @@ jobs: - name: Archive Progressive Loan JAR if: matrix.job_type == 'progressive-loan' && always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: progressive-loan-jar path: ${{ env.EMBEDDABLE_JAR_FILE }} @@ -107,7 +107,7 @@ jobs: - name: Archive server logs if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: server-logs-${{ matrix.task }} path: '**/build/cargo/' diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index c47e644511c..84057459d7b 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -26,7 +26,7 @@ jobs: IMAGE_NAME: fineract steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml index de7542fe229..e4aaf4a20de 100644 --- a/.github/workflows/build-documentation.yml +++ b/.github/workflows/build-documentation.yml @@ -10,7 +10,7 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 - name: Set up JDK 21 diff --git a/.github/workflows/build-e2e-tests.yml b/.github/workflows/build-e2e-tests.yml index 6a3436100d3..1d754fe4e5a 100644 --- a/.github/workflows/build-e2e-tests.yml +++ b/.github/workflows/build-e2e-tests.yml @@ -33,7 +33,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 @@ -146,7 +146,7 @@ jobs: - name: Upload test results if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: allure-results-shard-${{ matrix.shard_index }} path: | @@ -159,7 +159,7 @@ jobs: - name: Upload Allure Report if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: allure-report-shard-${{ matrix.shard_index }} path: allure-report-shard-${{ matrix.shard_index }} @@ -167,7 +167,7 @@ jobs: - name: Upload logs if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: logs-shard-${{ matrix.shard_index }} path: | diff --git a/.github/workflows/build-mariadb.yml b/.github/workflows/build-mariadb.yml index 95226969cd1..36aaad15477 100644 --- a/.github/workflows/build-mariadb.yml +++ b/.github/workflows/build-mariadb.yml @@ -44,7 +44,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 fetch-tags: true @@ -56,7 +56,7 @@ jobs: distribution: 'zulu' - name: Cache Gradle dependencies - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v4 + uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v4 with: path: | ~/.gradle/caches @@ -135,7 +135,7 @@ jobs: - name: Archive test results if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: test-results-${{ matrix.task }} path: '**/build/reports/' @@ -143,7 +143,7 @@ jobs: - name: Archive server logs if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: server-logs-${{ matrix.task }} path: '**/build/cargo/' diff --git a/.github/workflows/build-mysql.yml b/.github/workflows/build-mysql.yml index 917bd850146..50232e0a271 100644 --- a/.github/workflows/build-mysql.yml +++ b/.github/workflows/build-mysql.yml @@ -44,7 +44,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 fetch-tags: true @@ -56,7 +56,7 @@ jobs: distribution: 'zulu' - name: Cache Gradle dependencies - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v4 + uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v4 with: path: | ~/.gradle/caches @@ -135,7 +135,7 @@ jobs: - name: Archive test results if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: test-results-${{ matrix.task }} path: '**/build/reports/' @@ -143,7 +143,7 @@ jobs: - name: Archive server logs if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: server-logs-${{ matrix.task }} path: '**/build/cargo/' diff --git a/.github/workflows/build-postgresql.yml b/.github/workflows/build-postgresql.yml index 8698aa635ad..f6b92eb50ee 100644 --- a/.github/workflows/build-postgresql.yml +++ b/.github/workflows/build-postgresql.yml @@ -45,7 +45,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 fetch-tags: true @@ -57,7 +57,7 @@ jobs: distribution: 'zulu' - name: Cache Gradle dependencies - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v4 + uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v4 with: path: | ~/.gradle/caches @@ -136,7 +136,7 @@ jobs: - name: Archive test results if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: test-results-${{ matrix.task }} path: '**/build/reports/' @@ -144,7 +144,7 @@ jobs: - name: Archive server logs if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: server-logs-${{ matrix.task }} path: '**/build/cargo/' diff --git a/.github/workflows/liquibase-only-postgresql.yml b/.github/workflows/liquibase-only-postgresql.yml index 3b53d251952..d0ea2fedea4 100644 --- a/.github/workflows/liquibase-only-postgresql.yml +++ b/.github/workflows/liquibase-only-postgresql.yml @@ -26,7 +26,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 fetch-tags: true @@ -38,7 +38,7 @@ jobs: distribution: 'zulu' - name: Cache Gradle dependencies - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v4 + uses: actions/cache@a7833574556fa59680c1b7cb190c1735db73ebf0 # v4 with: path: | ~/.gradle/caches diff --git a/.github/workflows/publish-dockerhub.yml b/.github/workflows/publish-dockerhub.yml index e0e94f11c20..c080edacc33 100644 --- a/.github/workflows/publish-dockerhub.yml +++ b/.github/workflows/publish-dockerhub.yml @@ -15,7 +15,7 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - name: Checkout Source Code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 diff --git a/.github/workflows/run-integration-test-sequentially-postgresql.yml b/.github/workflows/run-integration-test-sequentially-postgresql.yml index d7e1eb2b02b..0928aa0ef58 100644 --- a/.github/workflows/run-integration-test-sequentially-postgresql.yml +++ b/.github/workflows/run-integration-test-sequentially-postgresql.yml @@ -33,7 +33,7 @@ jobs: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} steps: - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 fetch-tags: true @@ -84,7 +84,7 @@ jobs: ./gradlew --no-daemon --console=plain :oauth2-tests:test -PdbType=postgresql - name: Archive test results if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: test-results retention-days: 5 @@ -95,7 +95,7 @@ jobs: oauth2-tests/build/reports/ - name: Archive server logs if: always() - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4 with: name: server-logs retention-days: 5 diff --git a/.github/workflows/smoke-messaging.yml b/.github/workflows/smoke-messaging.yml index 01b7e18f628..46574c5ee96 100644 --- a/.github/workflows/smoke-messaging.yml +++ b/.github/workflows/smoke-messaging.yml @@ -24,7 +24,7 @@ jobs: IMAGE_NAME: fineract steps: - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index a04270d83dd..a50a25b63ce 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -20,7 +20,7 @@ jobs: JAVA_BINARIES: . steps: - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v5 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 - name: Set up JDK 21 diff --git a/.mailmap b/.mailmap index 23211b4087d..4155b158a1a 100644 --- a/.mailmap +++ b/.mailmap @@ -1,20 +1,3 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - # .mailmap unifies differences in commit names and emails, and shortens committers' names. # .mailmap format is a bit weird, e.g. https://github.com/sympy/sympy/wiki/Using-.mailmap explains it. # .mailmap official doc is on https://git-scm.com/docs/git-shortlog#_mapping_authors diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c243b4c5135..e948c167f32 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -95,15 +95,6 @@ This is useful for repeated test runs (say, for timing) when gradle would otherw See the next section for testing in Eclipse and [here](https://fineract-academy.com) for testing in IntelliJ. -## Recommended IDEs - -Apache Fineract can be developed using multiple IDEs. The most commonly used and supported IDEs are: - -- **Eclipse IDE** – Fully supported and commonly used within the community. -- **IntelliJ IDEA (Community or Ultimate)** – Recommended for most developers due to excellent Gradle support and debugging experience. - -The sections below provide setup guidance for each IDE. - ### How to run and debug in Eclipse IDE It is possible to run Fineract in Eclipse IDE and also to debug Fineract using Eclipse's debugging facilities. @@ -120,29 +111,6 @@ You can also use Eclipse JUnit support to run tests in Eclipse (Run As->JUnit Te Finally, modifying source code in Eclipse automatically triggers hot code replace to a running instance, allowing you to immediately test your changes -## How to run and debug in IntelliJ IDEA - -IntelliJ IDEA provides strong Gradle integration and is recommended for most new contributors. - -### Prerequisites -- IntelliJ IDEA (Community Edition is sufficient) -- Java 21 (as required by Fineract) -- Gradle (wrapper included in the repository) - -### Steps - -1. Open IntelliJ IDEA and select **Open** -2. Choose the root `fineract` directory -3. When prompted, import the project as a **Gradle project** -4. Use the Gradle wrapper (`gradlew`) when asked -5. Ensure the correct JDK is selected (**Java 21**) -6. After import completes, run: - - `org.apache.fineract.ServerApplication` as a **Java Application** - -### Notes -- IntelliJ may take several minutes to index the project on first open -- If you encounter build issues, try running `./gradlew clean build` from the terminal - How to download Gradle wrapper --- The file gradle/wrapper/gradle-wrapper.jar binary is checked into this projects Git source repository, diff --git a/NOTICE_RELEASE b/NOTICE_RELEASE index 5a5d9b1dcce..083abdfe51d 100644 --- a/NOTICE_RELEASE +++ b/NOTICE_RELEASE @@ -1,8 +1,8 @@ Apache Fineract Copyright 2008-2025 The Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). +This product includes software developed by The Apache Software +Foundation (http://www.apache.org/). This product includes third party libraries and resource files from different providers. The details of the different packages and their diff --git a/NOTICE_SOURCE b/NOTICE_SOURCE index 085a410974b..869b39afa13 100644 --- a/NOTICE_SOURCE +++ b/NOTICE_SOURCE @@ -1,5 +1,5 @@ Apache Fineract Copyright 2008-2025 The Apache Software Foundation -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). +This product includes software developed by The Apache Software +Foundation (http://www.apache.org/). diff --git a/README.md b/README.md index ff11bc4b688..8c4883ef97a 100644 --- a/README.md +++ b/README.md @@ -203,26 +203,6 @@ git clone https://github.com/apache/fineract.git cd fineract/kubernetes minikube start ./kubectl-startup.sh -``` - -Wait for all pods to be ready: -```bash -kubectl get pods -w -``` - -Once all pods are running, access the Mifos web application: -```bash -minikube service mifos-community -``` - -This opens the Mifos X web application in your browser. The nginx reverse proxy in the mifos-community pod forwards API requests to the fineract-server backend. - -**Default credentials:** -- Username: `mifos` -- Password: `password` - -You can also access the Fineract API directly: -```bash minikube service fineract-server --url --https ``` @@ -230,22 +210,14 @@ Fineract is now running at the printed URL, which you can check e.g. using: ```bash http --verify=no --timeout 240 --check-status get $(minikube service fineract-server --url --https)/fineract-provider/actuator/health ``` - To check the status of your containers on your local minikube Kubernetes cluster, run: ```bash minikube dashboard ``` - You can check Fineract logs using: ```bash kubectl logs deployment/fineract-server ``` - -You can check Mifos web app logs using: -```bash -kubectl logs deployment/mifos-community -``` - To shutdown and reset your cluster, run: ```bash ./kubectl-shutdown.sh diff --git a/build.gradle b/build.gradle index 17cee30737a..1d25ed0514e 100644 --- a/build.gradle +++ b/build.gradle @@ -102,7 +102,7 @@ plugins { id 'com.github.hierynomus.license' version '0.16.1' apply false id 'com.github.jk1.dependency-license-report' version '2.9' apply false id 'org.zeroturnaround.gradle.jrebel' version '1.2.0' apply false - id 'org.springframework.boot' version '3.5.6' apply false + id 'org.springframework.boot' version '3.5.5' apply false id 'net.ltgt.errorprone' version '4.1.0' apply false id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.23' apply false id 'com.gorylenko.gradle-git-properties' version '2.4.2' apply false @@ -163,15 +163,6 @@ allprojects { mavenCentral() } - configurations.all { - resolutionStrategy { - dependencySubstitution { - // Substitution is to resolve CVE-2025-12183 - substitute module('org.lz4:lz4-java') using module('at.yawk.lz4:lz4-java:1.10.1') - } - } - } - configurations { implementation { exclude group: 'commons-logging', module: 'commons-logging' @@ -353,7 +344,8 @@ allprojects { "**/generated/**/*MapperImpl.java", '**/META-INF/fineract-test.config', // Apache-specific GitHub metadata settings file - '/.asf.yaml' + '/.asf.yaml', + '**/*.sh' ] } } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index de2e63c05c1..b54069a3c28 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -41,15 +41,6 @@ repositories { mavenCentral() } -configurations.all { - resolutionStrategy { - dependencySubstitution { - // Substitution is to resolve CVE-2025-12183 - substitute module('org.lz4:lz4-java') using module('at.yawk.lz4:lz4-java:1.10.1') - } - } -} - dependencies { implementation 'com.sun.activation:jakarta.activation' implementation 'com.sun.mail:jakarta.mail' diff --git a/buildSrc/src/main/groovy/org.apache.fineract.dependencies.gradle b/buildSrc/src/main/groovy/org.apache.fineract.dependencies.gradle index 08775894bed..8b226bca6fd 100644 --- a/buildSrc/src/main/groovy/org.apache.fineract.dependencies.gradle +++ b/buildSrc/src/main/groovy/org.apache.fineract.dependencies.gradle @@ -25,12 +25,12 @@ dependencyManagement { mavenBom 'com.squareup.okhttp3:okhttp-bom:4.12.0' mavenBom 'org.slf4j:slf4j-bom:2.0.17' mavenBom 'io.micrometer:micrometer-bom:1.13.6' - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.5.6' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.5.5' mavenBom 'io.awspring.cloud:spring-cloud-aws-dependencies:3.2.1' mavenBom 'io.opentelemetry:opentelemetry-bom:1.44.1' mavenBom 'org.jetbrains.kotlin:kotlin-bom:2.0.21' mavenBom 'org.junit:junit-bom:5.11.3' - mavenBom 'com.fasterxml.jackson:jackson-bom:2.19.2' + mavenBom 'com.fasterxml.jackson:jackson-bom:2.18.3' mavenBom 'io.cucumber:cucumber-bom:7.20.1' mavenBom 'org.mockito:mockito-bom:5.14.2' mavenBom 'software.amazon.awssdk:bom:2.29.9' @@ -44,8 +44,8 @@ dependencyManagement { // We do not use :+ to get the latest available version available on Maven Central, as that could suddenly break things. // We use the Renovate Bot to automatically propose Pull Requests (PRs) when upgrades for all of these versions are available. - dependency 'ch.qos.logback:logback-core:1.5.19' - dependency 'ch.qos.logback:logback-classic:1.5.19' + dependency 'ch.qos.logback:logback-core:1.5.17' + dependency 'ch.qos.logback:logback-classic:1.5.17' dependency 'ch.qos.logback.contrib:logback-json-classic:0.1.5' dependency 'ch.qos.logback.contrib:logback-jackson:0.1.5' dependency 'org.codehaus.janino:janino:3.1.12' @@ -55,7 +55,7 @@ dependencyManagement { dependency 'com.google.code.gson:gson:2.11.0' dependency 'com.google.googlejavaformat:google-java-format:1.24.0' dependency 'org.apache.commons:commons-collections4:4.4' - dependency 'org.apache.commons:commons-compress:1.28.0' + dependency 'org.apache.commons:commons-compress:1.26.0' dependency ('software.amazon.msk:aws-msk-iam-auth:2.2.0') { exclude 'commons-logging:commons-logging:' } @@ -74,17 +74,17 @@ dependencyManagement { dependency 'org.ehcache:ehcache:3.10.8' dependency 'com.github.spullara.mustache.java:compiler:0.9.14' dependency 'com.jayway.jsonpath:json-path:2.9.0' - dependency ('org.apache.tika:tika-core:3.2.3') { + dependency ('org.apache.tika:tika-core:2.9.3') { exclude 'commons-logging:commons-logging' } - dependency ('org.apache.tika:tika-core:3.2.3') { + dependency ('org.apache.tika:tika-core:2.9.3') { exclude 'commons-logging:commons-logging' } - dependency ('org.apache.tika:tika-parser-miscoffice-module:3.2.3') { + dependency ('org.apache.tika:tika-parser-miscoffice-module:2.9.3') { exclude 'org.bouncycastle:bcprov-jdk15on' - exclude 'org.bouncycastle:bcjmail-jdk15on' + exclude 'org.bouncycastle:bcmail-jdk15on' exclude 'org.bouncycastle:bcprov-jdk18on' - exclude 'org.bouncycastle:bcjmail-jdk18on' + exclude 'org.bouncycastle:bcmail-jdk18on' exclude 'commons-logging:commons-logging' exclude 'org.apache.logging.log4j:log4j-api' exclude 'org.slf4j:slf4j-api' @@ -97,11 +97,11 @@ dependencyManagement { exclude 'org.apache.commons:commons-compress' exclude 'xml-apis:xml-apis' } - dependency ('org.apache.tika:tika-parser-microsoft-module:3.2.3') { + dependency ('org.apache.tika:tika-parser-microsoft-module:2.9.3') { exclude 'org.bouncycastle:bcprov-jdk15on' - exclude 'org.bouncycastle:bcjmail-jdk15on' + exclude 'org.bouncycastle:bcmail-jdk15on' exclude 'org.bouncycastle:bcprov-jdk18on' - exclude 'org.bouncycastle:bcjmail-jdk18on' + exclude 'org.bouncycastle:bcmail-jdk18on' exclude 'commons-logging:commons-logging' exclude 'org.apache.logging.log4j:log4j-api' exclude 'org.slf4j:slf4j-api' @@ -152,10 +152,10 @@ dependencyManagement { dependency "commons-codec:commons-codec:1.17.1" dependency "org.projectlombok:lombok:1.18.36" - dependency 'org.bouncycastle:bcpkix-jdk18on:1.81' - dependency 'org.bouncycastle:bcprov-jdk18on:1.81' - dependency 'org.bouncycastle:bcutil-jdk18on:1.81' - dependency 'org.bouncycastle:bcpg-jdk18on:1.81' + dependency 'org.bouncycastle:bcpkix-jdk18on:1.80' + dependency 'org.bouncycastle:bcprov-jdk18on:1.80' + dependency 'org.bouncycastle:bcutil-jdk18on:1.80' + dependency 'org.bouncycastle:bcpg-jdk18on:1.80' dependency 'org.eclipse.jgit:org.eclipse.jgit:7.2.0.202503040940-r' dependency 'org.eclipse.jgit:org.eclipse.jgit.gpg.bc:7.2.0.202503040940-r' @@ -185,7 +185,7 @@ dependencyManagement { dependency 'jakarta.annotation:jakarta.annotation-api:3.0.0' dependency 'jakarta.activation:jakarta.activation-api:2.1.3' - dependency ('com.sun.mail:jakarta.mail:2.0.2') { + dependency ('com.sun.mail:jakarta.mail:2.0.1') { // Spring needs this version exclude 'com.sun.activation:jakarta.activation' } @@ -273,11 +273,9 @@ dependencyManagement { dependency 'org.springframework:spring-core:6.2.11' // Force Spring Framework version: CVE-2025-41248 dependency 'org.springframework.security:spring-security-core:6.5.4' - // Force netty-codec version: CVE-2025-67735 - dependency 'io.netty:netty-codec:4.1.129.Final' + // Force netty-codec version: CVE-2025-58057 + dependency 'io.netty:netty-codec:4.1.125.Final' // Force netty-codec version: CVE-2025-58056 - dependency 'io.netty:netty-codec-http:4.1.129.Final' - // Force lz4-java version: CVE-2025-12183 - dependency 'at.yawk.lz4:lz4-java:1.10.1' + dependency 'io.netty:netty-codec-http:4.1.125.Final' } } diff --git a/buildSrc/src/main/groovy/org.apache.fineract.release.gradle b/buildSrc/src/main/groovy/org.apache.fineract.release.gradle index 254d80e2236..78fb085b6a4 100644 --- a/buildSrc/src/main/groovy/org.apache.fineract.release.gradle +++ b/buildSrc/src/main/groovy/org.apache.fineract.release.gradle @@ -196,10 +196,36 @@ fineract { step10: [ order: 10, description: 'Start voting on the dev mailing list', + email: [ + from: "${findProperty('fineract.config.email')}", + name: "${findProperty('fineract.config.name')}", + to: "${findProperty('fineract.config.email')}", + // to: 'dev@fineract.apache.org', + mime: 'text/plain', + subjectTemplate: [ + templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step10.vote.subject.ftl" + ], + messageTemplate: [ + templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step10.vote.message.ftl" + ] + ] ], step11: [ order: 11, description: 'Conclude the vote and announce results', + email: [ + from: "${findProperty('fineract.config.email')}", + name: "${findProperty('fineract.config.name')}", + to: "${findProperty('fineract.config.email')}", + // to: 'dev@fineract.apache.org', + mime: 'text/plain', + subjectTemplate: [ + templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step11.vote.subject.ftl" + ], + messageTemplate: [ + templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step11.vote.message.ftl" + ] + ] ], step12: [ order: 12, diff --git a/buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPlugin.groovy b/buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPlugin.groovy index 1de94a7efc3..c2bb039afe0 100644 --- a/buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPlugin.groovy +++ b/buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPlugin.groovy @@ -18,6 +18,7 @@ */ package org.apache.fineract.gradle +import groovy.json.JsonSlurper import org.apache.commons.io.FileUtils import org.apache.commons.io.filefilter.NotFileFilter import org.apache.commons.io.filefilter.PrefixFileFilter @@ -383,7 +384,23 @@ class FineractPlugin implements Plugin { doFirst { FineractPluginExtension.FineractPluginStep step = step(extension, "step10") - printInstructions(project, "step10") + String version = project.properties?['fineract.release.version'] + + if(!version) { + TextIO textIO = TextIoFactory.getTextIO(); + + version = textIO.newStringInputReader() + .withPattern("\\d+.\\d+.\\d+") + .read("Release Version"); + } + + // TODO: input validation, see FINERACT-1610 + + this.context?.project?['fineract.release.version'] = version + + if(step.email) { + emailService.send( processEmailParams(step.email, this.context) ) + } } } @@ -392,7 +409,28 @@ class FineractPlugin implements Plugin { doFirst { FineractPluginExtension.FineractPluginStep step = step(extension, "step11") - printInstructions(project, "step11") + String version = project.properties?['fineract.release.version'] + + if(!version) { + TextIO textIO = TextIoFactory.getTextIO() + + version = textIO.newStringInputReader() + .withPattern("\\d+.\\d+.\\d+") + .read("Release Version"); + } + + // TODO: input validation, see FINERACT-1610 + + this.context?.project?['fineract.release.version'] = version + + def jsonSlurper = new JsonSlurper() + def data = jsonSlurper.parse(new File("buildSrc/src/main/resources/vote/result.${version}.json")) + + this.context?.project?['fineract.vote'] = data + + if(step.email) { + emailService.send( processEmailParams(step.email, this.context) ) + } } } @@ -432,7 +470,36 @@ class FineractPlugin implements Plugin { doFirst { log.warn("Release step 15: send email to announcement mailing list") - printInstructions(project, "step15") + FineractPluginExtension.FineractPluginStep step = step(extension, "step15") + + String version = project.properties?['fineract.release.version'] + + if(!version) { + TextIO textIO = TextIoFactory.getTextIO() + + version = textIO.newStringInputReader() + .withPattern("\\d+.\\d+.\\d+") + .read("Release Version"); + } + + // TODO: input validation, see FINERACT-1610 + + FineractPluginExtension.FineractPluginJiraParams issues = jiraService.search(step.jira) + + def versions = jiraService.getProjectVersions(step.jira.projectId) + def filteredVersions = versions.findAll { + log.warn(">>>> VERSION: ${it.id} - ${it.name} - ${it.description}") + it.name == version + } + + this.context?.project?['fineract.release.version'] = version + this.context?.project?['fineract.release.issues'] = issues.result + this.context?.project?['fineract.release.projectId'] = step.jira.projectId + this.context?.project?['fineract.release.versionId'] = filteredVersions[0]?.id + + if(step.email) { + emailService.send( processEmailParams(step.email, this.context) ) + } } } } diff --git a/buildSrc/src/main/resources/email/release.step10.vote.message.ftl b/buildSrc/src/main/resources/email/release.step10.vote.message.ftl new file mode 100644 index 00000000000..cf91d174611 --- /dev/null +++ b/buildSrc/src/main/resources/email/release.step10.vote.message.ftl @@ -0,0 +1,51 @@ +<#-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +Hello everyone, + +We are proud to present Apache Fineract ${project['fineract.release.version']}, with the artifacts below up for a vote. Releases are important for a number of reasons: They put a stamp of approval on a set of code changes and they build momentum for future improvements. + +Release notes and ChangeLog: https://cwiki.apache.org/confluence/display/FINERACT/${project['fineract.release.version']}+-+Apache+Fineract + +Source and binary artifacts: https://dist.apache.org/repos/dist/dev/fineract/${project['fineract.release.version']}/ + +Tagged as ${project['fineract.release.version']} + +Committer PGP keys, including the release signing key: https://dist.apache.org/repos/dist/dev/fineract/KEYS + +Note that this release candidate contains source and binary artifacts. + +This vote will be open for 72 hours: + +[ ] +1 approve +[ ] +0 no opinion +[ ] -1 disapprove (and reason why) + +Please indicate if yours is a binding vote, and "Verified: YES/NO/PARTIAL". + +Verified: YES ... Verified integrity and signatures of release artifacts locally, built from source, ran jar/war: Did everything mentioned in the current release candidate verification guidance ( https://fineract.apache.org/docs/rc/#_artifact_verification ). If you did more than that, please specify. "Verified: YES" is required for binding votes. + +Verified: NO ... No testing performed on release candidate, e.g. relying on testing performed by other contributors and/or output of GitHub Actions, while exercising your right to vote. + +Verified: PARTIAL ... Please specify. + +Cheers, + +${project['fineract.config.name']} diff --git a/buildSrc/src/main/resources/instructions/step10.txt.ftl b/buildSrc/src/main/resources/email/release.step10.vote.subject.ftl similarity index 85% rename from buildSrc/src/main/resources/instructions/step10.txt.ftl rename to buildSrc/src/main/resources/email/release.step10.vote.subject.ftl index cbb81dd3df1..9c8df50844e 100644 --- a/buildSrc/src/main/resources/instructions/step10.txt.ftl +++ b/buildSrc/src/main/resources/email/release.step10.vote.subject.ftl @@ -18,12 +18,4 @@ under the License. --> - - -[INSTRUCTIONS:START] - -Initiate voting with the ATR (ASF Trusted Releases) tool. - -https://release-test.apache.org - -[INSTRUCTIONS:END] +[FINERACT] [VOTE] πŸ—³οΈ ${project['fineract.release.version']} for release diff --git a/buildSrc/src/main/resources/email/release.step11.vote.message.ftl b/buildSrc/src/main/resources/email/release.step11.vote.message.ftl new file mode 100644 index 00000000000..227d956d635 --- /dev/null +++ b/buildSrc/src/main/resources/email/release.step11.vote.message.ftl @@ -0,0 +1,89 @@ +<#-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<#if (project['fineract.vote'].approve.binding?size + project['fineract.vote'].approve.nonBinding?size > project['fineract.vote'].disapprove.binding?size + project['fineract.vote'].disapprove.nonBinding?size)> +Voting is now closed and has passed with the following tally, + +Binding +1s: ${project['fineract.vote'].approve.binding?size} +Non binding +1s: ${project['fineract.vote'].approve.nonBinding?size} +<#else> +Voting is now closed and has not passed with the following tally, + +Binding +1s: ${project['fineract.vote'].approve.binding?size} +Non binding +1s: ${project['fineract.vote'].approve.nonBinding?size} + +Binding -1s: ${project['fineract.vote'].disapprove.binding?size} +Non binding -1s: ${project['fineract.vote'].disapprove.nonBinding?size} + + +Here are the detailed results: + +<#list project['fineract.vote'].approve.binding> +Binding +1s: + <#items as item> +- ${item.name} + + + + +<#list project['fineract.vote'].approve.nonBinding> +Non binding +1s: + <#items as item> +- ${item.name} + + + + +<#list project['fineract.vote'].disapprove.binding> +Binding -1s: + <#items as item> +- ${item.name} + + + +<#list project['fineract.vote'].disapprove.nonBinding> +Non binding -1s: + <#items as item> +- ${item.name} + + + + +<#list project['fineract.vote'].noOpinion.binding> +Binding +0s: + <#items as item> +- ${item.name} + + + +<#list project['fineract.vote'].noOpinion.nonBinding> +Non binding +0s: + <#items as item> +- ${item.name} + + + +<#if (project['fineract.vote'].approve.binding?size + project['fineract.vote'].approve.nonBinding?size > project['fineract.vote'].disapprove.binding?size + project['fineract.vote'].disapprove.nonBinding?size)> +Thanks to everyone who voted! I'll now continue with the rest of the release process. +<#else> +Thanks to everyone who voted! Looks like we have to repeat the vote. + + +${project['fineract.config.name']} diff --git a/buildSrc/src/main/resources/instructions/step11.txt.ftl b/buildSrc/src/main/resources/email/release.step11.vote.subject.ftl similarity index 85% rename from buildSrc/src/main/resources/instructions/step11.txt.ftl rename to buildSrc/src/main/resources/email/release.step11.vote.subject.ftl index 5186a299e2b..38092660527 100644 --- a/buildSrc/src/main/resources/instructions/step11.txt.ftl +++ b/buildSrc/src/main/resources/email/release.step11.vote.subject.ftl @@ -18,12 +18,4 @@ under the License. --> - - -[INSTRUCTIONS:START] - -Conclude voting with the ATR (ASF Trusted Releases) tool. - -https://release-test.apache.org - -[INSTRUCTIONS:END] +[FINERACT] [VOTE] [RESULT] 🧾️ ${project['fineract.release.version']} for release diff --git a/buildSrc/src/main/resources/email/release.step15.announce.message.ftl b/buildSrc/src/main/resources/email/release.step15.announce.message.ftl new file mode 100644 index 00000000000..4ccb8322eb7 --- /dev/null +++ b/buildSrc/src/main/resources/email/release.step15.announce.message.ftl @@ -0,0 +1,40 @@ +<#-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +The Apache Fineract project is pleased to announce +the release of Apache Fineract ${project['fineract.release.version']}. +The release is available for download from +https://fineract.apache.org/#downloads + +Apache Fineract is an open-source core banking platform providing a flexible, extensible foundation for a wide range of financial services. By making robust banking technology openly available, it lowers barriers for institutions and innovators to reach underserved and unbanked populations. + +This release addressed ${project['fineract.release.issues']?size} issues. + +Readme: https://github.com/apache/fineract/blob/${project['fineract.release.version']}/README.md + +Release page: https://cwiki.apache.org/confluence/display/FINERACT/${project['fineract.release.version']}+-+Apache+Fineract + +List of fixed issues: +https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=${project['fineract.release.versionId']}&styleName=Html&projectId=${project['fineract.release.projectId']} + +For more information on Apache Fineract please visit +project home page: https://fineract.apache.org + +The Apache Fineract Team diff --git a/buildSrc/src/main/resources/instructions/step15.txt.ftl b/buildSrc/src/main/resources/email/release.step15.announce.subject.ftl similarity index 83% rename from buildSrc/src/main/resources/instructions/step15.txt.ftl rename to buildSrc/src/main/resources/email/release.step15.announce.subject.ftl index 58f119614bd..41d04d822c7 100644 --- a/buildSrc/src/main/resources/instructions/step15.txt.ftl +++ b/buildSrc/src/main/resources/email/release.step15.announce.subject.ftl @@ -18,12 +18,4 @@ under the License. --> - - -[INSTRUCTIONS:START] - -Manually draft an email using your Apache ID. - -See https://fineract.apache.org/docs/current/#_step_15_announcement_email - -[INSTRUCTIONS:END] +[ANNOUNCE] Apache Fineract ${project['fineract.release.version']} Release diff --git a/buildSrc/src/main/resources/instructions/step12.txt.ftl b/buildSrc/src/main/resources/instructions/step12.txt.ftl index 59f418dfc52..22c8bec32d2 100644 --- a/buildSrc/src/main/resources/instructions/step12.txt.ftl +++ b/buildSrc/src/main/resources/instructions/step12.txt.ftl @@ -24,7 +24,6 @@ Move the release candidate from the dev area to the release area using a Subversion server-side copy: -# this is a remote operation -svn mv -m "Release Fineract 1.14.0 🚒" https://dist.apache.org/repos/dist/dev/fineract/${project['fineract.release.version']} https://dist.apache.org/repos/dist/release/fineract/ +svn mv https://dist.apache.org/repos/dist/dev/fineract/${project['fineract.release.version']} https://dist.apache.org/repos/dist/release /fineract/ [INSTRUCTIONS:END] diff --git a/buildSrc/src/main/resources/instructions/step13.txt.ftl b/buildSrc/src/main/resources/instructions/step13.txt.ftl index db0b697126e..3a734bc711d 100644 --- a/buildSrc/src/main/resources/instructions/step13.txt.ftl +++ b/buildSrc/src/main/resources/instructions/step13.txt.ftl @@ -30,6 +30,5 @@ and make sure that everything on the release tag is merged to develop and that e >> git push origin develop >> git branch -D release/${project['fineract.release.version']} >> git push origin :release/${project['fineract.release.version']} ->> git describe [INSTRUCTIONS:END] diff --git a/buildSrc/src/main/resources/instructions/step9.txt.ftl b/buildSrc/src/main/resources/instructions/step9.txt.ftl index ee7b00a5f85..5d2cae8d92c 100644 --- a/buildSrc/src/main/resources/instructions/step9.txt.ftl +++ b/buildSrc/src/main/resources/instructions/step9.txt.ftl @@ -22,6 +22,17 @@ [INSTRUCTIONS:START] -See https://fineract.apache.org/docs/current/#_step_9_verify_distribution_staging +Following are the typical things we need to verify before voting on a release candidate. And the release manager should verify them too before calling out a vote. + +Make sure release artifacts are hosted at https://dist.apache.org/repos/dist/dev/fineract + +* Release candidates should be in format apache-fineract-bin-${project['fineract.release.version']}.tar.gz +* Verify signatures and hashes. You may have to import the public key of the release manager to verify the signatures. (gpg --import KEYS or gpg --recv-key ) +* Git tag matches the released bits (diff -rf) +* Can compile docs and code successfully from source +* Verify DISCLAIMER, NOTICE and LICENSE (year etc) +* All files have correct headers (Rat check should be clean - gradlew rat) +* No jar files in the source artifacts +* Integration tests should work [INSTRUCTIONS:END] diff --git a/config/docker/compose/fineract.yml b/config/docker/compose/fineract.yml index 0d411844eab..70a0c4ab279 100644 --- a/config/docker/compose/fineract.yml +++ b/config/docker/compose/fineract.yml @@ -20,7 +20,7 @@ version: "3.8" services: fineract: - # user: "${FINERACT_USER}:${FINERACT_GROUP}" + user: "${FINERACT_USER}:${FINERACT_GROUP}" image: ${IMAGE_NAME:-apache/fineract:latest} volumes: - ${PWD}/config/docker/logback/logback-override.xml:/app/logback-override.xml diff --git a/custom/acme/event/starter/src/main/java/com/acme/fineract/event/starter/AcmeEventAutoConfiguration.java b/custom/acme/event/starter/src/main/java/com/acme/fineract/event/starter/AcmeEventAutoConfiguration.java index 671b75493e6..ea8d65d7451 100644 --- a/custom/acme/event/starter/src/main/java/com/acme/fineract/event/starter/AcmeEventAutoConfiguration.java +++ b/custom/acme/event/starter/src/main/java/com/acme/fineract/event/starter/AcmeEventAutoConfiguration.java @@ -20,7 +20,8 @@ import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.ComponentScans; @AutoConfiguration -@ComponentScan("com.acme.fineract.event.externalevent") +@ComponentScans({ @ComponentScan("com.acme.fineract.event.externalevent") }) public class AcmeEventAutoConfiguration {} diff --git a/custom/acme/loan/starter/src/main/java/com/acme/fineract/loan/starter/AcmeLoanAutoConfiguration.java b/custom/acme/loan/starter/src/main/java/com/acme/fineract/loan/starter/AcmeLoanAutoConfiguration.java index 0656d073b8c..d1516f3a0b0 100644 --- a/custom/acme/loan/starter/src/main/java/com/acme/fineract/loan/starter/AcmeLoanAutoConfiguration.java +++ b/custom/acme/loan/starter/src/main/java/com/acme/fineract/loan/starter/AcmeLoanAutoConfiguration.java @@ -26,9 +26,11 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.ComponentScans; @AutoConfiguration -@ComponentScan(basePackages = { "com.acme.fineract.loan.cob", "com.acme.fineract.loan.processor", "com.acme.fineract.loan.job" }) +@ComponentScans({ @ComponentScan("com.acme.fineract.loan.cob"), @ComponentScan("com.acme.fineract.loan.processor"), + @ComponentScan("com.acme.fineract.loan.job") }) @ConditionalOnProperty("acme.loan.enabled") public class AcmeLoanAutoConfiguration { diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java index ab9ffcd2bdd..471f35801e8 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java @@ -24,6 +24,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; @@ -51,13 +52,9 @@ public class AccrualAccountingApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Executes Periodic Accrual Accounting", method = "POST", description = """ - Mandatory Fields - - tillDate - """) + @Operation(summary = "Executes Periodic Accrual Accounting", method = "POST", description = "Mandatory Fields\n" + "\n" + "tillDate\n") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = AccrualAccountingApiResourceSwagger.PostRunaccrualsRequest.class))) - @ApiResponse(responseCode = "200", description = "OK") + @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") }) public CommandProcessingResult executePeriodicAccrualAccounting(@Parameter(hidden = true) AccrualAccountRequest accrualAccountRequest) { final CommandWrapper commandRequest = new CommandWrapperBuilder().excuteAccrualAccounting() .withJson(apiJsonSerializerService.serialize(accrualAccountRequest)).build(); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalanceRepository.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalanceRepository.java index dd83fc4f6d6..f49e8b5d4bd 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalanceRepository.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalanceRepository.java @@ -18,8 +18,6 @@ */ package org.apache.fineract.accounting.glaccount.domain; -import java.math.BigDecimal; -import java.time.LocalDate; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; @@ -30,33 +28,4 @@ public interface TrialBalanceRepository extends JpaRepository findNewByOfficeAndAccount(@Param("officeId") Long officeId, @Param("accountId") Long accountId); - - @Query("SELECT MAX(tb.transactionDate) FROM TrialBalance tb") - LocalDate findMaxCreatedDate(); - - @Query(""" - SELECT tb.closingBalance - FROM TrialBalance tb - WHERE tb.officeId = :officeId - AND tb.glAccountId = :accountId - AND tb.closingBalance IS NOT NULL - ORDER BY tb.transactionDate DESC, tb.entryDate DESC - """) - List findLastClosingBalance(Long officeId, Long accountId); - - @Query(""" - SELECT DISTINCT tb.officeId - FROM TrialBalance tb - WHERE tb.closingBalance IS NULL - """) - List findDistinctOfficeIdsWithNullClosingBalance(); - - @Query(""" - SELECT DISTINCT tb.glAccountId - FROM TrialBalance tb - WHERE tb.officeId = :officeId - AND tb.closingBalance IS NULL - """) - List findDistinctAccountIdsWithNullClosingBalanceByOfficeId(Long officeId); - } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/jobs/updatetrialbalancedetails/UpdateTrialBalanceDetailsConfig.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/jobs/updatetrialbalancedetails/UpdateTrialBalanceDetailsConfig.java index cb327cfb10e..3b764c3e7db 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/jobs/updatetrialbalancedetails/UpdateTrialBalanceDetailsConfig.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/jobs/updatetrialbalancedetails/UpdateTrialBalanceDetailsConfig.java @@ -19,9 +19,7 @@ package org.apache.fineract.accounting.glaccount.jobs.updatetrialbalancedetails; import lombok.RequiredArgsConstructor; -import org.apache.fineract.accounting.glaccount.domain.TrialBalanceRepository; import org.apache.fineract.accounting.glaccount.domain.TrialBalanceRepositoryWrapper; -import org.apache.fineract.accounting.journalentry.domain.JournalEntryRepository; import org.apache.fineract.infrastructure.core.service.database.RoutingDataSourceServiceFactory; import org.apache.fineract.infrastructure.jobs.service.JobName; import org.springframework.batch.core.Job; @@ -42,8 +40,6 @@ public class UpdateTrialBalanceDetailsConfig { private final PlatformTransactionManager transactionManager; private final RoutingDataSourceServiceFactory dataSourceServiceFactory; private final TrialBalanceRepositoryWrapper trialBalanceRepositoryWrapper; - private final TrialBalanceRepository trialBalanceRepository; - private final JournalEntryRepository journalEntryRepository; @Bean protected Step updateTrialBalanceDetailsStep() { @@ -59,7 +55,6 @@ public Job updateTrialBalanceDetailsJob() { @Bean public UpdateTrialBalanceDetailsTasklet updateTrialBalanceDetailsTasklet() { - return new UpdateTrialBalanceDetailsTasklet(dataSourceServiceFactory, trialBalanceRepositoryWrapper, trialBalanceRepository, - journalEntryRepository); + return new UpdateTrialBalanceDetailsTasklet(dataSourceServiceFactory, trialBalanceRepositoryWrapper); } } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/jobs/updatetrialbalancedetails/UpdateTrialBalanceDetailsTasklet.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/jobs/updatetrialbalancedetails/UpdateTrialBalanceDetailsTasklet.java index e4718f3f580..a68e431e0ea 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/jobs/updatetrialbalancedetails/UpdateTrialBalanceDetailsTasklet.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/jobs/updatetrialbalancedetails/UpdateTrialBalanceDetailsTasklet.java @@ -24,9 +24,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.accounting.glaccount.domain.TrialBalance; -import org.apache.fineract.accounting.glaccount.domain.TrialBalanceRepository; import org.apache.fineract.accounting.glaccount.domain.TrialBalanceRepositoryWrapper; -import org.apache.fineract.accounting.journalentry.domain.JournalEntryRepository; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; import org.apache.fineract.infrastructure.core.service.database.RoutingDataSourceServiceFactory; @@ -43,87 +41,59 @@ public class UpdateTrialBalanceDetailsTasklet implements Tasklet { private final RoutingDataSourceServiceFactory dataSourceServiceFactory; private final TrialBalanceRepositoryWrapper trialBalanceRepositoryWrapper; - private final TrialBalanceRepository trialBalanceRepository; - private final JournalEntryRepository journalEntryRepository; @Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { final JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSourceServiceFactory.determineDataSourceService().retrieveDataSource()); - - processTrialBalanceGaps(jdbcTemplate); - updateClosingBalances(jdbcTemplate); - - return RepeatStatus.FINISHED; - } - - private void processTrialBalanceGaps(JdbcTemplate jdbcTemplate) { - LocalDate maxCreatedDate = trialBalanceRepository.findMaxCreatedDate(); - LocalDate baselineDate = maxCreatedDate != null ? maxCreatedDate : LocalDate.of(2010, 1, 1); - List tbGaps = journalEntryRepository.findTransactionDatesAfter(baselineDate); + final StringBuilder tbGapSqlBuilder = new StringBuilder(500); + tbGapSqlBuilder.append("select distinct(je.transaction_date) ").append("from acc_gl_journal_entry je ") + .append("where je.transaction_date > (select coalesce(MAX(created_date),'2010-01-01') from m_trial_balance)"); + final List tbGaps = jdbcTemplate.queryForList(tbGapSqlBuilder.toString(), LocalDate.class); for (LocalDate tbGap : tbGaps) { - if (DateUtils.getExactDifferenceInDays(tbGap, DateUtils.getBusinessLocalDate()) < 1) { + int days = DateUtils.getExactDifferenceInDays(tbGap, DateUtils.getBusinessLocalDate()); + if (days < 1) { continue; } - insertTrialBalanceForDate(tbGap); + final StringBuilder sqlBuilder = new StringBuilder(600); + sqlBuilder.append("Insert Into m_trial_balance(office_id, account_id, Amount, entry_date, created_date,closing_balance) ") + .append("Select je.office_id, je.account_id, SUM(CASE WHEN je.type_enum=1 THEN (-1) * je.amount ELSE je.amount END) ") + .append("as Amount, Date(je.entry_date) as Entry_Date, je.transaction_date as Created_Date,sum(je.amount) as closing_balance ") + .append("from acc_gl_journal_entry je WHERE je.transaction_date = ? ") + .append("group by je.account_id, je.office_id, je.transaction_date, Date(je.entry_date)"); + final int result = jdbcTemplate.update(sqlBuilder.toString(), tbGap); + log.debug("{}: Records affected by updateTrialBalanceDetails: {}", ThreadLocalContextUtil.getTenant().getName(), result); } - } - - private void insertTrialBalanceForDate(LocalDate tbGap) { - List rows = journalEntryRepository.findTrialBalanceLinesForDate(tbGap); - - List trialBalances = rows.stream().map(row -> { - TrialBalance tb = new TrialBalance(); - tb.setOfficeId((Long) row[0]); - tb.setGlAccountId((Long) row[1]); - tb.setAmount((BigDecimal) row[2]); - tb.setEntryDate((LocalDate) row[3]); - tb.setTransactionDate((LocalDate) row[4]); - tb.setClosingBalance((BigDecimal) row[5]); - return tb; - }).toList(); - - trialBalanceRepositoryWrapper.save(trialBalances); - - log.debug("{}: Records affected by updateTrialBalanceDetails: {}", ThreadLocalContextUtil.getTenant().getName(), - trialBalances.size()); - } - - private void updateClosingBalances(JdbcTemplate jdbcTemplate) { - final List officeIds = trialBalanceRepository.findDistinctOfficeIdsWithNullClosingBalance(); - + String distinctOfficeQuery = "select distinct(office_id) from m_trial_balance where closing_balance is null group by office_id"; + final List officeIds = jdbcTemplate.queryForList(distinctOfficeQuery, Long.class); for (Long officeId : officeIds) { - updateClosingBalancesForOffice(jdbcTemplate, officeId); - } - } - - private void updateClosingBalancesForOffice(JdbcTemplate jdbcTemplate, Long officeId) { - final List accountIds = trialBalanceRepository.findDistinctAccountIdsWithNullClosingBalanceByOfficeId(officeId); - - for (Long accountId : accountIds) { - updateClosingBalanceForAccount(jdbcTemplate, officeId, accountId); - } - } - - private void updateClosingBalanceForAccount(JdbcTemplate jdbcTemplate, Long officeId, Long accountId) { - BigDecimal closingBalance = getPreviousClosingBalance(officeId, accountId); - List tbRows = trialBalanceRepositoryWrapper.findNewByOfficeAndAccount(officeId, accountId); - - updateTrialBalanceRows(tbRows, closingBalance); - } - - private BigDecimal getPreviousClosingBalance(Long officeId, Long accountId) { - List closingBalanceData = trialBalanceRepository.findLastClosingBalance(officeId, accountId); - return CollectionUtils.isEmpty(closingBalanceData) ? BigDecimal.ZERO : closingBalanceData.getFirst(); - } - - private void updateTrialBalanceRows(List tbRows, BigDecimal initialClosingBalance) { - BigDecimal closingBalance = initialClosingBalance; - - for (TrialBalance row : tbRows) { - if (closingBalance != null) { - closingBalance = closingBalance.add(row.getAmount()); + String distinctAccountQuery = "select distinct(account_id) from m_trial_balance where office_id=? and closing_balance is null group by account_id"; + final List accountIds = jdbcTemplate.queryForList(distinctAccountQuery, Long.class, officeId); + for (Long accountId : accountIds) { + final String closingBalanceQuery = "select closing_balance from m_trial_balance where office_id=? and account_id=? and closing_balance " + + "is not null order by created_date desc, entry_date desc limit 1"; + List closingBalanceData = jdbcTemplate.queryForList(closingBalanceQuery, BigDecimal.class, officeId, accountId); + List tbRows = trialBalanceRepositoryWrapper.findNewByOfficeAndAccount(officeId, accountId); + BigDecimal closingBalance = null; + if (!CollectionUtils.isEmpty(closingBalanceData)) { + closingBalance = closingBalanceData.get(0); + } + if (CollectionUtils.isEmpty(closingBalanceData)) { + closingBalance = BigDecimal.ZERO; + for (TrialBalance row : tbRows) { + closingBalance = closingBalance.add(row.getAmount()); + row.setClosingBalance(closingBalance); + } + } else { + for (TrialBalance tbRow : tbRows) { + if (closingBalance != null) { + closingBalance = closingBalance.add(tbRow.getAmount()); + } + tbRow.setClosingBalance(closingBalance); + } + } + trialBalanceRepositoryWrapper.save(tbRows); } - row.setClosingBalance(closingBalance); } + return RepeatStatus.FINISHED; } } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryRepository.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryRepository.java index b078042ab49..b69c0180393 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryRepository.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryRepository.java @@ -18,7 +18,6 @@ */ package org.apache.fineract.accounting.journalentry.domain; -import java.time.LocalDate; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; @@ -42,27 +41,4 @@ public interface JournalEntryRepository extends JpaRepository findJournalEntries(@Param("transactionId") String transactionId, @Param("entityType") Integer entityType); - @Query(""" - SELECT DISTINCT je.transactionDate - FROM JournalEntry je - WHERE je.transactionDate>:afterDate - """) - List findTransactionDatesAfter(LocalDate afterDate); - - @Query(""" - SELECT je.office.id, - je.glAccount.id, - SUM(CASE WHEN je.type = 1 - THEN -1 * je.amount - ELSE je.amount - END), - je.transactionDate, - je.createdDate, - SUM(je.amount) - FROM JournalEntry je - WHERE je.transactionDate = :transactionDate - GROUP BY je.office.id, je.glAccount.id, je.transactionDate, je.createdDate - """) - List findTrialBalanceLinesForDate(@Param("transactionDate") LocalDate transactionDate); - } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java index 0bc4e463f20..e69994034c8 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java @@ -24,6 +24,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.DELETE; @@ -68,15 +69,13 @@ @Path("/v1/accountingrules") @Component -@Tag(name = "Accounting Rules", description = """ - It is typical scenario in MFI's that non accountants pass journal entries on a regular basis. For Ex: A branch office might deposit their entire cash at hand to their Bank account at the end of a working day. The branch office users might not understand enough of accounting to figure out which account needs to get credited and which account needs to be debited to represent this transaction. - - Enter accounting rules, an abstraction on top of manual Journal entires for enabling simpler data entry. An accounting rule can define any of the following abstractions - - A Simple journal entry where both the credit and debit account have been preselected - A Simple journal entry where either credit or debit accounts have been limited to a pre-selected list of accounts (Ex: Debit account should be one of "Bank of America" of "JP Morgan" and credit account should be "Cash") - A Compound journal entry where multiple debits and / or multiple credits may be made amongst a set of preselected list of accounts (Ex: Credit account should be either "Bank Of America" or "Cash" and debit account can be "Employee Salary" and/or "Miscellenous Expenses") - An accounting rule can also be optionally associated with a branch, so that only a particular Branch's users have access to the rule""") +@Tag(name = "Accounting Rules", description = "It is typical scenario in MFI's that non accountants pass journal entries on a regular basis. For Ex: A branch office might deposit their entire cash at hand to their Bank account at the end of a working day. The branch office users might not understand enough of accounting to figure out which account needs to get credited and which account needs to be debited to represent this transaction.\n" + + "\n" + + "Enter accounting rules, an abstraction on top of manual Journal entires for enabling simpler data entry. An accounting rule can define any of the following abstractions\n" + + "\n" + "A Simple journal entry where both the credit and debit account have been preselected\n" + + "A Simple journal entry where either credit or debit accounts have been limited to a pre-selected list of accounts (Ex: Debit account should be one of \"Bank of America\" of \"JP Morgan\" and credit account should be \"Cash\")\n" + + "A Compound journal entry where multiple debits and / or multiple credits may be made amongst a set of preselected list of accounts (Ex: Credit account should be either \"Bank Of America\" or \"Cash\" and debit account can be \"Employee Salary\" and/or \"Miscellenous Expenses\")\n" + + "An accounting rule can also be optionally associated with a branch, so that only a particular Branch's users have access to the rule") @RequiredArgsConstructor public class AccountingRuleApiResource { @@ -95,14 +94,8 @@ public class AccountingRuleApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Accounting Rule Details Template", description = """ - This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of: - - Field Defaults - Allowed Value Lists - Example Request: - - accountingrules/template""") + @Operation(summary = "Retrieve Accounting Rule Details Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "accountingrules/template") public AccountingRuleData retrieveTemplate() { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSION); return handleTemplate(null); @@ -111,12 +104,8 @@ public AccountingRuleData retrieveTemplate() { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Accounting Rules", description = """ - Returns the list of defined accounting rules. - - Example Requests: - - accountingrules""") + @Operation(summary = "Retrieve Accounting Rules", description = "Returns the list of defined accounting rules.\n" + "\n" + + "Example Requests:\n" + "\n" + "accountingrules") public List retrieveAllAccountingRules(@Context final UriInfo uriInfo) { final AppUser currentUser = context.authenticatedUser(); currentUser.validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSION); @@ -133,12 +122,8 @@ public List retrieveAllAccountingRules(@Context final UriInf @Path("{accountingRuleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Accounting rule", description = """ - Returns the details of a defined Accounting rule. - - Example Requests: - - accountingrules/1""") + @Operation(summary = "Retrieve a Accounting rule", description = "Returns the details of a defined Accounting rule.\n" + "\n" + + "Example Requests:\n" + "\n" + "accountingrules/1") public AccountingRuleData retreiveAccountingRule( @PathParam("accountingRuleId") @Parameter(description = "accountingRuleId") final Long accountingRuleId, @Context final UriInfo uriInfo) { @@ -153,18 +138,12 @@ public AccountingRuleData retreiveAccountingRule( @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create/Define a Accounting rule", description = """ - Define a new Accounting rule. - - Mandatory Fields - name, officeId, - accountToDebit OR debitTags, - accountToCredit OR creditTags. - - Optional Fields - description""") + @Operation(summary = "Create/Define a Accounting rule", description = "Define a new Accounting rule.\n" + "\n" + "Mandatory Fields\n" + + "name, officeId,\n" + "accountToDebit OR debitTags,\n" + "accountToCredit OR creditTags.\n" + "\n" + "Optional Fields\n" + + "description") @RequestBody(content = @Content(schema = @Schema(implementation = AccountRuleRequest.class))) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.PostAccountingRulesResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.PostAccountingRulesResponse.class))) }) public CommandProcessingResult createAccountingRule(@Parameter(hidden = true) AccountRuleRequest accountRuleRequest) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createAccountingRule() .withJson(apiJsonSerializerService.serialize(accountRuleRequest)).build(); @@ -178,7 +157,8 @@ public CommandProcessingResult createAccountingRule(@Parameter(hidden = true) Ac @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Update a Accounting Rule", description = "Updates the details of a Accounting rule.") @RequestBody(content = @Content(schema = @Schema(implementation = AccountRuleRequest.class))) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.PutAccountingRulesResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.PutAccountingRulesResponse.class))) }) public CommandProcessingResult updateAccountingRule( @PathParam("accountingRuleId") @Parameter(description = "accountingRuleId") final Long accountingRuleId, @Parameter(hidden = true) AccountRuleRequest accountRuleRequest) { @@ -193,7 +173,8 @@ public CommandProcessingResult updateAccountingRule( @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Accounting Rule", description = "Deletes a Accounting rule.") - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.DeleteAccountingRulesResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.DeleteAccountingRulesResponse.class))) }) public CommandProcessingResult deleteAccountingRule( @PathParam("accountingRuleId") @Parameter(description = "accountingRuleId") final Long accountingRuleId) { diff --git a/fineract-avro-schemas/src/main/avro/loan/v1/LoanAccountDataV1.avsc b/fineract-avro-schemas/src/main/avro/loan/v1/LoanAccountDataV1.avsc index 8966f19a013..cf0e11d03ed 100644 --- a/fineract-avro-schemas/src/main/avro/loan/v1/LoanAccountDataV1.avsc +++ b/fineract-avro-schemas/src/main/avro/loan/v1/LoanAccountDataV1.avsc @@ -413,7 +413,7 @@ }, { "default": null, - "name": "graceOnArrearsAgeing", + "name": "graceOnArrearsAging", "type": [ "null", "int" diff --git a/fineract-avro-schemas/src/main/avro/loan/v1/LoanProductDataV1.avsc b/fineract-avro-schemas/src/main/avro/loan/v1/LoanProductDataV1.avsc index fadd5f79739..81afe1537f8 100644 --- a/fineract-avro-schemas/src/main/avro/loan/v1/LoanProductDataV1.avsc +++ b/fineract-avro-schemas/src/main/avro/loan/v1/LoanProductDataV1.avsc @@ -389,7 +389,7 @@ }, { "default": null, - "name": "graceOnArrearsAgeing", + "name": "graceOnArrearsAging", "type": [ "null", "int" diff --git a/fineract-client-feign/dependencies.gradle b/fineract-client-feign/dependencies.gradle index ebc09f7973b..59cb8278b0b 100644 --- a/fineract-client-feign/dependencies.gradle +++ b/fineract-client-feign/dependencies.gradle @@ -33,6 +33,7 @@ dependencies { 'jakarta.annotation:jakarta.annotation-api:3.0.0', 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.15', 'org.apache.commons:commons-lang3:3.12.0', + 'org.slf4j:slf4j-api:1.7.36', 'org.projectlombok:lombok' ) @@ -42,6 +43,7 @@ dependencies { 'org.junit.jupiter:junit-jupiter-engine:5.11.3', 'org.mockito:mockito-core:5.14.2', 'org.assertj:assertj-core:3.26.3', + 'org.slf4j:slf4j-simple:1.7.36', 'org.wiremock:wiremock-standalone' ) } diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepMapper.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepMapper.java index e35dbbecc46..56c6b8f7ad5 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepMapper.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepMapper.java @@ -24,11 +24,12 @@ import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.mapstruct.Mapper; import org.mapstruct.Mapping; +import org.mapstruct.Mappings; @Mapper(config = MapstructMapperConfig.class) public interface BusinessStepMapper { - @Mapping(target = "order", source = "source.stepOrder") + @Mappings({ @Mapping(target = "order", source = "source.stepOrder") }) BusinessStep map(BatchBusinessStep source); List map(List source); diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingConstants.java b/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingConstants.java index 788ae2a56af..e003dca5282 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingConstants.java @@ -81,7 +81,8 @@ public Integer getValue() { } public static CashAccountsForLoan fromInt(final int i) { - return intToEnumMap.get(i); + final CashAccountsForLoan type = intToEnumMap.get(Integer.valueOf(i)); + return type; } } @@ -141,7 +142,8 @@ public Integer getValue() { } public static AccrualAccountsForLoan fromInt(final int i) { - return intToEnumMap.get(i); + final AccrualAccountsForLoan type = intToEnumMap.get(Integer.valueOf(i)); + return type; } } @@ -295,7 +297,8 @@ public Integer getValue() { } public static CashAccountsForSavings fromInt(final int i) { - return intToEnumMap.get(i); + final CashAccountsForSavings type = intToEnumMap.get(Integer.valueOf(i)); + return type; } } @@ -343,7 +346,8 @@ public Integer getValue() { } public static AccrualAccountsForSavings fromInt(final int i) { - return intToEnumMap.get(i); + final AccrualAccountsForSavings type = intToEnumMap.get(Integer.valueOf(i)); + return type; } } @@ -488,7 +492,8 @@ public String getValueAsString() { } public static FinancialActivity fromInt(final int financialActivityId) { - return intToEnumMap.get(financialActivityId); + final FinancialActivity type = intToEnumMap.get(Integer.valueOf(financialActivityId)); + return type; } public static FinancialActivityData toFinancialActivityData(final int financialActivityId) { @@ -501,7 +506,8 @@ public static List getAllFinancialActivities() { } private static FinancialActivityData convertToFinancialActivityData(final FinancialActivity type) { - return new FinancialActivityData(type.value, type.code, type.getMappedGLAccountType()); + FinancialActivityData financialActivityData = new FinancialActivityData(type.value, type.code, type.getMappedGLAccountType()); + return financialActivityData; } } @@ -539,7 +545,8 @@ public Integer getValue() { } public static CashAccountsForShares fromInt(final int i) { - return intToEnumMap.get(i); + final CashAccountsForShares type = intToEnumMap.get(Integer.valueOf(i)); + return type; } } diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingEnumerations.java b/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingEnumerations.java index 65bdb835f5a..a8d651ccd86 100755 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingEnumerations.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingEnumerations.java @@ -37,7 +37,9 @@ public static EnumOptionData gLAccountType(final int id) { } public static EnumOptionData gLAccountType(final GLAccountType accountType) { - return new EnumOptionData(accountType.getValue().longValue(), accountType.getCode(), accountType.toString()); + final EnumOptionData optionData = new EnumOptionData(accountType.getValue().longValue(), accountType.getCode(), + accountType.toString()); + return optionData; } public static List gLAccountType(final GLAccountType[] accountTypes) { @@ -53,7 +55,9 @@ public static EnumOptionData gLAccountUsage(final int id) { } public static EnumOptionData gLAccountUsage(final GLAccountUsage accountUsage) { - return new EnumOptionData(accountUsage.getValue().longValue(), accountUsage.getCode(), accountUsage.toString()); + final EnumOptionData optionData = new EnumOptionData(accountUsage.getValue().longValue(), accountUsage.getCode(), + accountUsage.toString()); + return optionData; } public static List gLAccountUsage(final GLAccountUsage[] accountUsages) { @@ -69,7 +73,9 @@ public static EnumOptionData journalEntryType(final int id) { } public static EnumOptionData journalEntryType(final JournalEntryType journalEntryType) { - return new EnumOptionData(journalEntryType.getValue().longValue(), journalEntryType.getCode(), journalEntryType.toString()); + final EnumOptionData optionData = new EnumOptionData(journalEntryType.getValue().longValue(), journalEntryType.getCode(), + journalEntryType.toString()); + return optionData; } public static List journalEntryTypes(final JournalEntryType[] journalEntryTypes) { @@ -85,8 +91,9 @@ public static EnumOptionData portfolioProductType(final int id) { } public static EnumOptionData portfolioProductType(final PortfolioProductType portfolioProductType) { - return new EnumOptionData(portfolioProductType.getValue().longValue(), portfolioProductType.getCode(), + final EnumOptionData optionData = new EnumOptionData(portfolioProductType.getValue().longValue(), portfolioProductType.getCode(), portfolioProductType.toString()); + return optionData; } public static EnumOptionData accountingRuleType(final int id) { @@ -94,7 +101,8 @@ public static EnumOptionData accountingRuleType(final int id) { } public static EnumOptionData accountingRuleType(final AccountingRuleType type) { - return new EnumOptionData(type.getValue().longValue(), type.getCode(), type.toString()); + final EnumOptionData optionData = new EnumOptionData(type.getValue().longValue(), type.getCode(), type.toString()); + return optionData; } public static List accountingRuleTypes(final AccountingRuleType[] accountingRuleTypes) { diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingRuleType.java b/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingRuleType.java index a159d232559..e90b64044c2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingRuleType.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/common/AccountingRuleType.java @@ -45,7 +45,8 @@ public enum AccountingRuleType { } public static AccountingRuleType fromInt(final Integer ruleTypeValue) { - return intToEnumMap.get(ruleTypeValue); + final AccountingRuleType type = intToEnumMap.get(ruleTypeValue); + return type; } AccountingRuleType(final Integer value, final String code, final String description) { diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountType.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountType.java index 7dcf7be7ace..fa897c83060 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountType.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountType.java @@ -119,10 +119,6 @@ public String toString() { return name(); } - public EnumOptionData toEnumOptionData() { - return new EnumOptionData((long) value, code, code); - } - public boolean isAssetType() { return this.value.equals(GLAccountType.ASSET.getValue()); } diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountUsage.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountUsage.java index 2425e37f3a1..bf2e587ad5b 100755 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountUsage.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountUsage.java @@ -20,7 +20,6 @@ import java.util.HashMap; import java.util.Map; -import org.apache.fineract.infrastructure.core.data.EnumOptionData; public enum GLAccountUsage { @@ -82,8 +81,4 @@ public String toString() { return name().toString(); } - public EnumOptionData toEnumOptionData() { - return new EnumOptionData((long) value, code, code); - } - } diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/mapper/GlAccountMapper.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/mapper/GlAccountMapper.java deleted file mode 100644 index f72a906eeba..00000000000 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/mapper/GlAccountMapper.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.fineract.accounting.glaccount.mapper; - -import java.util.List; -import org.apache.fineract.accounting.glaccount.data.GLAccountData; -import org.apache.fineract.accounting.glaccount.domain.GLAccount; -import org.apache.fineract.accounting.glaccount.domain.GLAccountType; -import org.apache.fineract.accounting.glaccount.domain.GLAccountUsage; -import org.apache.fineract.infrastructure.codes.mapper.CodeValueMapper; -import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; -import org.apache.fineract.infrastructure.core.data.EnumOptionData; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.Named; - -@Mapper(config = MapstructMapperConfig.class, uses = { CodeValueMapper.class }) -public interface GlAccountMapper { - - @Mapping(target = "usage", source = "glAccount.usage", qualifiedByName = "glAccountUsage") - @Mapping(target = "type", source = "glAccount.type", qualifiedByName = "glAccountType") - @Mapping(target = "name", source = "glAccount.name") - @Mapping(target = "nameDecorated", source = "glAccount.name") - @Mapping(target = "parentId", source = "glAccount.parent.id") - @Mapping(target = "tagId", source = "glAccount.tagId") - @Mapping(target = "accountTypeOptions", ignore = true) - @Mapping(target = "usageOptions", ignore = true) - @Mapping(target = "assetHeaderAccountOptions", ignore = true) - @Mapping(target = "liabilityHeaderAccountOptions", ignore = true) - @Mapping(target = "equityHeaderAccountOptions", ignore = true) - @Mapping(target = "incomeHeaderAccountOptions", ignore = true) - @Mapping(target = "expenseHeaderAccountOptions", ignore = true) - @Mapping(target = "allowedAssetsTagOptions", ignore = true) - @Mapping(target = "allowedLiabilitiesTagOptions", ignore = true) - @Mapping(target = "allowedEquityTagOptions", ignore = true) - @Mapping(target = "allowedIncomeTagOptions", ignore = true) - @Mapping(target = "allowedExpensesTagOptions", ignore = true) - @Mapping(target = "organizationRunningBalance", ignore = true) - @Mapping(target = "rowIndex", ignore = true) - GLAccountData map(GLAccount glAccount); - - List map(List glAccounts); - - @Named("glAccountType") - default EnumOptionData glAccountType(Integer typeId) { - return GLAccountType.fromInt(typeId).toEnumOptionData(); - } - - @Named("glAccountUsage") - default EnumOptionData glAccountUsage(Integer usageId) { - return GLAccountUsage.fromInt(usageId).toEnumOptionData(); - } -} diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/mapper/GlAccountTypeMapper.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/mapper/GlAccountTypeMapper.java deleted file mode 100644 index 83ac11f9aea..00000000000 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/mapper/GlAccountTypeMapper.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.fineract.accounting.glaccount.mapper; - -import org.apache.fineract.accounting.glaccount.domain.GLAccountType; -import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; -import org.apache.fineract.infrastructure.core.data.EnumOptionData; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; - -@Mapper(config = MapstructMapperConfig.class) -public interface GlAccountTypeMapper { - - @Mapping(target = "id", expression = "java((long) glAccountType.getValue())") - @Mapping(target = "code", source = "glAccountType.code") - @Mapping(target = "description", source = "glAccountType.code") - EnumOptionData map(GLAccountType glAccountType); - -} diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/mapper/GlAccountUsageMapper.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/mapper/GlAccountUsageMapper.java deleted file mode 100644 index e727ab33b29..00000000000 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/mapper/GlAccountUsageMapper.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.fineract.accounting.glaccount.mapper; - -import org.apache.fineract.accounting.glaccount.domain.GLAccountUsage; -import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; -import org.apache.fineract.infrastructure.core.data.EnumOptionData; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; - -@Mapper(config = MapstructMapperConfig.class) -public interface GlAccountUsageMapper { - - @Mapping(target = "id", expression = "java((long) glAccountUsage.getValue())") - @Mapping(target = "code", source = "glAccountUsage.code") - @Mapping(target = "description", source = "glAccountUsage.code") - EnumOptionData map(GLAccountUsage glAccountUsage); - -} diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java b/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java index 26b1bcb29bb..491b13b441d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java @@ -25,6 +25,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.DefaultValue; @@ -62,14 +63,13 @@ */ @Path("/v1/batches") @Component -@Tag(name = "Batch API", description = """ - The Apache Fineract Batch API enables a consumer to access significant amounts of data in a single call or to make changes to several objects at once. Batching allows a consumer to pass instructions for several operations in a single HTTP request. A consumer can also specify dependencies between related operations. Once all operations have been completed, a consolidated response will be passed back and the HTTP connection will be closed. - - The Batch API takes in an array of logical HTTP requests represented as JSON arrays - each request has a requestId (the id of a request used to specify the sequence and as a dependency between requests), a method (corresponding to HTTP method GET/PUT/POST/DELETE etc.), a relativeUrl (the portion of the URL after https://example.org/api/v2/), optional headers array (corresponding to HTTP headers), optional reference parameter if a request is dependent on another request and an optional body (for POST and PUT requests). The Batch API returns an array of logical HTTP responses represented as JSON arrays - each response has a requestId, a status code, an optional headers array and an optional body (which is a JSON encoded string). - - Batch API uses Json Path to handle dependent parameters. For example, if request '2' is referencing request '1' and in the "body" or in "relativeUrl" of request '2', there is a dependent parameter (which will look like "$.parameter_name"), then Batch API will internally substitute this dependent parameter from the response body of request '1'. - - Batch API is able to handle deeply nested dependent requests as well nested parameters. As shown in the example, requests are dependent on each other as, 1<--2<--6, i.e a nested dependency, where request '6' is not directly dependent on request '1' but still it is one of the nested child of request '1'. In the same way Batch API could handle a deeply nested dependent value, such as {..[..{..,$.parameter_name,..}..]}.""") +@Tag(name = "Batch API", description = "The Apache Fineract Batch API enables a consumer to access significant amounts of data in a single call or to make changes to several objects at once. Batching allows a consumer to pass instructions for several operations in a single HTTP request. A consumer can also specify dependencies between related operations. Once all operations have been completed, a consolidated response will be passed back and the HTTP connection will be closed.\n" + + "\n" + + "The Batch API takes in an array of logical HTTP requests represented as JSON arrays - each request has a requestId (the id of a request used to specify the sequence and as a dependency between requests), a method (corresponding to HTTP method GET/PUT/POST/DELETE etc.), a relativeUrl (the portion of the URL after https://example.org/api/v2/), optional headers array (corresponding to HTTP headers), optional reference parameter if a request is dependent on another request and an optional body (for POST and PUT requests). The Batch API returns an array of logical HTTP responses represented as JSON arrays - each response has a requestId, a status code, an optional headers array and an optional body (which is a JSON encoded string).\n" + + "\n" + + "Batch API uses Json Path to handle dependent parameters. For example, if request '2' is referencing request '1' and in the \"body\" or in \"relativeUrl\" of request '2', there is a dependent parameter (which will look like \"$.parameter_name\"), then Batch API will internally substitute this dependent parameter from the response body of request '1'.\n" + + "\n" + + "Batch API is able to handle deeply nested dependent requests as well nested parameters. As shown in the example, requests are dependent on each other as, 1<--2<--6, i.e a nested dependency, where request '6' is not directly dependent on request '1' but still it is one of the nested child of request '1'. In the same way Batch API could handle a deeply nested dependent value, such as {..[..{..,$.parameter_name,..}..]}.") @RequiredArgsConstructor public class BatchApiResource { @@ -88,12 +88,12 @@ public class BatchApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Batch requests in a single transaction", description = """ - The Apache Fineract Batch API is also capable of executing all the requests in a single transaction, by setting a Query Parameter, "enclosingTransaction=true". So, if one or more of the requests in a batch returns an erroneous response all of the Data base transactions made by other successful requests will be rolled back. - - If there has been a rollback in a transaction then a single response will be provided, with a '400' status code and a body consisting of the error details of the first failed request.""") + @Operation(summary = "Batch requests in a single transaction", description = "The Apache Fineract Batch API is also capable of executing all the requests in a single transaction, by setting a Query Parameter, \"enclosingTransaction=true\". So, if one or more of the requests in a batch returns an erroneous response all of the Data base transactions made by other successful requests will be rolled back.\n" + + "\n" + + "If there has been a rollback in a transaction then a single response will be provided, with a '400' status code and a body consisting of the error details of the first failed request.") @RequestBody(required = true, content = @Content(array = @ArraySchema(schema = @Schema(implementation = BatchRequest.class, description = "request body")))) - @ApiResponse(responseCode = "200", description = "Success", content = @Content(array = @ArraySchema(schema = @Schema(implementation = BatchResponse.class)))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "Success", content = @Content(array = @ArraySchema(schema = @Schema(implementation = BatchResponse.class)))) }) public List handleBatchRequests( @DefaultValue("false") @QueryParam("enclosingTransaction") @Parameter(description = "enclosingTransaction", required = false) final boolean enclosingTransaction, @Parameter(hidden = true) List requestList, @Context UriInfo uriInfo) { diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/serialization/BatchRequestJsonHelper.java b/fineract-core/src/main/java/org/apache/fineract/batch/serialization/BatchRequestJsonHelper.java index 0b73d2b5dcc..42071bb0f1f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/serialization/BatchRequestJsonHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/serialization/BatchRequestJsonHelper.java @@ -45,6 +45,7 @@ public class BatchRequestJsonHelper extends FromJsonHelper { */ public List extractList(final String json) { final Type listType = new TypeToken>() {}.getType(); - return super.getGsonConverter().fromJson(json, listType); + final List requests = super.getGsonConverter().fromJson(json, listType); + return requests; } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/GlobalEntityType.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/GlobalEntityType.java index 5476e0cf67b..00b26f810ba 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/GlobalEntityType.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/GlobalEntityType.java @@ -20,9 +20,7 @@ import java.util.HashMap; import java.util.Map; -import lombok.Getter; -@Getter public enum GlobalEntityType { INVALID(0, "invalid"), // @@ -93,17 +91,27 @@ public enum GlobalEntityType { this.code = code; } + public Integer getValue() { + return this.value; + } + + public String getCode() { + return this.code; + } + public static GlobalEntityType fromInt(final int i) { - return intToEnumMap.get(i); + final GlobalEntityType entityType = intToEnumMap.get(Integer.valueOf(i)); + return entityType; } public static GlobalEntityType fromCode(final String key) { - return stringToEnumMap.get(key); + final GlobalEntityType entityType = stringToEnumMap.get(key); + return entityType; } @Override public String toString() { - return name(); + return name().toString(); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/mapper/BusinessDateMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/mapper/BusinessDateMapper.java index 4f39c4b470a..9e678f0c9a3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/mapper/BusinessDateMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/mapper/BusinessDateMapper.java @@ -27,12 +27,12 @@ import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.mapstruct.Mapper; import org.mapstruct.Mapping; +import org.mapstruct.Mappings; @Mapper(config = MapstructMapperConfig.class) public interface BusinessDateMapper { - @Mapping(target = "description", source = "type.description") - @Mapping(target = "changes", ignore = true) + @Mappings({ @Mapping(target = "description", source = "type.description"), @Mapping(target = "changes", ignore = true) }) BusinessDateDTO mapEntity(BusinessDate source); List mapEntity(List sources); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableWithUTCDateTimeCustom.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableWithUTCDateTimeCustom.java index 7aa1315e28c..1107fdbf82a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableWithUTCDateTimeCustom.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableWithUTCDateTimeCustom.java @@ -53,19 +53,19 @@ public abstract class AbstractAuditableWithUTCDateTimeCustom implemen @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Getter + @Getter(onMethod_ = @Override) private T id; @Transient @Setter(value = AccessLevel.NONE) - @Getter + @Getter(onMethod_ = @Override) private boolean isNew = true; @PrePersist diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepositoryWrapper.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepositoryWrapper.java index a9697be7e7a..94303ad843c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepositoryWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepositoryWrapper.java @@ -50,7 +50,10 @@ public ApplicationCurrency findOneWithNotFoundDetection(final MonetaryCurrency c throw new CurrencyNotFoundException(currency.getCode()); } - return ApplicationCurrency.from(defaultApplicationCurrency, currency.getDigitsAfterDecimal(), currency.getInMultiplesOf()); + final ApplicationCurrency applicationCurrency = ApplicationCurrency.from(defaultApplicationCurrency, + currency.getDigitsAfterDecimal(), currency.getInMultiplesOf()); + + return applicationCurrency; } /** diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/domain/AccountType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/domain/AccountType.java index a8f8c62b576..74b20645617 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/domain/AccountType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/domain/AccountType.java @@ -44,14 +44,26 @@ public enum AccountType { } public static AccountType fromInt(final Integer accountTypeValue) { - return switch (accountTypeValue) { - case 1 -> AccountType.INDIVIDUAL; - case 2 -> AccountType.GROUP; - case 3 -> AccountType.JLG; - case 4 -> AccountType.GLIM; - case 5 -> AccountType.GSIM; - default -> AccountType.INVALID; - }; + + AccountType enumeration = AccountType.INVALID; + switch (accountTypeValue) { + case 1: + enumeration = AccountType.INDIVIDUAL; + break; + case 2: + enumeration = AccountType.GROUP; + break; + case 3: + enumeration = AccountType.JLG; + break; + case 4: + enumeration = AccountType.GLIM; + break; + case 5: + enumeration = AccountType.GSIM; + break; + } + return enumeration; } public static AccountType fromName(final String name) { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/AnnualCompoundingPeriod.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/AnnualCompoundingPeriod.java index 58951b8dcd8..45ce4b6e0fa 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/AnnualCompoundingPeriod.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/AnnualCompoundingPeriod.java @@ -72,7 +72,7 @@ private BigDecimal calculateUsingAverageDailyBalanceMethod(final BigDecimal inte final BigDecimal minOverdraftForInterestCalculation) { BigDecimal cumulativeBalance = BigDecimal.ZERO; - Integer numberOfDays = 0; + Integer numberOfDays = Integer.valueOf(0); for (final EndOfDayBalance balance : this.endOfDayBalances) { final BigDecimal endOfDayCumulativeBalance = balance.cumulativeBalance(interestToCompound); @@ -126,10 +126,28 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); break; - case MONTHLY, ANNUAL, BI_ANNUAL, QUATERLY: + case MONTHLY: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); break; + case QUATERLY: + interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, + minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); + break; + // case WEEKLY: + // break; + // case BIWEEKLY: + // break; + case BI_ANNUAL: + interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, + minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); + break; + case ANNUAL: + interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, + minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); + break; + // case NO_COMPOUNDING_SIMPLE_INTEREST: + // break; case INVALID: break; } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxComponentData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxComponentData.java index e7dbaedc031..11450ff3331 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxComponentData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxComponentData.java @@ -49,25 +49,25 @@ public final class TaxComponentData implements Serializable { private final Collection glAccountTypeOptions; public static TaxComponentData instance(final Long id, final String name, final BigDecimal percentage, - final EnumOptionData debitAccountType, final GLAccountData debitAccount, final EnumOptionData creditAccountType, - final GLAccountData creditAccount, final LocalDate startDate, final Collection taxComponentHistories) { + final EnumOptionData debitAccountType, final GLAccountData debitAcount, final EnumOptionData creditAccountType, + final GLAccountData creditAcount, final LocalDate startDate, final Collection taxComponentHistories) { final Map> glAccountOptions = null; final Collection glAccountTypeOptions = null; - return new TaxComponentData(id, name, percentage, debitAccountType, debitAccount, creditAccountType, creditAccount, startDate, + return new TaxComponentData(id, name, percentage, debitAccountType, debitAcount, creditAccountType, creditAcount, startDate, taxComponentHistories, glAccountOptions, glAccountTypeOptions); } public static TaxComponentData lookup(final Long id, final String name) { final BigDecimal percentage = null; final EnumOptionData debitAccountType = null; - final GLAccountData debitAccount = null; + final GLAccountData debitAcount = null; final EnumOptionData creditAccountType = null; - final GLAccountData creditAccount = null; + final GLAccountData creditAcount = null; final LocalDate startDate = null; final Collection taxComponentHistories = null; final Map> glAccountOptions = null; final Collection glAccountTypeOptions = null; - return new TaxComponentData(id, name, percentage, debitAccountType, debitAccount, creditAccountType, creditAccount, startDate, + return new TaxComponentData(id, name, percentage, debitAccountType, debitAcount, creditAccountType, creditAcount, startDate, taxComponentHistories, glAccountOptions, glAccountTypeOptions); } @@ -77,24 +77,24 @@ public static TaxComponentData template(final Map> g final String name = null; final BigDecimal percentage = null; final EnumOptionData debitAccountType = null; - final GLAccountData debitAccount = null; + final GLAccountData debitAcount = null; final EnumOptionData creditAccountType = null; - final GLAccountData creditAccount = null; + final GLAccountData creditAcount = null; final LocalDate startDate = null; final Collection taxComponentHistories = null; - return new TaxComponentData(id, name, percentage, debitAccountType, debitAccount, creditAccountType, creditAccount, startDate, + return new TaxComponentData(id, name, percentage, debitAccountType, debitAcount, creditAccountType, creditAcount, startDate, taxComponentHistories, glAccountOptions, glAccountTypeOptions); } - private TaxComponentData(final Long id, final BigDecimal percentage, final GLAccountData debitAccount, - final GLAccountData creditAccount) { + private TaxComponentData(final Long id, final BigDecimal percentage, final GLAccountData debitAcount, + final GLAccountData creditAcount) { this.id = id; this.percentage = percentage; this.name = null; this.debitAccountType = null; - this.debitAccount = debitAccount; + this.debitAccount = debitAcount; this.creditAccountType = null; - this.creditAccount = creditAccount; + this.creditAccount = creditAcount; this.startDate = null; this.taxComponentHistories = null; this.glAccountOptions = null; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxComponentRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxComponentRequest.java index 1af6b2f0a4f..4dfc8e35576 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxComponentRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxComponentRequest.java @@ -40,7 +40,7 @@ public class TaxComponentRequest implements Serializable { private Integer debitAccountType; private Long debitAccountId; private Integer creditAccountType; - private Long creditAccountId; + private Long creditAcountId; private String startDate; private String dateFormat; private String locale; diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/data/AppUserData.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/data/AppUserData.java index ed5d6cec16c..6538af46d02 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/data/AppUserData.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/data/AppUserData.java @@ -20,10 +20,7 @@ import java.util.Collection; import java.util.List; -import java.util.Objects; import java.util.Set; -import lombok.Getter; -import lombok.Setter; import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.organisation.staff.data.StaffData; import org.apache.fineract.portfolio.client.data.ClientData; @@ -46,7 +43,6 @@ public final class AppUserData { private List roles; private Boolean sendPasswordToEmail; private Long staffId; - @Getter private transient Integer rowIndex; @SuppressWarnings("unused") @@ -57,7 +53,6 @@ public final class AppUserData { private final StaffData staff; private final Boolean isSelfServiceUser; - @Setter @SuppressWarnings("unused") private Set clients; @@ -90,6 +85,10 @@ private AppUserData(Long officeId, Long staffId, String username, String firstna this.clients = null; } + public Integer getRowIndex() { + return rowIndex; + } + public static AppUserData template(final AppUserData user, final Collection officesForDropdown) { return new AppUserData(user.id, user.username, user.email, user.officeId, user.officeName, user.firstname, user.lastname, user.availableRoles, user.selfServiceRoles, user.selectedRoles, officesForDropdown, user.staff, user.passwordNeverExpires, @@ -147,11 +146,17 @@ public boolean equals(Object o) { if (this == o) { return true; } - if (!(o instanceof AppUserData that)) { + if (o == null || !(o instanceof AppUserData)) { + return false; + } + + AppUserData that = (AppUserData) o; + + if (id != null ? !id.equals(that.id) : that.id != null) { return false; } - return Objects.equals(id, that.id); + return true; } @Override @@ -159,8 +164,12 @@ public int hashCode() { return id != null ? id.hashCode() : 0; } + public void setClients(Set clients) { + this.clients = clients; + } + public boolean isSelfServiceUser() { - return this.isSelfServiceUser != null && this.isSelfServiceUser; + return this.isSelfServiceUser == null ? false : this.isSelfServiceUser; } } diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/AppUserClientMapping.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/AppUserClientMapping.java index ef9a1c8cc3a..2215f58d9ee 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/AppUserClientMapping.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/AppUserClientMapping.java @@ -72,7 +72,7 @@ public boolean equals(Object obj) { AppUserClientMapping that = (AppUserClientMapping) obj; - return null != this.client.getId() && this.client.getId().equals(that.client.getId()); + return null == this.client.getId() ? false : this.client.getId().equals(that.client.getId()); } @Override diff --git a/fineract-doc/src/docs/en/chapters/features/re-ageing.adoc b/fineract-doc/src/docs/en/chapters/features/re-ageing.adoc index 110b61ecdb4..1b0bc776cdb 100644 --- a/fineract-doc/src/docs/en/chapters/features/re-ageing.adoc +++ b/fineract-doc/src/docs/en/chapters/features/re-ageing.adoc @@ -1,4 +1,9 @@ = Loan Re-Aging +:doctype: book +:icons: font +:toc: left +:toclevels: 3 +:sectnums: == Overview diff --git a/fineract-doc/src/docs/en/chapters/release/process-step01.adoc b/fineract-doc/src/docs/en/chapters/release/process-step01.adoc index b1c935dd279..b847af602b7 100644 --- a/fineract-doc/src/docs/en/chapters/release/process-step01.adoc +++ b/fineract-doc/src/docs/en/chapters/release/process-step01.adoc @@ -4,8 +4,6 @@ The RM should, if one doesn't already exist, first create a new release umbrella issue in JIRA. This issue is dedicated to tracking (a summary of) any discussion related to the planned new release. An example of such an issue is https://issues.apache.org/jira/browse/FINERACT-873[FINERACT-873]. -Next, the RM logs in to https://release-test.apache.org[the ATR (ASF Trusted Releases)] tool and clicks "+ Start a new release", naming the release `{revnumber}`. - The RM then creates a list of resolved issues & features through an initial check in JIRA for already resolved issues for the release, and then setup a timeline for release branch point. The time for the day the issue list is created to the release branch point must be at least two weeks in order to give the community a chance to prioritize and commit any last minute features and issues they would like to see in the upcoming release. The RM must then send the pointer to the umbrella issue along with the tentative timeline for branch point to the developer lists. Any work identified as release related that needs to be completed should be added as a sub tasks of the umbrella issue to allow all developers and users to see the overall release progress in one place. The umbrella issue shall also link to any issues still requiring clarification whether or not they will make it into the release. diff --git a/fineract-doc/src/docs/en/chapters/release/process-step03.adoc b/fineract-doc/src/docs/en/chapters/release/process-step03.adoc index 1db633dd92d..48e39e5e938 100644 --- a/fineract-doc/src/docs/en/chapters/release/process-step03.adoc +++ b/fineract-doc/src/docs/en/chapters/release/process-step03.adoc @@ -36,7 +36,7 @@ git checkout -b release/{revnumber} git push origin release/{revnumber} ---- -5. Start new release notes page under https://cwiki.apache.org/confluence/display/FINERACT/Fineract+Releases[Fineract Releases]. The change list can be swiped from the JIRA release note tool (use the "text" format for the change log). See JIRA Cleanup above to ensure that the release notes generated by this tool are what you are expecting. +5. Add new release notes in Release Folders. The change list can be swiped from the JIRA release note tool (use the "text" format for the change log). See JIRA Cleanup above to ensure that the release notes generated by this tool are what you are expecting. 6. Send en email announcing the new release branch on the earlier email thread + diff --git a/fineract-doc/src/docs/en/chapters/release/process-step08.adoc b/fineract-doc/src/docs/en/chapters/release/process-step08.adoc index 41cddef413e..f97ba4fecc8 100644 --- a/fineract-doc/src/docs/en/chapters/release/process-step08.adoc +++ b/fineract-doc/src/docs/en/chapters/release/process-step08.adoc @@ -11,27 +11,19 @@ Next we'll stage the release candidate. Create a new folder and add these files: * apache-fineract-src-{revnumber}.tar.gz.sha512 * apache-fineract-src-{revnumber}.tar.gz.asc -These files (or "artifacts") comprise the release candidate. - -First, upload these files to https://release-test.apache.org/compose/fineract/{revnumber}. This tool will initiate automated checks on the files. We'll come back to those in next step and ensure they pass. - -Next, upload these files to https://www.apache.org/legal/release-policy.html#stage[ASF's distribution dev/staging area] like so: +These files (or "artifacts") comprise the release candidate. Upload these files to https://www.apache.org/legal/release-policy.html#stage[ASF's distribution dev/staging area] like so: [source,bash,subs="attributes+"] ---- # this is a remote operation -svn mkdir -m "Create Fineract {revnumber} staging area πŸ—οΈ" \ - https://dist.apache.org/repos/dist/dev/fineract/{revnumber} - +svn mkdir https://dist.apache.org/repos/dist/dev/fineract/{revnumber} # create local svn-tracked folder "{revnumber}" svn checkout https://dist.apache.org/repos/dist/dev/fineract/{revnumber} - # prepare to upload cp path/to/new/folder/* {revnumber}/ cd {revnumber}/ - # actual upload occurs here -svn add * && svn commit -m "Stage Fineract {revnumber} 🎭" +svn add * && svn commit ---- NOTE: You will need your ASF Committer credentials to be able to access the Subversion host at `dist.apache.org`. @@ -44,4 +36,4 @@ NOTE: You will need your ASF Committer credentials to be able to access the Subv ./gradlew fineractReleaseStep8 -Pfineract.release.version={revnumber} ---- -CAUTION: Gradle task 8 is inefficient. We recommend `svn mkdir` and other manual steps above. +CAUTION: This task is inefficient. Follow `svn mkdir` and other manual steps above. diff --git a/fineract-doc/src/docs/en/chapters/release/process-step09.adoc b/fineract-doc/src/docs/en/chapters/release/process-step09.adoc index bf06e40e51a..c0d177646f7 100644 --- a/fineract-doc/src/docs/en/chapters/release/process-step09.adoc +++ b/fineract-doc/src/docs/en/chapters/release/process-step09.adoc @@ -2,9 +2,9 @@ == Description -Following are the typical things we need to verify before voting on a release candidate. And the release manager should verify them too before calling out a vote. Some of these checks are duplicated by https://release-test.apache.org[the ATR (ASF Trusted Releases) tool], and will need to continue to be duplicated until we get more comfortable with that tool. +Following are the typical things we need to verify before voting on a release candidate. And the release manager should verify them too before calling out a vote. -Make sure release artifacts are hosted at both https://release-test.apache.org/compose/fineract/{revnumber} AND https://dist.apache.org/repos/dist/dev/fineract +Make sure release artifacts are hosted at https://dist.apache.org/repos/dist/dev/fineract * Release candidate files should match filenames mentioned earlier, and will be moved without renaming if/when the release vote passes. * Verify signatures and hashes. You may have to import the public key of the release manager to verify the signatures. (`gpg --import KEYS` or `gpg --recv-key `) @@ -14,7 +14,6 @@ Make sure release artifacts are hosted at both https://release-test.apache.org/c * All files have correct headers (Rat check should be clean - `./gradlew rat`) * No jar files in the source artifacts * All tests pass both in CI and locally -* All ATR checks pass === Artifact verification diff --git a/fineract-doc/src/docs/en/chapters/release/process-step10.adoc b/fineract-doc/src/docs/en/chapters/release/process-step10.adoc index c3c081ae257..5a1a82a70d9 100644 --- a/fineract-doc/src/docs/en/chapters/release/process-step10.adoc +++ b/fineract-doc/src/docs/en/chapters/release/process-step10.adoc @@ -2,14 +2,19 @@ == Description -Initiate voting with https://release-test.apache.org[the ATR (ASF Trusted Releases) tool]. +Voting has to be done on dev@fineract.apache.org. You can close the vote after voting period expires (72 hours) and you accumulate sufficient votes (minimum 3 x +1 PMC votes). + +[source,text] +---- +include::{rootdir}/buildSrc/src/main/resources/email/release.step10.vote.subject.ftl[lines=21..] + +include::{rootdir}/buildSrc/src/main/resources/email/release.step10.vote.message.ftl[lines=21..] +---- == Gradle Task .Command [source,bash,subs="attributes+,+macros"] ---- -./gradlew fineractReleaseStep10 +./gradlew fineractReleaseStep10 -Pfineract.release.version={revnumber} ---- - -NOTE: Use the ATR for this task. diff --git a/fineract-doc/src/docs/en/chapters/release/process-step11.adoc b/fineract-doc/src/docs/en/chapters/release/process-step11.adoc index 81719e602fa..62aab040eda 100644 --- a/fineract-doc/src/docs/en/chapters/release/process-step11.adoc +++ b/fineract-doc/src/docs/en/chapters/release/process-step11.adoc @@ -2,14 +2,19 @@ == Description -Conclude voting with https://release-test.apache.org[the ATR (ASF Trusted Releases) tool]. +Upon receiving 3 x +1 from the PMC, or after 72 hours (whichever one comes first), reply to the voting thread and add the prefix "[RESULT]" to the subject line with the results, as follows: + +[source,text] +---- +include::{rootdir}/buildSrc/src/main/resources/email/release.step11.vote.subject.ftl[lines=21..] + +include::{rootdir}/buildSrc/src/main/resources/email/release.step11.vote.message.ftl[lines=21..] +---- == Gradle Task .Command [source,text,subs="attributes+,+macros"] ---- -./gradlew fineractReleaseStep11 +./gradlew fineractReleaseStep11 -Pfineract.release.version={revnumber} ---- - -NOTE: Use the ATR for this task. diff --git a/fineract-doc/src/docs/en/chapters/release/process-step12.adoc b/fineract-doc/src/docs/en/chapters/release/process-step12.adoc index b479539a363..0bcc44bddd5 100644 --- a/fineract-doc/src/docs/en/chapters/release/process-step12.adoc +++ b/fineract-doc/src/docs/en/chapters/release/process-step12.adoc @@ -6,10 +6,7 @@ Move the release candidate from the dev area to the release area using a Subvers [source,bash,subs="attributes+"] ---- -# this is a remote operation -svn mv -m "Release Fineract {revnumber} 🚒" \ - https://dist.apache.org/repos/dist/dev/fineract/{revnumber} \ - https://dist.apache.org/repos/dist/release/fineract/ +svn mv https://dist.apache.org/repos/dist/dev/fineract/{revnumber} https://dist.apache.org/repos/dist/release/fineract/ ---- NOTE: https://www.apache.org/legal/release-policy.html#upload-ci[This must be done by a Fineract PMC member]. diff --git a/fineract-doc/src/docs/en/chapters/release/process-step15.adoc b/fineract-doc/src/docs/en/chapters/release/process-step15.adoc index 842f1ee04b1..4f199a9b033 100644 --- a/fineract-doc/src/docs/en/chapters/release/process-step15.adoc +++ b/fineract-doc/src/docs/en/chapters/release/process-step15.adoc @@ -2,25 +2,19 @@ == Description -Manually draft an email using your Apache ID. This works best if you use plain text since the Apache announcements list rejects HTML. Use `format=flowed` for readability, following instructions at https://useplaintext.email. Follow a https://lists.apache.org/thread/0xrtf2tgbcgczx1w6rlt9lxqvx68bfg3[recent example], substituting: +Send an email to `announce@apache.org` (sender address must be `@apache.org`): -**** -* [ ] version number in subject -* [ ] version number in intro paragraph -* [ ] number of issues addressed (get this number from the release page on confluence -- the github release page includes unresolved issues since issues can span multiple PRs) -* [ ] version number in release page link -* [ ] version number (aka git tag) in link to "Contributors, changelog, and pull requests" (github release page) -* [ ] use your own email signature, or omit the email signature altogether -**** +[source,text] +---- +include::{rootdir}/buildSrc/src/main/resources/email/release.step15.announce.subject.ftl[lines=21..] -Send the email to dev@fineract.apache.org and announce@apache.org. +include::{rootdir}/buildSrc/src/main/resources/email/release.step15.announce.message.ftl[lines=21..] +---- == Gradle Task .Command [source,bash,subs="attributes+,+macros"] ---- -./gradlew fineractReleaseStep15 +./gradlew fineractReleaseStep15 -Pfineract.release.version={revnumber} ---- - -NOTE: Do this task manually. diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformServiceJpaRepositoryImpl.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformServiceJpaRepositoryImpl.java index 0ae4f599807..e87575d6584 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformServiceJpaRepositoryImpl.java @@ -101,7 +101,9 @@ public Long createInternalDocument(final String entityType, final Long entityId, final DocumentCommand documentCommand = new DocumentCommand(null, null, entityType, entityId, name, fileName, fileSize, mimeType, description, null); - return createDocument(documentCommand, inputStream); + final Long documentId = createDocument(documentCommand, inputStream); + + return documentId; } @@ -194,7 +196,7 @@ public enum DocumentManagementEntity { @Override public String toString() { - return name().toLowerCase(); + return name().toString().toLowerCase(); } } } diff --git a/fineract-e2e-tests-core/build.gradle b/fineract-e2e-tests-core/build.gradle index d4cb2af8f43..d04d71ae12d 100644 --- a/fineract-e2e-tests-core/build.gradle +++ b/fineract-e2e-tests-core/build.gradle @@ -90,8 +90,8 @@ dependencies { testCompileOnly 'org.projectlombok:lombok:1.18.36' testAnnotationProcessor 'org.projectlombok:lombok:1.18.36' - testImplementation "ch.qos.logback:logback-core:1.5.19" - testImplementation "ch.qos.logback:logback-classic:1.5.19" + testImplementation "ch.qos.logback:logback-core:1.5.17" + testImplementation "ch.qos.logback:logback-classic:1.5.17" testImplementation 'org.apache.activemq:activemq-client:6.1.6' testImplementation "org.apache.avro:avro:1.12.0" diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/api/FineractClientConfiguration.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/api/FineractClientConfiguration.java index 13dc80b0f3c..b690df76a40 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/api/FineractClientConfiguration.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/api/FineractClientConfiguration.java @@ -42,8 +42,9 @@ public FineractFeignClient fineractFeignClient() { String apiBaseUrl = baseUrl + "/fineract-provider/api/"; boolean debugEnabled = Boolean.parseBoolean(System.getProperty("fineract.feign.debug", "false")); - return FineractFeignClient.builder().baseUrl(apiBaseUrl).credentials(username, password).tenantId(tenantId) + FineractFeignClient client = FineractFeignClient.builder().baseUrl(apiBaseUrl).credentials(username, password).tenantId(tenantId) .disableSslVerification(true).debug(debugEnabled).connectTimeout(60, TimeUnit.SECONDS) .readTimeout((int) readTimeout, TimeUnit.SECONDS).build(); + return client; } } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanRescheduleErrorMessage.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanRescheduleErrorMessage.java index 67da5f51258..f14725ce58b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanRescheduleErrorMessage.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanRescheduleErrorMessage.java @@ -22,8 +22,6 @@ public enum LoanRescheduleErrorMessage { LOAN_CHARGED_OFF("Loan: %s reschedule installment is not allowed. Loan Account is Charged-off"), // LOAN_RESCHEDULE_DATE_NOT_IN_FUTURE("Loan Reschedule From date (%s) for Loan: %s should be in the future."), // - LOAN_RESCHEDULE_FROM_DATE_INSTALLMENT_NOT_FOUND( - "Validation errors: [rescheduleFromDate] Failed data validation due to: repayment.schedule.installment.does.not.exist."), // LOAN_LOCKED_BY_COB("Loan is locked by the COB job. Loan ID: %s"), // LOAN_RESCHEDULE_NOT_ALLOWED_FROM_ZERO_TO_NEW_INTEREST_RATE("Failed data validation due to: newInterestRate."), // LOAN_RESCHEDULE_NOT_ALLOWED_FROM_CURRENT_INTEREST_RATE_TO_ZERO("The parameter `newInterestRate` must be greater than 0."), // diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java index 4c722d04e6c..4e1101bedc6 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/DefaultLoanProduct.java @@ -179,7 +179,6 @@ public enum DefaultLoanProduct implements LoanProduct { LP1_INTEREST_FLAT_DAILY_RECALCULATION_SAR_MULTIDISB_EXPECT_TRANCHES, // LP1_INTEREST_FLAT_DAILY_ACTUAL_ACTUAL_MULTIDISB_EXPECT_TRANCHES, // LP2_ADV_PYMNT_360_30_ZERO_INTEREST_CHARGE_OFF_ACCRUAL_ACTIVITY, // - LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_PRINCIPAL_FIRST, // ; @Override diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java index 1ded7c3a04d..bc7e295b603 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java @@ -198,7 +198,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1() { .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// @@ -308,7 +308,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1InterestFlat() { .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true)) - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// @@ -416,7 +416,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP1InterestDeclining() .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true)) - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// @@ -704,7 +704,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2InterestDailyRecalcu .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .allowVariableInstallments(false)// .amortizationType(AMORTIZATION_TYPE)// .canDefineInstallmentAmount(true)// @@ -865,7 +865,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2() { .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// @@ -978,7 +978,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2InterestFlat() { .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true)) - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// @@ -1089,7 +1089,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2Emi() { .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// @@ -1219,7 +1219,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2EmiWithChargeOff() { .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// @@ -1337,7 +1337,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2ChargeOffReasonToExp .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// @@ -1471,7 +1471,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2EmiCashAccounting() .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// @@ -1576,7 +1576,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2CapitalizedIncome() .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// @@ -1714,7 +1714,7 @@ public PostLoanProductsRequest defaultLoanProductsRequestLP2BuyDownFees() { .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/ErrorMessageHelper.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/ErrorMessageHelper.java index 9f7c98478f9..fb89bbdad9b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/ErrorMessageHelper.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/ErrorMessageHelper.java @@ -966,20 +966,4 @@ public static String reAgeChargedOffLoanFailure() { public static String reAgeContractTerminatedLoanFailure() { return "Loan re-aging is not allowed on contract terminated loan."; } - - public static String reAgeClosedLoanFailure() { - return "Loan reaging can only be done on active loans"; - } - - public static String reAmortizeChargedOffLoanFailure() { - return "Loan re-amortization is not allowed on charged-off loan."; - } - - public static String reAmortizeContractTerminatedLoanFailure() { - return "Loan re-amortization is not allowed on contract terminated loan."; - } - - public static String reAmortizeClosedLoanFailure() { - return "Loan re-amortization can only be done on active loans"; - } } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java index 09fa976f5fd..f6aebcc9f46 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java @@ -122,7 +122,7 @@ public void initialize() throws Exception { String name4 = DefaultLoanProduct.LP1_INTEREST_DECLINING_BALANCE_PERIOD_DAILY.getName(); PostLoanProductsRequest loanProductsRequestInterestDecliningPeriodDaily = loanProductsRequestFactory .defaultLoanProductsRequestLP1InterestDeclining().name(name4) - .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value).allowPartialPeriodInterestCalculation(false); + .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value).allowPartialPeriodInterestCalcualtion(false); PostLoanProductsResponse responseInterestDecliningPeriodDaily = createLoanProductIdempotent( loanProductsRequestInterestDecliningPeriodDaily); TestContext.INSTANCE.set(TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_INTEREST_DECLINING_PERIOD_DAILY, @@ -209,7 +209,7 @@ public void initialize() throws Exception { .recalculationRestFrequencyType(RecalculationRestFrequencyType.SAME_AS_REPAYMENT.value)// .multiDisburseLoan(true)// .disallowExpectedDisbursements(true)// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0);// PostLoanProductsResponse responseInterestDecliningBalanceSaRRecalculationSameAsRepaymentCompoundingNoneMultiDisbursement = createLoanProductIdempotent( @@ -686,7 +686,7 @@ public void initialize() throws Exception { .name(name33)// .enableAccrualActivityPosting(true)// .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value)// - .allowPartialPeriodInterestCalculation(false);// + .allowPartialPeriodInterestCalcualtion(false);// PostLoanProductsResponse responseInterestDecliningPeriodDailyAccrualActivity = createLoanProductIdempotent( loanProductsRequestInterestDecliningPeriodDailyAccrualActivity); TestContext.INSTANCE.set(TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_INTEREST_DECLINING_PERIOD_DAILY_ACCRUAL_ACTIVITY, @@ -701,7 +701,7 @@ public void initialize() throws Exception { .name(name34)// .enableAccrualActivityPosting(true)// .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value)// - .allowPartialPeriodInterestCalculation(false);// + .allowPartialPeriodInterestCalcualtion(false);// PostLoanProductsResponse responseLP1InterestDecliningBalanceDailyRecalculationCompoundingNoneAccrualActivity = createLoanProductIdempotent( loanProductsRequestLP1InterestDecliningBalanceDailyRecalculationCompoundingNoneAccrualActivity); TestContext.INSTANCE.set( @@ -1315,7 +1315,7 @@ public void initialize() throws Exception { .enableDownPayment(false)// .interestRecalculationCompoundingMethod(0)// .repaymentFrequencyType(REPAYMENT_FREQUENCY_TYPE_MONTHS)// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .paymentAllocation(List.of(// createPaymentAllocation("DEFAULT", "NEXT_INSTALLMENT")));// PostLoanProductsResponse responseLP2AdvancedPaymentInterestEmi36030InterestRecalculationDailyAllowPartialPeriod = createLoanProductIdempotent( @@ -1952,7 +1952,7 @@ public void initialize() throws Exception { .defaultLoanProductsRequestLP1InterestDeclining().name(name81).isInterestRecalculationEnabled(true) .preClosureInterestCalculationStrategy(1).rescheduleStrategyMethod(1).interestRecalculationCompoundingMethod(0) .recalculationRestFrequencyType(2).recalculationRestFrequencyInterval(1) - .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value).allowPartialPeriodInterestCalculation(false); + .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value).allowPartialPeriodInterestCalcualtion(false); final PostLoanProductsResponse responseInterestDecliningPeriodDailyIntRecalc = createLoanProductIdempotent( loanProductsRequestInterestDecliningPeriodDailyIntRecalc); TestContext.INSTANCE.set(TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_INTEREST_DECLINING_PERIOD_DAILY_INT_RECALC, @@ -1964,7 +1964,7 @@ public void initialize() throws Exception { final PostLoanProductsRequest loanProductsRequestInterest36030DecliningPeriodDailyIntRecalc = loanProductsRequestFactory .defaultLoanProductsRequestLP1InterestDeclining().name(name82).isInterestRecalculationEnabled(false) .daysInYearType(DaysInYearType.DAYS360.value).daysInMonthType(DaysInMonthType.DAYS30.value) - .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value).allowPartialPeriodInterestCalculation(false); + .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value).allowPartialPeriodInterestCalcualtion(false); final PostLoanProductsResponse responseInterest36030DecliningPeriodDailyIntRecalc = createLoanProductIdempotent( loanProductsRequestInterest36030DecliningPeriodDailyIntRecalc); TestContext.INSTANCE.set(TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP1_INTEREST_360_30__DECLINING_PERIOD_DAILY_INT_RECALC, @@ -3168,7 +3168,7 @@ public void initialize() throws Exception { .disbursedAmountPercentageForDownPayment(null)// .multiDisburseLoan(true)// .disallowExpectedDisbursements(true)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .paymentAllocation(List.of(// @@ -3202,7 +3202,7 @@ public void initialize() throws Exception { .disbursedAmountPercentageForDownPayment(null)// .multiDisburseLoan(true)// .disallowExpectedDisbursements(true)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .paymentAllocation(List.of(// @@ -3259,7 +3259,7 @@ public void initialize() throws Exception { .installmentAmountInMultiplesOf(null)// .multiDisburseLoan(true)// .disallowExpectedDisbursements(true)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .paymentAllocation(List.of(// @@ -3377,7 +3377,7 @@ public void initialize() throws Exception { // .interestType(INTEREST_TYPE_DECLINING_BALANCE)// .defaultLoanProductsRequestLP1() // .interestCalculationPeriodType(0)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// // .allowApprovedDisbursedAmountsOverApplied(false)// .name(name130)// .transactionProcessingStrategyCode( @@ -3419,7 +3419,7 @@ public void initialize() throws Exception { createPaymentAllocation("MERCHANT_ISSUED_REFUND", "REAMORTIZATION"), // createPaymentAllocation("PAYOUT_REFUND", "NEXT_INSTALLMENT")))// .multiDisburseLoan(true)// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .disallowExpectedDisbursements(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0);// @@ -3452,7 +3452,7 @@ public void initialize() throws Exception { createPaymentAllocation("MERCHANT_ISSUED_REFUND", "REAMORTIZATION"), // createPaymentAllocation("PAYOUT_REFUND", "NEXT_INSTALLMENT")))// .multiDisburseLoan(true)// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .disallowExpectedDisbursements(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0);// @@ -3485,7 +3485,7 @@ public void initialize() throws Exception { createPaymentAllocation("MERCHANT_ISSUED_REFUND", "REAMORTIZATION"), // createPaymentAllocation("PAYOUT_REFUND", "NEXT_INSTALLMENT")))// .multiDisburseLoan(true)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0);// @@ -3839,7 +3839,7 @@ public void initialize() throws Exception { .installmentAmountInMultiplesOf(null)// .multiDisburseLoan(true)// .disallowExpectedDisbursements(true)// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .allowApprovedDisbursedAmountsOverApplied(true)// @@ -3866,7 +3866,7 @@ public void initialize() throws Exception { .installmentAmountInMultiplesOf(null)// .multiDisburseLoan(true)// .disallowExpectedDisbursements(true)// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .allowApprovedDisbursedAmountsOverApplied(true)// @@ -3886,7 +3886,7 @@ public void initialize() throws Exception { .name(name145)// .interestType(INTEREST_TYPE_FLAT)// .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY.value)// .recalculationRestFrequencyInterval(1)// .daysInYearType(DaysInYearType.DAYS360.value)// @@ -3917,7 +3917,7 @@ public void initialize() throws Exception { .enableDownPayment(true)// .enableAutoRepaymentForDownPayment(true)// .disbursedAmountPercentageForDownPayment(new BigDecimal(25))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0);// PostLoanProductsResponse responseLoanProductsRequestInterestFlatSaRRecalculationSameAsRepaymentMultiDisbursementAUtoDownPayment = createLoanProductIdempotent( @@ -4144,7 +4144,7 @@ public void initialize() throws Exception { .name(DefaultLoanProduct.LP1_INTEREST_FLAT_DAILY_RECALCULATION_SAR_MULTIDISB_EXPECT_TRANCHES.getName())// .interestType(INTEREST_TYPE_FLAT)// .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.SAME_AS_REPAYMENT.value)// .recalculationRestFrequencyInterval(1)// .installmentAmountInMultiplesOf(null)// @@ -4181,7 +4181,7 @@ public void initialize() throws Exception { .name(DefaultLoanProduct.LP1_INTEREST_FLAT_DAILY_ACTUAL_ACTUAL_MULTIDISB_EXPECT_TRANCHES.getName())// .interestType(INTEREST_TYPE_FLAT)// .interestCalculationPeriodType(InterestCalculationPeriodTime.DAILY.value)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY.value)// .interestRecalculationCompoundingMethod(0)// .recalculationRestFrequencyInterval(1)// @@ -4229,39 +4229,6 @@ public void initialize() throws Exception { TestContext.INSTANCE.set( TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK, responseLoanProductsRequestLP2AdvancedpaymentInterestEmi36030InterestRecalcDailyMultiDisburseChargeback); - - // LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_PRINCIPAL_FIRST - // Same as LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL but with PRINCIPAL before INTEREST - // in payment allocation order - String name168 = DefaultLoanProduct.LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_PRINCIPAL_FIRST.getName(); - - PostLoanProductsRequest loanProductsRequestAdvCustomPaymentAllocationProgressiveLoanSchedulePrincipalFirst = loanProductsRequestFactory - .defaultLoanProductsRequestLP2InterestDailyRecalculation()// - .name(name168)// - .supportedInterestRefundTypes(Arrays.asList("MERCHANT_ISSUED_REFUND", "PAYOUT_REFUND"))// - .enableAccrualActivityPosting(true) // - .paymentAllocation(List.of(// - createPaymentAllocation("DEFAULT", "NEXT_INSTALLMENT", - LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PRINCIPAL, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_INTEREST, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_PENALTY, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.PAST_DUE_FEE, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PRINCIPAL, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_INTEREST, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_PENALTY, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.DUE_FEE, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PRINCIPAL, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_INTEREST, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_PENALTY, // - LoanProductPaymentAllocationRule.AllocationTypesEnum.IN_ADVANCE_FEE), // - createPaymentAllocation("GOODWILL_CREDIT", "REAMORTIZATION"), // - createPaymentAllocation("MERCHANT_ISSUED_REFUND", "LAST_INSTALLMENT"), // - createPaymentAllocation("PAYOUT_REFUND", "NEXT_INSTALLMENT")));// - PostLoanProductsResponse responseLoanProductsRequestAdvCustomPaymentAllocationProgressiveLoanSchedulePrincipalFirst = createLoanProductIdempotent( - loanProductsRequestAdvCustomPaymentAllocationProgressiveLoanSchedulePrincipalFirst); - TestContext.INSTANCE.set( - TestContextKey.DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADVANCED_CUSTOM_PAYMENT_ALLOCATION_PROGRESSIVE_LOAN_SCHEDULE_PRINCIPAL_FIRST, - responseLoanProductsRequestAdvCustomPaymentAllocationProgressiveLoanSchedulePrincipalFirst); } public static AdvancedPaymentData createPaymentAllocation(String transactionType, String futureInstallmentAllocationRule, diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/MessagingProperties.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/MessagingProperties.java index 26373ef2c62..2c121be7eda 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/MessagingProperties.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/MessagingProperties.java @@ -44,8 +44,10 @@ public class MessagingProperties implements InitializingBean { @Override public void afterPropertiesSet() throws Exception { - if (eventProperties.isEventVerificationEnabled() && (isBlank(brokerUrl) || isBlank(topicName))) { - throw new IllegalStateException("Broker and topic must be configured in case event verification is enabled"); + if (eventProperties.isEventVerificationEnabled()) { + if (isBlank(brokerUrl) || isBlank(topicName)) { + throw new IllegalStateException("Broker and topic must be configured in case event verification is enabled"); + } } } } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/assetexternalization/AssetExternalizationStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/assetexternalization/AssetExternalizationStepDef.java index f98360a89e3..10b9bb20bbe 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/assetexternalization/AssetExternalizationStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/assetexternalization/AssetExternalizationStepDef.java @@ -645,8 +645,11 @@ private ExternalTransferData getLastTransferByTransferType(Long loanId, String t PageExternalTransferData transfersResponse = externalAssetOwnersApi().getTransfers(Map.of("loanId", loanId)); List content = transfersResponse.getContent(); - return content.stream().filter(bizEvent -> bizEvent.getTransferExternalId().equals(transferExternalId)).toList().stream() - .reduce((first, second) -> second).orElseThrow(() -> new IllegalStateException("transfersResponse.getContent() is empty")); + ExternalTransferData result = content.stream().filter(bizEvent -> bizEvent.getTransferExternalId().equals(transferExternalId)) + .toList().stream().reduce((first, second) -> second) + .orElseThrow(() -> new IllegalStateException("transfersResponse.getContent() is empty")); + + return result; } @Then("The asset external owner has the following OWNER Journal entries:") diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/JournalEntriesStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/JournalEntriesStepDef.java index 41c9feb94bd..d302c86afc2 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/JournalEntriesStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/JournalEntriesStepDef.java @@ -165,7 +165,7 @@ private boolean valuesMatch(String actual, String expected) { } public List> getJournalLinesActualList(List transactionsMatch) { - return transactionsMatch.stream().map(t -> { + List> journalLinesActualList = transactionsMatch.stream().map(t -> { String transactionId = "L" + t.getId(); GetJournalEntriesTransactionIdResponse journalEntryDataResponse = null; try { @@ -179,6 +179,8 @@ public List> getJournalLinesActualList(List loanDetails.getInArrearsTolerance(); case "graceOnPrincipalPayment" -> loanDetails.getGraceOnPrincipalPayment(); case "graceOnInterestPayment" -> loanDetails.getGraceOnInterestPayment(); - case "graceOnArrearsAgeing" -> loanDetails.getGraceOnArrearsAgeing(); + case "graceOnArrearsAging" -> loanDetails.getGraceOnArrearsAgeing(); default -> throw new IllegalArgumentException("Unknown override field: " + fieldName); }; } @@ -113,7 +113,7 @@ private void applyOverrideField(final PostLoansRequest request, final String fie case "inArrearsTolerance" -> request.inArrearsTolerance(isNull ? null : new BigDecimal(value)); case "graceOnInterestPayment" -> request.graceOnInterestPayment(isNull ? null : Integer.valueOf(value)); case "graceOnPrincipalPayment" -> request.graceOnPrincipalPayment(isNull ? null : Integer.valueOf(value)); - case "graceOnArrearsAgeing" -> request.graceOnArrearsAgeing(isNull ? null : Integer.valueOf(value)); + case "graceOnArrearsAging" -> request.graceOnArrearsAgeing(isNull ? null : Integer.valueOf(value)); default -> throw new IllegalArgumentException("Unknown override field: " + fieldName); } } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAgingStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAgingStepDef.java index 145c8e12afc..c53cca5ce5e 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAgingStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAgingStepDef.java @@ -27,13 +27,17 @@ import io.cucumber.java.en.Then; import io.cucumber.java.en.When; import java.io.IOException; +import java.lang.reflect.Method; import java.math.BigDecimal; import java.math.RoundingMode; import java.time.format.DateTimeFormatter; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -68,19 +72,125 @@ public void createReAgingTransaction(DataTable table) throws IOException { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); - PostLoansLoanIdTransactionsRequest reAgingRequest = setReAgeingRequestProperties(// - LoanRequestFactory.defaultReAgingRequest(), // - table.row(0), // - table.row(1) // - ); + List> tableRows = table.asLists(); + List headers = tableRows.get(0); + List values = tableRows.get(1); + + Map rowData = new LinkedHashMap<>(); + int columnCount = Math.min(headers.size(), values.size()); + for (int i = 0; i < columnCount; i++) { + rowData.put(headers.get(i), values.get(i)); + } - PostLoansLoanIdTransactionsResponse response = ok( - () -> fineractClient.loanTransactions().executeLoanTransaction(loanId, reAgingRequest, Map.of("command", "reAge"))); + int frequencyNumber = Integer.parseInt(resolveValue(rowData, values, 0, "frequencyNumber")); + String frequencyType = resolveValue(rowData, values, 1, "frequencyType"); + String startDate = resolveValue(rowData, values, 2, "startDate"); + int numberOfInstallments = Integer.parseInt(resolveValue(rowData, values, 3, "numberOfInstallments")); + + PostLoansLoanIdTransactionsRequest reAgingRequest = LoanRequestFactory// + .defaultReAgingRequest()// + .frequencyNumber(frequencyNumber)// + .frequencyType(frequencyType)// + .startDate(startDate)// + .numberOfInstallments(numberOfInstallments);// + + applyAdditionalFields(reAgingRequest, rowData, Set.of("frequencyNumber", "frequencyType", "startDate", "numberOfInstallments")); + + PostLoansLoanIdTransactionsResponse response = ok(() -> fineractClient.loanTransactions().executeLoanTransaction(loanId, + reAgingRequest, Map.of("command", "reAge"))); testContext().set(TestContextKey.LOAN_REAGING_RESPONSE, response); } + private void applyAdditionalFields(PostLoansLoanIdTransactionsRequest request, Map rowData, Set excludedKeys) { + rowData.forEach((key, value) -> { + if (!excludedKeys.contains(key)) { + setRequestField(request, key, value); + } + }); + } + + private void setRequestField(PostLoansLoanIdTransactionsRequest request, String fieldName, String rawValue) { + if (fieldName == null || fieldName.isBlank()) { + return; + } + + try { + Method targetMethod = Arrays.stream(PostLoansLoanIdTransactionsRequest.class.getMethods()) + .filter(method -> method.getParameterCount() == 1 && method.getName().equals(fieldName)).findFirst().orElse(null); + + if (targetMethod == null) { + log.warn("No setter method found on PostLoansLoanIdTransactionsRequest for field {}", fieldName); + return; + } + + Class parameterType = targetMethod.getParameterTypes()[0]; + Object convertedValue = convertValue(rawValue, parameterType); + + if (convertedValue == null && parameterType.isPrimitive()) { + log.warn("Cannot assign null to primitive field {} on PostLoansLoanIdTransactionsRequest", fieldName); + return; + } + + targetMethod.invoke(request, convertedValue); + } catch (Exception ex) { + log.warn("Failed to set additional field {} on PostLoansLoanIdTransactionsRequest", fieldName, ex); + } + } + + private Object convertValue(String rawValue, Class targetType) { + if (rawValue == null || rawValue.isBlank()) { + return null; + } + + try { + if (String.class.equals(targetType)) { + return rawValue; + } + if (Integer.class.equals(targetType) || int.class.equals(targetType)) { + return Integer.valueOf(rawValue); + } + if (Long.class.equals(targetType) || long.class.equals(targetType)) { + return Long.valueOf(rawValue); + } + if (Double.class.equals(targetType) || double.class.equals(targetType)) { + return Double.valueOf(rawValue); + } + if (Float.class.equals(targetType) || float.class.equals(targetType)) { + return Float.valueOf(rawValue); + } + if (Short.class.equals(targetType) || short.class.equals(targetType)) { + return Short.valueOf(rawValue); + } + if (Byte.class.equals(targetType) || byte.class.equals(targetType)) { + return Byte.valueOf(rawValue); + } + if (Boolean.class.equals(targetType) || boolean.class.equals(targetType)) { + return Boolean.parseBoolean(rawValue); + } + if (BigDecimal.class.equals(targetType)) { + return new BigDecimal(rawValue); + } + } catch (NumberFormatException ex) { + log.warn("Unable to convert value '{}' to type {}. Falling back to raw string.", rawValue, targetType.getSimpleName(), ex); + return rawValue; + } + + return rawValue; + } + + private String resolveValue(Map rowData, List values, int index, String key) { + String value = rowData.get(key); + if (value != null) { + return value; + } + if (index >= 0 && index < values.size()) { + return values.get(index); + } + return null; + } + @When("Admin creates a Loan re-aging transaction by Loan external ID with the following data:") - public void createReAgingTransactionByLoanExternalId(DataTable table) { + public void createReAgingTransactionByLoanExternalId(DataTable table) throws IOException { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); String loanExternalId = loanResponse.getResourceExternalId(); @@ -91,17 +201,17 @@ public void createReAgingTransactionByLoanExternalId(DataTable table) { ); PostLoansLoanIdTransactionsResponse response = ok(() -> fineractClient.loanTransactions().executeLoanTransaction1(loanExternalId, - reAgingRequest, Map.of("command", "reAge"))); + reAgingRequest, Map.of("command", "reAge"))); testContext().set(TestContextKey.LOAN_REAGING_RESPONSE, response); } @When("Admin successfully undo Loan re-aging transaction") - public void undoReAgingTransaction() { + public void undoReAgingTransaction() throws IOException { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); PostLoansLoanIdTransactionsResponse response = ok(() -> fineractClient.loanTransactions().executeLoanTransaction(loanId, - new PostLoansLoanIdTransactionsRequest(), Map.of("command", "undoReAge"))); + new PostLoansLoanIdTransactionsRequest(), Map.of("command", "undoReAge"))); testContext().set(TestContextKey.LOAN_REAGING_UNDO_RESPONSE, response); } @@ -114,10 +224,28 @@ public void checkLoanReAmortizeBusinessEventCreated() { } @When("Admin fails to create a Loan re-aging transaction with status code {int} error {string} and with the following data:") - public void adminFailsToCreateReAgingTransactionWithError(final int statusCode, final String expectedError, final DataTable table) { - CallFailedRuntimeException exception = getCreateLoanReAgeFailureResponse(table); - assertThat(exception.getStatus()).isEqualTo(statusCode); + public void adminFailsToCreateReAgingTransactionWithError(final int statusCode, final String expectedError, final DataTable table) + throws IOException { + final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); + final long loanId = loanResponse.getLoanId(); + + final List data = table.asLists().get(1); + final int frequencyNumber = Integer.parseInt(data.get(0)); + final String frequencyType = data.get(1); + final String startDate = data.get(2); + final int numberOfInstallments = Integer.parseInt(data.get(3)); + + final PostLoansLoanIdTransactionsRequest reAgingRequest = LoanRequestFactory// + .defaultReAgingRequest()// + .frequencyNumber(frequencyNumber)// + .frequencyType(frequencyType)// + .startDate(startDate)// + .numberOfInstallments(numberOfInstallments);// + CallFailedRuntimeException exception = fail(() -> fineractClient.loanTransactions().executeLoanTransaction(loanId, reAgingRequest, + Map.of("command", "reAge"))); + + assertThat(exception.getStatus()).isEqualTo(statusCode); String developerMessage = exception.getDeveloperMessage(); if (developerMessage.contains(expectedError)) { assertThat(developerMessage).contains(expectedError); @@ -128,18 +256,45 @@ public void adminFailsToCreateReAgingTransactionWithError(final int statusCode, } @Then("Admin fails to create a Loan re-aging transaction with the following data because loan was charged-off:") - public void reAgeChargedOffLoanFailure(final DataTable table) { - checkCreateLoanReAgeFailure(table, ErrorMessageHelper.reAgeChargedOffLoanFailure()); - } + public void reAgeChargedOffLoanFailure(final DataTable table) throws IOException { + final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); + Assertions.assertNotNull(loanResponse); + final long loanId = loanResponse.getLoanId(); + + final List data = table.asLists().get(1); - @Then("Admin fails to create a Loan re-aging transaction with the following data because loan was closed:") - public void reAgeClosedLoanFailure(final DataTable table) { - checkCreateLoanReAgeFailure(table, ErrorMessageHelper.reAgeClosedLoanFailure()); + final PostLoansLoanIdTransactionsRequest reAgingRequest = LoanRequestFactory// + .defaultReAgingRequest()// + .frequencyNumber(Integer.parseInt(data.get(0)))// + .frequencyType(data.get(1))// + .startDate(data.get(2))// + .numberOfInstallments(Integer.parseInt(data.get(3)));// + + CallFailedRuntimeException exception = fail(() -> fineractClient.loanTransactions().executeLoanTransaction(loanId, reAgingRequest, + Map.of("command", "reAge"))); + assertThat(exception.getStatus()).as(ErrorMessageHelper.dateFailureErrorCodeMsg()).isEqualTo(403); + assertThat(exception.getDeveloperMessage()).contains(ErrorMessageHelper.reAgeChargedOffLoanFailure()); } @Then("Admin fails to create a Loan re-aging transaction with the following data because loan was contract terminated:") - public void reAgeContractTerminatedLoanFailure(final DataTable table) { - checkCreateLoanReAgeFailure(table, ErrorMessageHelper.reAgeContractTerminatedLoanFailure()); + public void reAgeContractTerminatedLoanFailure(final DataTable table) throws IOException { + final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); + Assertions.assertNotNull(loanResponse); + final long loanId = loanResponse.getLoanId(); + + final List data = table.asLists().get(1); + + final PostLoansLoanIdTransactionsRequest reAgingRequest = LoanRequestFactory// + .defaultReAgingRequest()// + .frequencyNumber(Integer.parseInt(data.get(0)))// + .frequencyType(data.get(1))// + .startDate(data.get(2))// + .numberOfInstallments(Integer.parseInt(data.get(3)));// + + CallFailedRuntimeException exception = fail(() -> fineractClient.loanTransactions().executeLoanTransaction(loanId, reAgingRequest, + Map.of("command", "reAge"))); + assertThat(exception.getStatus()).as(ErrorMessageHelper.dateFailureErrorCodeMsg()).isEqualTo(403); + assertThat(exception.getDeveloperMessage()).contains(ErrorMessageHelper.reAgeContractTerminatedLoanFailure()); } private Map resolveReAgingQueryParams(DataTable table) { @@ -153,7 +308,7 @@ private Map resolveReAgingQueryParams(DataTable table) { } @When("Admin creates a Loan re-aging preview with the following data:") - public void createReAgingPreview(DataTable table) { + public void createReAgingPreview(DataTable table) throws IOException { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); @@ -164,7 +319,7 @@ public void createReAgingPreview(DataTable table) { log.info("Re-aging preview created for loan ID: {} with parameters: {}", loanId, queryParams); } - public LoanScheduleData reAgingPreviewByLoanExternalId(DataTable table) { + public LoanScheduleData reAgingPreviewByLoanExternalId(DataTable table) throws IOException { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); String loanExternalId = loanResponse.getResourceExternalId(); @@ -175,7 +330,7 @@ public LoanScheduleData reAgingPreviewByLoanExternalId(DataTable table) { } @When("Admin creates a Loan re-aging preview by Loan external ID with the following data:") - public void createReAgingPreviewByLoanExternalId(DataTable table) { + public void createReAgingPreviewByLoanExternalId(DataTable table) throws IOException { LoanScheduleData response = reAgingPreviewByLoanExternalId(table); testContext().set(TestContextKey.LOAN_REAGING_PREVIEW_RESPONSE, response); @@ -183,11 +338,18 @@ public void createReAgingPreviewByLoanExternalId(DataTable table) { } @Then("Admin fails to create a Loan re-aging preview with the following data because loan was charged-off:") - public void reAgePreviewChargedOffLoanFailure(final DataTable table) { + public void reAgePreviewChargedOffLoanFailure(final DataTable table) throws IOException { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); String loanExternalId = loanResponse.getResourceExternalId(); - Map queryParams = resolveReAgingQueryParams(table); + List data = table.asLists().get(1); + int frequencyNumber = Integer.parseInt(data.get(0)); + String frequencyType = data.get(1); + String startDate = data.get(2); + int numberOfInstallments = Integer.parseInt(data.get(3)); + + Map queryParams = Map.of("frequencyNumber", frequencyNumber, "frequencyType", frequencyType, "startDate", startDate, + "numberOfInstallments", numberOfInstallments, "dateFormat", DATE_FORMAT, "locale", "en"); CallFailedRuntimeException exception = fail( () -> fineractClient.loanTransactions().previewReAgeSchedule1(loanExternalId, queryParams)); @@ -196,12 +358,18 @@ public void reAgePreviewChargedOffLoanFailure(final DataTable table) { } @Then("Admin fails to create a Loan re-aging preview with the following data because loan was contract terminated:") - public void reAgePreviewContractTerminatedLoanFailure(final DataTable table) { + public void reAgePreviewContractTerminatedLoanFailure(final DataTable table) throws IOException { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); String loanExternalId = loanResponse.getResourceExternalId(); - Map queryParams = resolveReAgingQueryParams(table); + List data = table.asLists().get(1); + int frequencyNumber = Integer.parseInt(data.get(0)); + String frequencyType = data.get(1); + String startDate = data.get(2); + int numberOfInstallments = Integer.parseInt(data.get(3)); + Map queryParams = Map.of("frequencyNumber", frequencyNumber, "frequencyType", frequencyType, "startDate", startDate, + "numberOfInstallments", numberOfInstallments, "dateFormat", DATE_FORMAT, "locale", "en"); CallFailedRuntimeException exception = fail( () -> fineractClient.loanTransactions().previewReAgeSchedule1(loanExternalId, queryParams)); @@ -209,19 +377,6 @@ public void reAgePreviewContractTerminatedLoanFailure(final DataTable table) { assertThat(exception.getDeveloperMessage()).contains(ErrorMessageHelper.reAgeContractTerminatedLoanFailure()); } - @Then("Admin fails to create a Loan re-aging preview with the following data because loan was closed:") - public void reAgePreviewClosedLoanFailure(final DataTable table) throws IOException { - PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); - String loanExternalId = loanResponse.getResourceExternalId(); - - Map queryParams = resolveReAgingQueryParams(table); - CallFailedRuntimeException exception = fail( - () -> fineractClient.loanTransactions().previewReAgeSchedule1(loanExternalId, queryParams)); - - assertThat(exception.getStatus()).as(ErrorMessageHelper.dateFailureErrorCodeMsg()).isEqualTo(403); - assertThat(exception.getDeveloperMessage()).contains(ErrorMessageHelper.reAgeClosedLoanFailure()); - } - @Then("Loan Re-Aged Repayment schedule preview has {int} periods, with the following data for periods:") public void loanRepaymentSchedulePreviewPeriodsCheck(int linesExpected, DataTable table) { LoanScheduleData scheduleResponse = testContext().get(TestContextKey.LOAN_REAGING_PREVIEW_RESPONSE); @@ -390,28 +545,7 @@ public void adminCreatesALoanReAgingTransactionByLoanExternalIDWithTheFollowingD ); CallFailedRuntimeException response = fail(() -> fineractClient.loanTransactions().executeLoanTransaction1(loanExternalId, - reAgingRequest, Map.of("command", "reAge"))); + reAgingRequest, Map.of("command", "reAge"))); assertThat(response.getStatus()).isEqualTo(errorCode); } - - public CallFailedRuntimeException getCreateLoanReAgeFailureResponse(DataTable table) { - final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); - Assertions.assertNotNull(loanResponse); - final long loanId = loanResponse.getLoanId(); - - PostLoansLoanIdTransactionsRequest reAgingRequest = setReAgeingRequestProperties(// - LoanRequestFactory.defaultReAgingRequest(), // - table.row(0), // - table.row(1) // - ); - - return fail(() -> fineractClient.loanTransactions().executeLoanTransaction(loanId, reAgingRequest, Map.of("command", "reAge"))); - } - - public void checkCreateLoanReAgeFailure(DataTable table, String errorMessage) { - CallFailedRuntimeException exception = getCreateLoanReAgeFailureResponse(table); - assertThat(exception.getStatus()).as(ErrorMessageHelper.dateFailureErrorCodeMsg()).isEqualTo(403); - assertThat(exception.getDeveloperMessage()).contains(errorMessage); - } - } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAmortizationStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAmortizationStepDef.java index 833b43ff601..1b98090d816 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAmortizationStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReAmortizationStepDef.java @@ -18,7 +18,6 @@ */ package org.apache.fineract.test.stepdef.loan; -import static org.apache.fineract.client.feign.util.FeignCalls.fail; import static org.apache.fineract.client.feign.util.FeignCalls.ok; import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +34,6 @@ import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; -import org.apache.fineract.client.feign.util.CallFailedRuntimeException; import org.apache.fineract.client.models.LoanScheduleData; import org.apache.fineract.client.models.LoanSchedulePeriodData; import org.apache.fineract.client.models.PostLoansLoanIdTransactionsRequest; @@ -58,7 +56,7 @@ public class LoanReAmortizationStepDef extends AbstractStepDef { private final FineractFeignClient fineractClient; private final EventAssertion eventAssertion; - @When("Admin creates a Loan re-amortization transaction on current business date") + @When("When Admin creates a Loan re-amortization transaction on current business date") public void createLoanReAmortization() { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); @@ -83,7 +81,7 @@ public void createLoanReAmortizationWithInterestHandling(final String reAmortiza testContext().set(TestContextKey.LOAN_REAMORTIZATION_RESPONSE, response); } - @When("Admin creates a Loan re-amortization transaction on current business date by loan external ID") + @When("When Admin creates a Loan re-amortization transaction on current business date by loan external ID") public void createLoanReAmortizationByLoanExternalId() { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); String loanExternalId = loanResponse.getResourceExternalId(); @@ -95,7 +93,7 @@ public void createLoanReAmortizationByLoanExternalId() { testContext().set(TestContextKey.LOAN_REAMORTIZATION_RESPONSE, response); } - @When("Admin undo Loan re-amortization transaction on current business date") + @When("When Admin undo Loan re-amortization transaction on current business date") public void undoLoanReAmortization() { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); @@ -105,57 +103,6 @@ public void undoLoanReAmortization() { testContext().set(TestContextKey.LOAN_REAMORTIZATION_UNDO_RESPONSE, response); } - @When("Admin creates a Loan re-amortization transaction on current business date is forbidden as loan was charged-off") - public void reAmortizationChargedOffLoanFailure() { - reAmortizationFailure(ErrorMessageHelper.reAmortizeChargedOffLoanFailure()); - } - - @When("Admin creates re-amortization trn on current business date with reAmortizationInterestHandling {string} is forbidden as loan was charged-off") - public void reAmortizationWithInterestHandlingChargedOffLoanFailure(final String reAmortizationInterestHandling) { - reAmortizationInterestHandlingLoanLoanFailure(reAmortizationInterestHandling, ErrorMessageHelper.reAmortizeChargedOffLoanFailure()); - } - - @When("Admin creates a Loan re-amortization transaction on current business date is forbidden as loan was contract terminated") - public void reAmortizationContractTerminatedLoanFailure() { - reAmortizationFailure(ErrorMessageHelper.reAmortizeContractTerminatedLoanFailure()); - } - - @When("Admin creates re-amortization trn on current business date with reAmortizationInterestHandling {string} is forbidden as loan was contract terminated") - public void reAmortizationWithInterestHandlingContractTerminatedLoanFailure(final String reAmortizationInterestHandling) { - reAmortizationInterestHandlingLoanLoanFailure(reAmortizationInterestHandling, - ErrorMessageHelper.reAmortizeContractTerminatedLoanFailure()); - - } - - @When("Admin creates a Loan re-amortization transaction on current business date is forbidden as loan was closed") - public void reAmortizationClosedLoanFailure() { - reAmortizationFailure(ErrorMessageHelper.reAmortizeClosedLoanFailure()); - } - - @When("Admin creates re-amortization trn on current business date with reAmortizationInterestHandling {string} is forbidden as loan was closed") - public void reAmortizationWithInterestHandlingClosedLoanFailure(final String reAmortizationInterestHandling) { - reAmortizationInterestHandlingLoanLoanFailure(reAmortizationInterestHandling, ErrorMessageHelper.reAmortizeClosedLoanFailure()); - } - - public void reAmortizationFailure(final String errorMessage) { - reAmortizationInterestHandlingLoanLoanFailure(null, errorMessage); - } - - public void reAmortizationInterestHandlingLoanLoanFailure(final String reAmortizationInterestHandling, final String errorMessage) { - final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); - final Long loanId = loanResponse.getLoanId(); - - PostLoansLoanIdTransactionsRequest reAmortizationRequest = LoanRequestFactory.defaultLoanReAmortizationRequest(); - if (reAmortizationInterestHandling != null) { - reAmortizationRequest.reAmortizationInterestHandling(reAmortizationInterestHandling); - } - - CallFailedRuntimeException exception = fail(() -> fineractClient.loanTransactions().executeLoanTransaction(loanId, - reAmortizationRequest, Map.of("command", "reAmortize"))); - assertThat(exception.getStatus()).as(ErrorMessageHelper.dateFailureErrorCodeMsg()).isEqualTo(403); - assertThat(exception.getDeveloperMessage()).contains(errorMessage); - } - @Then("LoanReAmortizeBusinessEvent is created") public void checkLoanReAmortizeBusinessEventCreated() { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java index da78fee7fa3..6655ad79ea3 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanStepDef.java @@ -678,7 +678,7 @@ public void createFullyCustomizedLoanWithInterestRateFrequencyType(final DataTab createFullyCustomizedLoanWithInterestRateFrequency(data.get(1)); } - @When("Admin creates a fully customized loan with graceOnArrearsAgeing and following data:") + @When("Admin creates a fully customized loan with graceOnArrearsAging and following data:") public void createFullyCustomizedLoanWithGraceOnArrearsAgeing(final DataTable table) throws IOException { final List> data = table.asLists(); createFullyCustomizedLoanWithGraceOnArrearsAgeing(data.get(1)); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java index 062b6a19d46..98327990007 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContextKey.java @@ -291,5 +291,4 @@ public abstract class TestContextKey { public static final String LP1_INTEREST_FLAT_DAILY_RECALCULATION_SAR_MULTIDISB_EXPECT_TRANCHES = "loanProductCreateResponseLP1InterestFlatDailyRecalculationSameAsRepaymentMultiDisbursementExpectTranches"; public static final String LP1_INTEREST_FLAT_DAILY_ACTUAL_ACTUAL_MULTIDISB_EXPECT_TRANCHES = "loanProductCreateResponseLP1InterestFlatDailyActualActualMultiDisbursementExpectTranches"; public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADV_PYMNT_360_30_ZERO_INTEREST_CHARGE_OFF_ACCRUAL_ACTIVITY = "loanProductCreateResponseLP2AdvancedPaymentZeroInterestChargeOffBehaviourAccrualActivity"; - public static final String DEFAULT_LOAN_PRODUCT_CREATE_RESPONSE_LP2_ADVANCED_CUSTOM_PAYMENT_ALLOCATION_PROGRESSIVE_LOAN_SCHEDULE_PRINCIPAL_FIRST = "loanProductCreateResponseLP2AdvancedPaymentHorizontalPrincipalFirst"; } diff --git a/fineract-e2e-tests-runner/build.gradle b/fineract-e2e-tests-runner/build.gradle index 223900d2403..2f8811aefb7 100644 --- a/fineract-e2e-tests-runner/build.gradle +++ b/fineract-e2e-tests-runner/build.gradle @@ -61,8 +61,8 @@ dependencies { testCompileOnly 'org.projectlombok:lombok:1.18.36' testAnnotationProcessor 'org.projectlombok:lombok:1.18.36' - testImplementation "ch.qos.logback:logback-core:1.5.19" - testImplementation "ch.qos.logback:logback-classic:1.5.19" + testImplementation "ch.qos.logback:logback-core:1.5.17" + testImplementation "ch.qos.logback:logback-classic:1.5.17" testImplementation 'org.apache.activemq:activemq-client:6.1.6' testImplementation "org.apache.avro:avro:1.12.0" diff --git a/fineract-e2e-tests-runner/src/test/resources/features/Loan.feature b/fineract-e2e-tests-runner/src/test/resources/features/Loan.feature index 5ba518723a9..8bdd072cf70 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/Loan.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/Loan.feature @@ -5853,7 +5853,7 @@ Feature: Loan | 2 | 15 | 16 February 2024 | | 600.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | | 3 | 15 | 02 March 2024 | | 450.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | | 4 | 10 | 12 March 2024 | | 300.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | - | 5 | 20 | 01 April 2024 | | 150.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | + | 5 | 15 | 01 April 2024 | | 150.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | | 6 | 15 | 16 April 2024 | | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | 0.0 | 0.0 | 0.0 | 150.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature index f24b08ffaf9..54c31f435e1 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAging.feature @@ -1814,7 +1814,7 @@ Feature: LoanReAging | 1 | 0 | 01 January 2025 | 01 April 2025 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | | | 16 January 2025 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 2 | 0 | 16 January 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 16 | 01 February 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 February 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 4 | 28 | 01 March 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 5 | 31 | 01 April 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 6 | 0 | 01 April 2025 | | 0.0 | 600.0 | 0.0 | 0.0 | 0.0 | 600.0 | 0.0 | 0.0 | 0.0 | 600.0 | @@ -4276,77 +4276,6 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 15 March 2024 | Repayment | 91.4 | 90.0 | 1.4 | 0.0 | 0.0 | 0.0 | false | false | | 15 March 2024 | Accrual | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C4356 @AdvancedPaymentAllocation - Scenario: Verify Re-aging on interest bearing loan - Interest calculation: Default Behavior - with NEXT_INSTALLMENT allocation rule, backdated re-aging on 1st installment after repay and chargeback on 1st due - UC3.2 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.15 | 33.43 | 0.59 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.15 | 0.0 | 0.0 | 119.16 | 17.01 | 0.0 | 0.0 | 102.15 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | - When Admin sets the business date to "01 May 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 01 February 2024 | 6 | - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 100.58 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 0 | 01 February 2024 | | 83.58 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 3 | 29 | 01 March 2024 | | 67.16 | 16.42 | 0.58 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 4 | 31 | 01 April 2024 | | 50.74 | 16.42 | 0.58 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 30 | 01 May 2024 | | 34.32 | 16.42 | 0.58 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 31 | 01 June 2024 | | 17.52 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 7 | 30 | 01 July 2024 | | 0.0 | 17.52 | 0.1 | 0.0 | 0.0 | 17.62 | 0.0 | 0.0 | 0.0 | 17.62 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.62 | 0.0 | 0.0 | 119.63 | 17.01 | 0.0 | 0.0 | 102.62 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | - | 01 February 2024 | Re-age | 100.58 | 100.58 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "01 May 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4083 @AdvancedPaymentAllocation Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - N+1 Scenario - UC4 When Admin sets the business date to "01 January 2024" @@ -6108,6 +6037,220 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: When Loan Pay-off is made on "01 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met + @TestRailId:C4198 @AdvancedPaymentAllocation + Scenario: Verify Re-aging reversal on interest bearing loan - UC3: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | +# --- Reversal of re-age transaction --- + When Admin sets the business date to "01 April 2024" + And Admin successfully undo Loan re-aging transaction + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 17.01 | 0.0 | 0.0 | 85.14 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | true | + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4199 @AdvancedPaymentAllocation + Scenario: Verify Re-aging reversal on interest bearing loan - UC4: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | +# --- Reversal of re-age transaction --- + When Admin sets the business date to "01 April 2024" + And Admin successfully undo Loan re-aging transaction + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 17.01 | 0.0 | 0.0 | 85.14 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | true | + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + @TestRailId:C4202 @AdvancedPaymentAllocation Scenario: Verify Re-aging reversal on interest bearing loan - UC5: Interest handling: DEFAULT, re-aging is NOT the latest transaction on loan When Admin sets the business date to "01 January 2024" @@ -6898,14 +7041,14 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 01 May 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | | 01 May 2024 | Accrual Activity | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C4249 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with 2nd disb and partial chargeback(with custom pmnt alloc) after re-age - interest bearing multidisb loan with default behaviour - UC1 + @TestRailId:C4158 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment - interest bearing loan with equal amortization; outstanding payable interest + outstanding principal - UC1 When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + | 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_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | @@ -6924,6 +7067,7 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Admin sets the business date to "01 February 2024" + When Admin runs inline COB job for Loan And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount Then Loan Repayment schedule has 6 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 | @@ -6940,116 +7084,94 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 01 April 2024 | 6 | + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 96.48 | 23.77 | 0.7 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 6 | 31 | 01 June 2024 | | 72.57 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 7 | 30 | 01 July 2024 | | 48.52 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 8 | 31 | 01 August 2024 | | 24.33 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 9 | 31 | 01 September 2024 | | 0.0 | 24.33 | 0.14 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 3.66 | 0.0 | 0.0 | 153.66 | 17.01 | 0.0 | 0.0 | 136.65 | + When Admin sets the business date to "16 March 2024" + When Admin runs inline COB job for Loan Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 96.58 | 40.1 | 1.38 | 0.0 | 0.0 | 41.48 | 0.0 | 0.0 | 0.0 | 41.48 | - | 6 | 31 | 01 June 2024 | | 72.67 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 7 | 30 | 01 July 2024 | | 48.62 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 8 | 31 | 01 August 2024 | | 24.43 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 9 | 31 | 01 September 2024 | | 0.0 | 24.43 | 0.14 | 0.0 | 0.0 | 24.57 | 0.0 | 0.0 | 0.0 | 24.57 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 166.43 | 4.34 | 0.0 | 0.0 | 170.77 | 17.01 | 0.0 | 0.0 | 153.76 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 150.0 | false | false | + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - When Admin successfully undo last disbursal - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.46 | 30.22 | 1.09 | 0.0 | 0.0 | 31.31 | 0.0 | 0.0 | 0.0 | 31.31 | - | 6 | 31 | 01 June 2024 | | 42.49 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.44 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.31 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.31 | 0.08 | 0.0 | 0.0 | 14.39 | 0.0 | 0.0 | 0.0 | 14.39 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.43 | 3.48 | 0.0 | 0.0 | 119.91 | 17.01 | 0.0 | 0.0 | 102.9 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | - When Loan Pay-off is made on "01 April 2024" + When Loan Pay-off is made on "16 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4252 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with backdated re-aging before 2nd disb - interest bearing multidisb loan with default re-aging behaviour - UC4 + @TestRailId:C4159 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and 2nd disb before re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC1.1 When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -7087,64 +7209,67 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount + When Admin successfully disburse the loan on "01 February 2024" with "50" EUR transaction amount Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | | | 01 February 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 29 | 01 March 2024 | | 107.17 | 26.4 | 0.78 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | + | 3 | 31 | 01 April 2024 | | 80.62 | 26.55 | 0.63 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | + | 4 | 30 | 01 May 2024 | | 53.91 | 26.71 | 0.47 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | + | 5 | 31 | 01 June 2024 | | 27.04 | 26.87 | 0.31 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | + | 6 | 30 | 01 July 2024 | | 0.0 | 27.04 | 0.16 | 0.0 | 0.0 | 27.2 | 0.0 | 0.0 | 0.0 | 27.2 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | + | 150.0 | 2.93 | 0.0 | 0.0 | 152.93 | 17.01 | 0.0 | 0.0 | 135.92 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | -# --- backdated re-aging ---# + | 01 February 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 15 March 2024 | 6 | + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 0 | 15 March 2024 | | 70.03 | 13.54 | 0.71 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 31 | 15 April 2024 | | 96.22 | 23.81 | 0.58 | 0.0 | 0.0 | 24.39 | 0.0 | 0.0 | 0.0 | 24.39 | - | 6 | 30 | 15 May 2024 | | 72.39 | 23.83 | 0.56 | 0.0 | 0.0 | 24.39 | 0.0 | 0.0 | 0.0 | 24.39 | - | 7 | 31 | 15 June 2024 | | 48.42 | 23.97 | 0.42 | 0.0 | 0.0 | 24.39 | 0.0 | 0.0 | 0.0 | 24.39 | - | 8 | 30 | 15 July 2024 | | 24.31 | 24.11 | 0.28 | 0.0 | 0.0 | 24.39 | 0.0 | 0.0 | 0.0 | 24.39 | - | 9 | 31 | 15 August 2024 | | 0.0 | 24.31 | 0.14 | 0.0 | 0.0 | 24.45 | 0.0 | 0.0 | 0.0 | 24.45 | + | | | 01 February 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.19 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | + | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.19 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | + | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.19 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | + | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.19 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | + | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.19 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | + | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.18 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 3.27 | 0.0 | 0.0 | 153.27 | 17.01 | 0.0 | 0.0 | 136.26 | + | 150.0 | 1.71 | 0.0 | 0.0 | 151.71 | 17.01 | 0.0 | 0.0 | 134.7 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 01 February 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 14 March 2024 | Accrual | 1.69 | 0.0 | 1.69 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 134.7 | 133.57 | 1.13 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "01 April 2024" + When Loan Pay-off is made on "15 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4255 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with backdated 2nd disb and chargeback after re-age - interest bearing multidisbursal loan with default behaviour - UC7 + @Skip + @TestRailId:C4245 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with 2nd disb before and with chargeback and undo last disb after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC1.2 When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + | 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_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | @@ -7181,108 +7306,106 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + When Admin sets the business date to "01 March 2024" + When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 31 | 01 April 2024 | | 88.04 | 29.01 | 0.68 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | + | 4 | 30 | 01 May 2024 | | 58.86 | 29.18 | 0.51 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | + | 5 | 31 | 01 June 2024 | | 29.51 | 29.35 | 0.34 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | + | 6 | 30 | 01 July 2024 | | 0.0 | 29.51 | 0.17 | 0.0 | 0.0 | 29.68 | 0.0 | 0.0 | 0.0 | 29.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.77 | 0.0 | 0.0 | 152.77 | 17.01 | 0.0 | 0.0 | 135.76 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + When Admin sets the business date to "15 March 2024" When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 01 April 2024 | 6 | - Then Loan Repayment schedule has 9 periods, with the following data for periods: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 8 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 31 | 01 April 2024 | | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 4 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 5 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 6 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 7 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 8 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + | 150.0 | 1.42 | 0.0 | 0.0 | 151.42 | 17.01 | 0.0 | 0.0 | 134.41 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | false | When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 periods, with the following data for periods: + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 8 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 112.04 | 21.53 | 1.27 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 5 | 30 | 01 May 2024 | | 89.89 | 22.15 | 0.65 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 6 | 31 | 01 June 2024 | | 67.61 | 22.28 | 0.52 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 7 | 30 | 01 July 2024 | | 45.2 | 22.41 | 0.39 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 8 | 31 | 01 August 2024 | | 22.66 | 22.54 | 0.26 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.66 | 0.13 | 0.0 | 0.0 | 22.79 | 0.0 | 0.0 | 0.0 | 22.79 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 31 | 01 April 2024 | | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 4 | 30 | 01 May 2024 | | 89.05 | 39.27 | 0.14 | 0.0 | 0.0 | 39.41 | 0.0 | 0.0 | 0.0 | 39.41 | + | 5 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 6 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 7 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 8 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 3.8 | 0.0 | 0.0 | 153.8 | 17.01 | 0.0 | 0.0 | 136.79 | + | 167.01 | 1.42 | 0.0 | 0.0 | 168.43 | 17.01 | 0.0 | 0.0 | 151.42 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | + | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 150.58 | false | false | - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 12 EUR transaction amount - Then Loan Repayment schedule has 9 periods, with the following data for periods: +# --- undo last disbursement should be allowed on thet point --- # + When Admin successfully undo last disbursal + Then Loan Repayment schedule has 8 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 112.04 | 21.53 | 1.27 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 5 | 30 | 01 May 2024 | | 89.96 | 33.5 | 1.3 | 0.0 | 0.0 | 34.8 | 0.0 | 0.0 | 0.0 | 34.8 | - | 6 | 31 | 01 June 2024 | | 67.68 | 22.28 | 0.52 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 7 | 30 | 01 July 2024 | | 45.27 | 22.41 | 0.39 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 8 | 31 | 01 August 2024 | | 22.73 | 22.54 | 0.26 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.73 | 0.13 | 0.0 | 0.0 | 22.86 | 0.0 | 0.0 | 0.0 | 22.86 | + | 1 | 31 | 01 February 2024 | 15 March 2024 | 82.99 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 82.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 69.16 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | + | 4 | 30 | 01 May 2024 | | 55.33 | 30.84 | 0.18 | 0.0 | 0.0 | 31.02 | 0.0 | 0.0 | 0.0 | 31.02 | + | 5 | 31 | 01 June 2024 | | 41.5 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | + | 6 | 30 | 01 July 2024 | | 27.67 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | + | 7 | 31 | 01 August 2024 | | 13.84 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | + | 8 | 31 | 01 September 2024 | | 0.0 | 13.84 | 0.16 | 0.0 | 0.0 | 14.0 | 0.0 | 0.0 | 0.0 | 14.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 161.42 | 4.45 | 0.0 | 0.0 | 165.87 | 17.01 | 0.0 | 0.0 | 148.86 | + | 117.01 | 1.06 | 0.0 | 0.0 | 118.07 | 17.01 | 0.0 | 0.0 | 101.06 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | - | 01 April 2024 | Chargeback | 12.0 | 11.42 | 0.58 | 0.0 | 0.0 | 144.99 | false | false | - - # --- undo last disbursement --- # - # When Admin successfully undo last disbursal - # Then Loan Repayment schedule has 8 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 | - # | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - # | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - # | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - # | 3 | 14 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # | 4 | 31 | 15 April 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # | 5 | 30 | 15 May 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # | 6 | 31 | 15 June 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # | 7 | 30 | 15 July 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # | 8 | 31 | 15 August 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # Then Loan Repayment schedule has the following data in Total row: - # | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - # | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - # Then Loan Transactions tab has the following data: - # | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - # | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - # | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - # | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | true | + | 15 March 2024 | Re-age | 84.05 | 82.99 | 1.06 | 0.0 | 0.0 | 0.0 | false | true | + | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | When Loan Pay-off is made on "01 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4258 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with CI after re-age with over applied amount - interest bearing multidisb loan with default behaviour - UC10 + @TestRailId:C4246 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with MIR trn before re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC1.3 When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a fully customized loan with the following data: @@ -7325,91 +7448,62 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + When Admin sets the business date to "01 March 2024" + When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 March 2024" with 34.02 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | + | 4 | 30 | 01 May 2024 | | 33.54 | 16.79 | 0.22 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | + | 5 | 31 | 01 June 2024 | | 16.68 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.68 | 0.07 | 0.0 | 0.0 | 16.75 | 4.26 | 4.26 | 0.0 | 12.49 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.8 | 0.0 | 0.0 | 101.8 | 51.03 | 17.01 | 0.0 | 50.77 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Merchant Issued Refund | 34.02 | 33.53 | 0.49 | 0.0 | 0.0 | 50.04 | false | false | + When Admin sets the business date to "15 March 2024" When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 01 April 2024 | 6 | + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 50.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 41.7 | 8.34 | 0.02 | 0.0 | 0.0 | 8.36 | 0.0 | 0.0 | 0.0 | 8.36 | + | 5 | 30 | 01 May 2024 | | 33.36 | 8.34 | 0.02 | 0.0 | 0.0 | 8.36 | 0.0 | 0.0 | 0.0 | 8.36 | + | 6 | 31 | 01 June 2024 | | 25.02 | 8.34 | 0.02 | 0.0 | 0.0 | 8.36 | 0.0 | 0.0 | 0.0 | 8.36 | + | 7 | 30 | 01 July 2024 | | 16.68 | 8.34 | 0.02 | 0.0 | 0.0 | 8.36 | 0.0 | 0.0 | 0.0 | 8.36 | + | 8 | 31 | 01 August 2024 | | 8.34 | 8.34 | 0.02 | 0.0 | 0.0 | 8.36 | 0.0 | 0.0 | 0.0 | 8.36 | + | 9 | 31 | 01 September 2024 | | 0.0 | 8.34 | 0.03 | 0.0 | 0.0 | 8.37 | 0.0 | 0.0 | 0.0 | 8.37 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + | 100.0 | 1.2 | 0.0 | 0.0 | 101.2 | 51.03 | 17.01 | 0.0 | 50.17 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Merchant Issued Refund | 34.02 | 33.53 | 0.49 | 0.0 | 0.0 | 50.04 | false | false | + | 15 March 2024 | Re-age | 50.17 | 50.04 | 0.13 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "01 April 2024" - And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 96.48 | 23.77 | 0.7 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 6 | 31 | 01 June 2024 | | 72.57 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 7 | 30 | 01 July 2024 | | 48.52 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 8 | 31 | 01 August 2024 | | 24.33 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 9 | 31 | 01 September 2024 | | 0.0 | 24.33 | 0.14 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 3.66 | 0.0 | 0.0 | 153.66 | 17.01 | 0.0 | 0.0 | 136.65 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - And Customer makes "AUTOPAY" repayment on "01 April 2024" with 14.3 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | 01 April 2024 | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 14.3 | 0.0 | 0.0 | 0.0 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 96.48 | 23.77 | 0.7 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 6 | 31 | 01 June 2024 | | 72.57 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 7 | 30 | 01 July 2024 | | 48.52 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 8 | 31 | 01 August 2024 | | 24.33 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 9 | 31 | 01 September 2024 | | 0.0 | 24.33 | 0.14 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 3.66 | 0.0 | 0.0 | 153.66 | 31.31 | 0.0 | 0.0 | 122.35 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 01 April 2024 | Repayment | 14.3 | 13.32 | 0.98 | 0.0 | 0.0 | 120.25 | false | false | - - When Loan Pay-off is made on "01 April 2024" + When Loan Pay-off is made on "15 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4261 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with backdated CI and CI adj after re-age - interest bearing multidisb loan default behaviour - UC13 + @TestRailId:C4160 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and charge - interest bearing loan with equal amortization; outstanding payable interest - UC2 When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -7447,92 +7541,100 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 01 April 2024 | 6 | - Then Loan Repayment schedule has 9 periods, with the following data for periods: + When Admin sets the business date to "15 February 2024" + When Admin runs inline COB job for Loan + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 10 EUR transaction amount + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | Snooze fee | false | Specified due date | 15 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + + Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024| | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 10.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 17.01 | 0.0 | 0.0 | 95.04 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.8 | 0.0 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "01 April 2024" - And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 March 2024" with "50" EUR transaction amount + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 112.04 | 21.53 | 1.27 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 5 | 30 | 01 May 2024 | | 89.89 | 22.15 | 0.65 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 6 | 31 | 01 June 2024 | | 67.61 | 22.28 | 0.52 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 7 | 30 | 01 July 2024 | | 45.2 | 22.41 | 0.39 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 8 | 31 | 01 August 2024 | | 22.66 | 22.54 | 0.26 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 9 | 31 | 01 September 2024| | 0.0 | 22.66 | 0.13 | 0.0 | 0.0 | 22.79 | 0.0 | 0.0 | 0.0 | 22.79 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.65 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 5 | 30 | 01 May 2024 | | 55.73 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 6 | 31 | 01 June 2024 | | 41.81 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 7 | 30 | 01 July 2024 | | 27.89 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 8 | 31 | 01 August 2024 | | 13.97 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.97 | 0.11 | 1.65 | 0.0 | 15.73 | 0.0 | 0.0 | 0.0 | 15.73 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 3.8 | 0.0 | 0.0 | 153.8 | 17.01 | 0.0 | 0.0 | 136.79 | + | 100.0 | 1.29 | 10.0 | 0.0 | 111.29 | 17.01 | 0.0 | 0.0 | 94.28 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 February 2024 | Accrual | 0.8 | 0.0 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | - And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 April 2024" with "20" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 112.04 | 21.53 | 1.27 | 0.0 | 0.0 | 22.8 | 20.0 | 0.0 | 0.0 | 2.8 | - | 5 | 30 | 01 May 2024 | | 89.89 | 22.15 | 0.65 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 6 | 31 | 01 June 2024 | | 67.61 | 22.28 | 0.52 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 7 | 30 | 01 July 2024 | | 45.2 | 22.41 | 0.39 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 8 | 31 | 01 August 2024 | | 22.66 | 22.54 | 0.26 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | - | 9 | 31 | 01 September 2024| | 0.0 | 22.66 | 0.13 | 0.0 | 0.0 | 22.79 | 0.0 | 0.0 | 0.0 | 22.79 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 3.8 | 0.0 | 0.0 | 153.8 | 37.01 | 0.0 | 0.0 | 116.79 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | - | 01 April 2024 | Capitalized Income Adjustment | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 113.57 | false | false | + | 15 February 2024 | Accrual | 10.02 | 0.0 | 0.02 | 10.0 | 0.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "01 April 2024" + | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 94.28 | 83.57 | 0.71 | 10.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4264 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with 2nd disb and chargeback after re-age - interest bearing multidisb loan that expects tranches with default behaviour - UC16 + @TestRailId:C4161 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with charge and repayment - interest bearing loan with equal amortization; outstanding payable interest - UC2.1 When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin creates a fully customized loan with disbursements details and 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 | 1st_tranche_disb_expected_date | 1st_tranche_disb_principal | 2nd_tranche_disb_expected_date | 2nd_tranche_disb_principal | - | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_EXPECT_TRANCHE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 01 January 2024 | 100.0 | 01 April 2024 | 50.0 | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + 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_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | @@ -7540,20 +7642,15 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - Then Loan Tranche Details tab has the following data: - | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | - | 01 January 2024 | 01 January 2024 | 100.0 | | - | 01 April 2024 | | 50.0 | | When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount @@ -7562,11 +7659,10 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | @@ -7575,130 +7671,88 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 01 April 2024 | 6 | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 5 | 30 | 01 May 2024 | | 106.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 92.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 78.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 64.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 50.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + When Admin sets the business date to "15 February 2024" + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 10 EUR transaction amount + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | Snooze fee | false | Specified due date | 15 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 10.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 17.01 | 0.0 | 0.0 | 95.04 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 96.48 | 23.77 | 0.7 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 6 | 31 | 01 June 2024 | | 72.57 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 7 | 30 | 01 July 2024 | | 48.52 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 8 | 31 | 01 August 2024 | | 24.33 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 9 | 31 | 01 September 2024 | | 0.0 | 24.33 | 0.14 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + When Admin sets the business date to "16 February 2024" + And Customer makes "AUTOPAY" repayment on "16 February 2024" with 10 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 10.0 | 0.0 | 27.01 | 10.0 | 10.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 3.66 | 0.0 | 0.0 | 153.66 | 17.01 | 0.0 | 0.0 | 136.65 | + | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 27.01 | 10.0 | 0.0 | 85.04 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - Then Loan Tranche Details tab has the following data: - | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | - | 01 January 2024 | 01 January 2024 | 100.0 | | - | 01 April 2024 | 01 April 2024 | 50.0 | | + | 16 February 2024 | Repayment | 10.0 | 0.0 | 0.0 | 10.0 | 0.0 | 83.57 | false | false | - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 12 EUR transaction amount + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 96.55 | 35.7 | 0.77 | 0.0 | 0.0 | 36.47 | 0.0 | 0.0 | 0.0 | 36.47 | - | 6 | 31 | 01 June 2024 | | 72.64 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 7 | 30 | 01 July 2024 | | 48.59 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 8 | 31 | 01 August 2024 | | 24.4 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | - | 9 | 31 | 01 September 2024 | | 0.0 | 24.4 | 0.14 | 0.0 | 0.0 | 24.54 | 0.0 | 0.0 | 0.0 | 24.54 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 10.0 | 0.0 | 10.0 | 10.0 | 10.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 162.0 | 3.73 | 0.0 | 0.0 | 165.73 | 17.01 | 0.0 | 0.0 | 148.72 | + | 100.0 | 1.29 | 10.0 | 0.0 | 111.29 | 27.01 | 10.0 | 0.0 | 84.28 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 16 February 2024 | Repayment | 10.0 | 0.0 | 0.0 | 10.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 11.27 | 0.0 | 1.27 | 10.0 | 0.0 | 0.0 | false | false | | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 01 April 2024 | Chargeback | 12.0 | 12.0 | 0.0 | 0.0 | 0.0 | 145.57 | false | false | - When Loan Pay-off is made on "01 April 2024" + When Loan Pay-off is made on "15 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4272 @AdvancedPaymentAllocation - Scenario: Verify Re-aging on interest bearing, no interest recalculation loan is not allowed (not implemented) + @TestRailId:C4162 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with repayment and chargeback - interest bearing loan with equal amortization; outstanding payable interest - UC3 When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE" loan product "DEFAULT" transaction type to "NEXT_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_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin creates a Loan re-aging transaction by Loan external ID with the following data, but fails with 501 error code: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 16 January 2025 | 5 | - When Loan Pay-off is made on "01 January 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4274 - Scenario: Verify Re-aging with interest pause: UC2: Interest handling: DEFAULT, interest pause before re-aging - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -7708,106 +7762,121 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + When Admin runs inline COB job for Loan And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Interest pause --- - When Admin sets the business date to "02 February 2024" - And Create an interest pause period with start date "10 February 2024" and end date "10 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | - And Loan Repayment schedule has the following data in Total row: + | 2 | 29 | 01 March 2024 | | 67.15 | 33.43 | 0.59 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | - And Loan Transactions tab has the following data: + | 117.01 | 2.15 | 0.0 | 0.0 | 119.16 | 17.01 | 0.0 | 0.0 | 102.15 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 5 | 30 | 01 May 2024 | | 56.04 | 13.8 | 0.41 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 6 | 31 | 01 June 2024 | | 42.16 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 7 | 30 | 01 July 2024 | | 28.2 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 8 | 31 | 01 August 2024 | | 14.15 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.15 | 0.08 | 0.0 | 0.0 | 14.23 | 0.0 | 0.0 | 0.0 | 14.23 | - And Loan Repayment schedule has the following data in Total row: + | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 83.82 | 16.76 | 0.14 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + | 5 | 30 | 01 May 2024 | | 67.06 | 16.76 | 0.14 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + | 6 | 31 | 01 June 2024 | | 50.3 | 16.76 | 0.14 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + | 7 | 30 | 01 July 2024 | | 33.54 | 16.76 | 0.14 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + | 8 | 31 | 01 August 2024 | | 16.78 | 16.76 | 0.14 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + | 9 | 31 | 01 September 2024 | | 0.0 | 16.78 | 0.15 | 0.0 | 0.0 | 16.93 | 0.0 | 0.0 | 0.0 | 16.93 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | - And Loan Transactions tab has the following data: + | 117.01 | 1.43 | 0.0 | 0.0 | 118.44 | 17.01 | 0.0 | 0.0 | 101.43 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | + + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + + | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 101.43 | 100.58 | 0.85 | 0.0 | 0.0 | 0.0 | false | false | + When Loan Pay-off is made on "15 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4275 - Scenario: Verify Re-aging with interest pause: UC3: Interest handling: DEFAULT, interest pause overlapping re-aging + @TestRailId:C4163 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and full chargeback with payment alloc - interest bearing loan with equal amortization; outstanding payable interest - UC3.1 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -7817,106 +7886,74 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Interest pause --- - When Admin sets the business date to "02 February 2024" - And Create an interest pause period with start date "10 February 2024" and end date "10 May 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.68 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 32.67 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 15.8 | 16.87 | 0.14 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 15.8 | 0.09 | 0.0 | 0.0 | 15.89 | 0.0 | 0.0 | 0.0 | 15.89 | - And Loan Repayment schedule has the following data in Total row: + | 2 | 29 | 01 March 2024 | | 67.14 | 32.86 | 1.16 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.94 | 0.0 | 0.0 | 100.94 | 17.01 | 0.0 | 0.0 | 83.93 | - And Loan Transactions tab has the following data: + | 116.43 | 2.72 | 0.0 | 0.0 | 119.15 | 17.01 | 0.0 | 0.0 | 102.14 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + | 01 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.68 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 32.67 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 15.8 | 16.87 | 0.14 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 15.8 | 0.09 | 0.0 | 0.0 | 15.89 | 0.0 | 0.0 | 0.0 | 15.89 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.94 | 0.0 | 0.0 | 100.94 | 17.01 | 0.0 | 0.0 | 83.93 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.5 | 14.07 | 0.13 | 0.0 | 0.0 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | - | 5 | 30 | 01 May 2024 | | 55.3 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | - | 6 | 31 | 01 June 2024 | | 41.33 | 13.97 | 0.23 | 0.0 | 0.0 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | - | 7 | 30 | 01 July 2024 | | 27.37 | 13.96 | 0.24 | 0.0 | 0.0 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | - | 8 | 31 | 01 August 2024 | | 13.33 | 14.04 | 0.16 | 0.0 | 0.0 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.33 | 0.08 | 0.0 | 0.0 | 13.41 | 0.0 | 0.0 | 0.0 | 13.41 | - And Loan Repayment schedule has the following data in Total row: + | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 83.34 | 16.66 | 0.24 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + | 5 | 30 | 01 May 2024 | | 66.68 | 16.66 | 0.24 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + | 6 | 31 | 01 June 2024 | | 50.02 | 16.66 | 0.24 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + | 7 | 30 | 01 July 2024 | | 33.36 | 16.66 | 0.24 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + | 8 | 31 | 01 August 2024 | | 16.7 | 16.66 | 0.24 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | + | 9 | 31 | 01 September 2024 | | 0.0 | 16.7 | 0.22 | 0.0 | 0.0 | 16.92 | 0.0 | 0.0 | 0.0 | 16.92 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.42 | 0.0 | 0.0 | 101.42 | 17.01 | 0.0 | 0.0 | 84.41 | - And Loan Transactions tab has the following data: + | 116.43 | 2.0 | 0.0 | 0.0 | 118.43 | 17.01 | 0.0 | 0.0 | 101.42 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.7 | 83.57 | 0.13 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- + | 01 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.4 | 0.0 | 1.4 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 101.42 | 100.0 | 1.42 | 0.0 | 0.0 | 0.0 | false | false | + When Loan Pay-off is made on "15 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4276 - Scenario: Verify Re-aging with interest pause: UC4: Interest handling: DEFAULT, interest pause after re-aging + @TestRailId:C4164 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding payable interest - UC3.2 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -7926,107 +7963,74 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: + | 2 | 29 | 01 March 2024 | | 67.1 | 25.89 | 1.12 | 0.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | + | 3 | 31 | 01 April 2024 | | 50.48 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.95 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 109.42 | 2.68 | 0.0 | 0.0 | 112.1 | 17.01 | 0.0 | 0.0 | 95.09 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + | 01 February 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "02 April 2024" - And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.08 | 14.17 | 0.13 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 41.78 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 27.65 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 13.51 | 14.14 | 0.16 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.51 | 0.08 | 0.0 | 0.0 | 13.59 | 0.0 | 0.0 | 0.0 | 13.59 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.1 | 0.0 | 0.0 | 102.1 | 17.01 | 0.0 | 0.0 | 85.09 | - And Loan Transactions tab has the following data: + | 2 | 29 | 01 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 77.5 | 15.49 | 0.23 | 0.0 | 0.0 | 15.72 | 0.0 | 0.0 | 0.0 | 15.72 | + | 5 | 30 | 01 May 2024 | | 62.01 | 15.49 | 0.23 | 0.0 | 0.0 | 15.72 | 0.0 | 0.0 | 0.0 | 15.72 | + | 6 | 31 | 01 June 2024 | | 46.52 | 15.49 | 0.23 | 0.0 | 0.0 | 15.72 | 0.0 | 0.0 | 0.0 | 15.72 | + | 7 | 30 | 01 July 2024 | | 31.03 | 15.49 | 0.23 | 0.0 | 0.0 | 15.72 | 0.0 | 0.0 | 0.0 | 15.72 | + | 8 | 31 | 01 August 2024 | | 15.54 | 15.49 | 0.23 | 0.0 | 0.0 | 15.72 | 0.0 | 0.0 | 0.0 | 15.72 | + | 9 | 31 | 01 September 2024 | | 0.0 | 15.54 | 0.21 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 109.42 | 1.94 | 0.0 | 0.0 | 111.36 | 17.01 | 0.0 | 0.0 | 94.35 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | + | 14 March 2024 | Accrual | 1.35 | 0.0 | 1.35 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 94.35 | 92.99 | 1.36 | 0.0 | 0.0 | 0.0 | false | false | - @Skip @TestRailId:C4277 - Scenario: Verify Re-aging with interest pause: UC4.1: Interest handling: WAIVE_INTEREST, interest pause after re-aging + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4165 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment, charge and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding payable interest - UC3.3 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -8036,110 +8040,154 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 8 EUR transaction amount And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 8.0 | 0.0 | 25.01 | 17.01 | 0.0 | 0.0 | 8.0 | + | 2 | 29 | 01 March 2024 | | 67.06 | 18.51 | 0.5 | 8.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | + | 3 | 31 | 01 April 2024 | | 50.44 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.72 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.91 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.91 | 0.1 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: + | 102.0 | 2.06 | 16.0 | 0.0 | 120.06 | 17.01 | 0.0 | 0.0 | 103.05 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + | 01 February 2024 | Repayment | 17.01 | 9.01 | 0.0 | 8.0 | 0.0 | 90.99 | false | false | + | 01 February 2024 | Chargeback | 10.0 | 2.0 | 0.0 | 8.0 | 0.0 | 92.99 | false | false | + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 March 2024 | 90.99 | 9.01 | 0.0 | 8.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 77.49 | 15.5 | 0.23 | 1.33 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | + | 5 | 30 | 01 May 2024 | | 61.99 | 15.5 | 0.23 | 1.33 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | + | 6 | 31 | 01 June 2024 | | 46.49 | 15.5 | 0.23 | 1.33 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | + | 7 | 30 | 01 July 2024 | | 30.99 | 15.5 | 0.23 | 1.33 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | + | 8 | 31 | 01 August 2024 | | 15.49 | 15.5 | 0.23 | 1.33 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | + | 9 | 31 | 01 September 2024 | | 0.0 | 15.49 | 0.21 | 1.35 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: + | 102.0 | 1.36 | 16.0 | 0.0 | 119.36 | 17.01 | 0.0 | 0.0 | 102.35 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | WAIVE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: + | 01 February 2024 | Repayment | 17.01 | 9.01 | 0.0 | 8.0 | 0.0 | 90.99 | false | false | + | 01 February 2024 | Chargeback | 10.0 | 2.0 | 0.0 | 8.0 | 0.0 | 92.99 | false | false | + | 14 March 2024 | Accrual | 9.31 | 0.0 | 1.31 | 8.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 102.35 | 92.99 | 1.36 | 8.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4166 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment, charges(penalty and fee) and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding payable interest - UC3.4 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "02 April 2024" - And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" + + When Admin sets the business date to "01 February 2024" + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 8 EUR transaction amount + When Admin adds "LOAN_NSF_FEE" due date charge with "01 February 2024" due date and 10 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 34.02 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 8.0 | 10.0 | 35.01 | 34.02 | 0.0 | 0.0 | 0.99 | + | 2 | 29 | 01 March 2024 | | 67.14 | 32.45 | 0.58 | 0.99 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.02 | 2.14 | 8.99 | 10.0 | 137.15 | 34.02 | 0.0 | 0.0 | 103.13 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 34.02 | 16.02 | 0.0 | 8.0 | 10.0 | 83.98 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 16.02 | 0.0 | 0.99 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.08 | 14.17 | 0.13 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 41.78 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 27.65 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 13.51 | 14.14 | 0.16 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.51 | 0.08 | 0.0 | 0.0 | 13.59 | 0.0 | 0.0 | 0.0 | 13.59 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.1 | 0.0 | 0.0 | 102.1 | 17.01 | 0.0 | 0.0 | 85.09 | - And Loan Transactions tab has the following data: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 March 2024 | 83.98 | 16.02 | 0.0 | 8.0 | 10.0 | 34.02 | 34.02 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 83.33 | 16.67 | 0.24 | 0.16 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | + | 5 | 30 | 01 May 2024 | | 66.66 | 16.67 | 0.24 | 0.16 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | + | 6 | 31 | 01 June 2024 | | 49.99 | 16.67 | 0.24 | 0.16 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | + | 7 | 30 | 01 July 2024 | | 33.32 | 16.67 | 0.24 | 0.16 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | + | 8 | 31 | 01 August 2024 | | 16.65 | 16.67 | 0.24 | 0.16 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | + | 9 | 31 | 01 September 2024 | | 0.0 | 16.65 | 0.22 | 0.19 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.02 | 1.42 | 8.99 | 10.0 | 136.43 | 34.02 | 0.0 | 0.0 | 102.41 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" + | 01 February 2024 | Repayment | 34.02 | 16.02 | 0.0 | 8.0 | 10.0 | 83.98 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 16.02 | 0.0 | 0.99 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 19.4 | 0.0 | 1.4 | 8.0 | 10.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 102.41 | 100.0 | 1.42 | 0.99 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4280 - Scenario: Verify Re-aging with interest pause: UC5: Interest handling: DEFAULT, backdated interest pause created after re-aging, backdated to after re-aging + @TestRailId:C4167 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and charges(fee and penalty) with due date after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC3.5 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -8149,110 +8197,153 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 April 2024" due date and 8 EUR transaction amount + When Admin adds "LOAN_NSF_FEE" due date charge with "01 April 2024" due date and 10 EUR transaction amount Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 8.0 | 10.0 | 35.01 | 0.0 | 0.0 | 0.0 | 35.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 8.0 | 10.0 | 120.05 | 0.0 | 0.0 | 0.0 | 120.05 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 83.34 | 16.66 | 0.24 | 1.33 | 1.67 | 19.9 | 0.0 | 0.0 | 0.0 | 19.9 | + | 5 | 30 | 01 May 2024 | | 66.68 | 16.66 | 0.24 | 1.33 | 1.67 | 19.9 | 0.0 | 0.0 | 0.0 | 19.9 | + | 6 | 31 | 01 June 2024 | | 50.02 | 16.66 | 0.24 | 1.33 | 1.67 | 19.9 | 0.0 | 0.0 | 0.0 | 19.9 | + | 7 | 30 | 01 July 2024 | | 33.36 | 16.66 | 0.24 | 1.33 | 1.67 | 19.9 | 0.0 | 0.0 | 0.0 | 19.9 | + | 8 | 31 | 01 August 2024 | | 16.7 | 16.66 | 0.24 | 1.33 | 1.67 | 19.9 | 0.0 | 0.0 | 0.0 | 19.9 | + | 9 | 31 | 01 September 2024 | | 0.0 | 16.7 | 0.22 | 1.35 | 1.65 | 19.92 | 0.0 | 0.0 | 0.0 | 19.92 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.42 | 8.0 | 10.0 | 119.42 | 0.0 | 0.0 | 0.0 | 119.42 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 19.9 EUR transaction amount + Then Loan has 99.52 outstanding amount + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | + + When Admin sets the business date to "01 May 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 19.9 EUR transaction amount + Then Loan has 79.62 outstanding amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | + | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 66.68 | false | false | + + When Admin sets the business date to "01 June 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 June 2024" with 19.9 EUR transaction amount + Then Loan has 59.72 outstanding amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | + | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 66.68 | false | false | + | 01 June 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 50.02 | false | false | + When Admin sets the business date to "01 July 2024" - And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.08 | 14.17 | 0.13 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 41.78 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 27.82 | 13.96 | 0.34 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 13.68 | 14.14 | 0.16 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.68 | 0.08 | 0.0 | 0.0 | 13.76 | 0.0 | 0.0 | 0.0 | 13.76 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.27 | 0.0 | 0.0 | 102.27 | 17.01 | 0.0 | 0.0 | 85.26 | - And Loan Transactions tab has the following data: + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 July 2024" with 19.9 EUR transaction amount + Then Loan has 39.82 outstanding amount + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "01 July 2024" + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | + | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 66.68 | false | false | + | 01 June 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 50.02 | false | false | + | 01 July 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 33.36 | false | false | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 August 2024" with 19.9 EUR transaction amount + Then Loan has 19.92 outstanding amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | + | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 66.68 | false | false | + | 01 June 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 50.02 | false | false | + | 01 July 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 33.36 | false | false | + | 01 August 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 16.7 | false | false | + + When Admin sets the business date to "01 September 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 September 2024" with 19.92 EUR transaction amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | + | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 66.68 | false | false | + | 01 June 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 50.02 | false | false | + | 01 July 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 33.36 | false | false | + | 01 August 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 16.7 | false | false | + | 01 September 2024 | Repayment | 19.92 | 16.7 | 0.22 | 1.35 | 1.65 | 0.0 | false | false | Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4281 - Scenario: Verify Re-aging with interest pause: UC6: Interest handling: DEFAULT, backdated interest pause created after re-aging, overlapping (start date before re-aging, end date after re-aging) + @TestRailId:C4168 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with repayment and charge - interest bearing loan with equal amortization; outstanding payable interest - UC4 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -8262,33 +8353,15 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -8301,71 +8374,55 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "01 July 2024" - And Create an interest pause period with start date "10 February 2024" and end date "10 June 2024" + + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 July 2024" due date and 10 EUR transaction amount + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | Snooze fee | false | Specified due date | 15 July 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.5 | 14.07 | 0.13 | 0.0 | 0.0 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | - | 5 | 30 | 01 May 2024 | | 55.3 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | - | 6 | 31 | 01 June 2024 | | 41.1 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | - | 7 | 30 | 01 July 2024 | | 27.24 | 13.86 | 0.34 | 0.0 | 0.0 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | - | 8 | 31 | 01 August 2024 | | 13.2 | 14.04 | 0.16 | 0.0 | 0.0 | 14.2 | 0.0 | 0.0 | 0.0 | 14.2 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.2 | 0.08 | 0.0 | 0.0 | 13.28 | 0.0 | 0.0 | 0.0 | 13.28 | - And Loan Repayment schedule has the following data in Total row: + | 4 | 17 | 01 April 2024 | | 69.65 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 5 | 30 | 01 May 2024 | | 55.73 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 6 | 31 | 01 June 2024 | | 41.81 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 7 | 30 | 01 July 2024 | | 27.89 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 8 | 31 | 01 August 2024 | | 13.97 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.97 | 0.11 | 1.65 | 0.0 | 15.73 | 0.0 | 0.0 | 0.0 | 15.73 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - And Loan Transactions tab has the following data: + | 100.0 | 1.29 | 10.0 | 0.0 | 111.29 | 17.01 | 0.0 | 0.0 | 94.28 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.7 | 83.57 | 0.13 | 0.0 | 0.0 | 0.0 | false | true | -# --- Close loan --- - When Loan Pay-off is made on "01 July 2024" + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 94.28 | 83.57 | 0.71 | 10.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4283 - Scenario: Verify Re-aging with interest pause: UC8: Interest handling: DEFAULT, interest pause, fee, payout refund, CBR + @TestRailId:C4169 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with partially paid installment - interest bearing loan with equal amortization; outstanding payable interest - UC5 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -8375,167 +8432,70 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Interest pause --- - When Admin sets the business date to "02 February 2024" - And Create an interest pause period with start date "10 February 2024" and end date "10 March 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | - And Loan Transactions tab has the following data: + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 7.99 | 7.99 | 0.0 | 9.02 | + | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 25.0 | 7.99 | 0.0 | 77.0 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 5 | 30 | 01 May 2024 | | 56.04 | 13.8 | 0.41 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 6 | 31 | 01 June 2024 | | 42.16 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 7 | 30 | 01 July 2024 | | 28.2 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 8 | 31 | 01 August 2024 | | 14.15 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.15 | 0.08 | 0.0 | 0.0 | 14.23 | 0.0 | 0.0 | 0.0 | 14.23 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | - And Loan Transactions tab has the following data: + | 2 | 29 | 01 March 2024 | 15 March 2024 | 75.58 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 75.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 62.99 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | + | 5 | 30 | 01 May 2024 | | 50.4 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | + | 6 | 31 | 01 June 2024 | | 37.81 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | + | 7 | 30 | 01 July 2024 | | 25.22 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | + | 8 | 31 | 01 August 2024 | | 12.63 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | + | 9 | 31 | 01 September 2024 | | 0.0 | 12.63 | 0.09 | 0.0 | 0.0 | 12.72 | 0.0 | 0.0 | 0.0 | 12.72 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.22 | 0.0 | 0.0 | 101.22 | 25.0 | 7.99 | 0.0 | 76.22 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "02 April 2024" - And Create an interest pause period with start date "10 April 2024" and end date "10 July 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 5 | 30 | 01 May 2024 | | 55.76 | 14.08 | 0.13 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 6 | 31 | 01 June 2024 | | 41.55 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 7 | 30 | 01 July 2024 | | 27.34 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 8 | 31 | 01 August 2024 | | 13.24 | 14.1 | 0.11 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.24 | 0.08 | 0.0 | 0.0 | 13.32 | 0.0 | 0.0 | 0.0 | 13.32 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | - # --- Multiple types of transactions --- - When Admin sets the business date to "15 April 2024" - And Admin adds "LOAN_NSF_FEE" due date charge with "15 April 2024" due date and 25 EUR transaction amount - When Admin sets the business date to "16 April 2024" - And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "16 April 2024" with 40 EUR transaction amount and self-generated Idempotency key - When Admin sets the business date to "17 April 2024" - And Customer makes "AUTOPAY" repayment on "17 April 2024" with 80 EUR transaction amount - When Admin sets the business date to "18 April 2024" - Then Loan status will be "OVERPAID" - And Loan has 11.34 overpaid amount - And Admin makes Credit Balance Refund transaction on "18 April 2024" with 11.34 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | 16 April 2024 | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 14.21 | 0.0 | 14.21 | 0.0 | - | 5 | 30 | 01 May 2024 | 17 April 2024 | 55.76 | 14.08 | 0.13 | 0.0 | 25.0 | 39.21 | 39.21 | 39.21 | 0.0 | 0.0 | - | 6 | 31 | 01 June 2024 | 17 April 2024 | 41.55 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 14.21 | 14.21 | 0.0 | 0.0 | - | 7 | 30 | 01 July 2024 | 17 April 2024 | 27.34 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 14.21 | 14.21 | 0.0 | 0.0 | - | 8 | 31 | 01 August 2024 | 17 April 2024 | 13.13 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 14.21 | 14.21 | 0.0 | 0.0 | - | 9 | 31 | 01 September 2024 | 17 April 2024 | 0.0 | 13.13 | 0.0 | 0.0 | 0.0 | 13.13 | 13.13 | 13.13 | 0.0 | 0.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.19 | 0.0 | 25.0 | 126.19 | 126.19 | 94.97 | 14.21 | 0.0 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Accrual Activity | 0.48 | 0.0 | 0.48 | 0.0 | 0.0 | 0.0 | false | false | - | 16 April 2024 | Payout Refund | 40.0 | 14.52 | 0.48 | 0.0 | 25.0 | 69.05 | false | false | - | 16 April 2024 | Interest Refund | 0.52 | 0.39 | 0.13 | 0.0 | 0.0 | 68.66 | false | false | - | 17 April 2024 | Repayment | 80.0 | 68.66 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - | 17 April 2024 | Accrual | 25.58 | 0.0 | 0.58 | 0.0 | 25.0 | 0.0 | false | false | - | 17 April 2024 | Accrual Activity | 25.13 | 0.0 | 0.13 | 0.0 | 25.0 | 0.0 | false | false | - | 18 April 2024 | Credit Balance Refund | 11.34 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 14 March 2024 | Accrual | 1.2 | 0.0 | 1.2 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 76.22 | 75.58 | 0.64 | 0.0 | 0.0 | 0.0 | false | false | + When Loan Pay-off is made on "15 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4284 - Scenario: Verify Re-aging with interest pause: UC9: Interest handling: DEFAULT, interest pause, charge-off + @TestRailId:C4207 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC5.1 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -8545,178 +8505,71 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Interest pause --- - When Admin sets the business date to "02 February 2024" - And Create an interest pause period with start date "10 February 2024" and end date "10 March 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | - And Loan Transactions tab has the following data: + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 5 | 30 | 01 May 2024 | | 56.04 | 13.8 | 0.41 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 6 | 31 | 01 June 2024 | | 42.16 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 7 | 30 | 01 July 2024 | | 28.2 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 8 | 31 | 01 August 2024 | | 14.15 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.15 | 0.08 | 0.0 | 0.0 | 14.23 | 0.0 | 0.0 | 0.0 | 14.23 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "02 April 2024" - And Create an interest pause period with start date "10 April 2024" and end date "10 July 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 5 | 30 | 01 May 2024 | | 55.76 | 14.08 | 0.13 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 6 | 31 | 01 June 2024 | | 41.55 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 7 | 30 | 01 July 2024 | | 27.34 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 8 | 31 | 01 August 2024 | | 13.24 | 14.1 | 0.11 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.24 | 0.08 | 0.0 | 0.0 | 13.32 | 0.0 | 0.0 | 0.0 | 13.32 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | - # --- Charge-off --- - When Admin sets the business date to "15 April 2024" - And Admin does charge-off the loan on "15 April 2024" - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 March 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 4 | 30 | 01 May 2024 | | 55.73 | 14.11 | 0.13 | 0.0 | 0.0 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | - | 5 | 31 | 01 June 2024 | | 41.49 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | - | 6 | 30 | 01 July 2024 | | 27.25 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | - | 7 | 31 | 01 August 2024 | | 13.12 | 14.13 | 0.11 | 0.0 | 0.0 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | - | 8 | 31 | 01 September 2024 | | 0.0 | 13.12 | 0.08 | 0.0 | 0.0 | 13.2 | 0.0 | 0.0 | 0.0 | 13.2 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.7 | 83.57 | 0.13 | 0.0 | 0.0 | 0.0 | false | true | - | 15 April 2024 | Accrual | 1.19 | 0.0 | 1.19 | 0.0 | 0.0 | 0.0 | false | false | - | 15 April 2024 | Charge-off | 84.37 | 83.57 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | -# --- Charge-off undo --- - When Admin sets the business date to "16 April 2024" - And Admin does a charge-off undo the loan + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 5 | 30 | 01 May 2024 | | 55.76 | 14.08 | 0.13 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 6 | 31 | 01 June 2024 | | 41.55 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 7 | 30 | 01 July 2024 | | 27.34 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 8 | 31 | 01 August 2024 | | 13.24 | 14.1 | 0.11 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.24 | 0.08 | 0.0 | 0.0 | 13.32 | 0.0 | 0.0 | 0.0 | 13.32 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | - And Loan Transactions tab has the following data: + | 3 | 14 | 15 March 2024 | 15 March 2024 | 75.58 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 62.99 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | + | 5 | 30 | 01 May 2024 | | 50.4 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | + | 6 | 31 | 01 June 2024 | | 37.81 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | + | 7 | 30 | 01 July 2024 | | 25.22 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | + | 8 | 31 | 01 August 2024 | | 12.63 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | + | 9 | 31 | 01 September 2024 | | 0.0 | 12.63 | 0.09 | 0.0 | 0.0 | 12.72 | 0.0 | 0.0 | 0.0 | 12.72 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.22 | 0.0 | 0.0 | 101.22 | 25.0 | 7.99 | 0.0 | 76.22 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | true | - | 15 April 2024 | Accrual | 1.19 | 0.0 | 1.19 | 0.0 | 0.0 | 0.0 | false | false | - | 15 April 2024 | Charge-off | 84.37 | 83.57 | 0.8 | 0.0 | 0.0 | 0.0 | true | false | -# --- Close loan --- - When Loan Pay-off is made on "16 April 2024" + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 14 March 2024 | Accrual | 1.2 | 0.0 | 1.2 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 76.22 | 75.58 | 0.64 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4285 - Scenario: Verify Re-aging with interest pause: UC10: Interest handling: DEFAULT, interest pause update, delete + @TestRailId:C4170 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with chargeback after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -8726,13 +8579,13 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -8744,157 +8597,89 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Interest pause --- - When Admin sets the business date to "02 February 2024" - And Create an interest pause period with start date "10 February 2024" and end date "10 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 5 | 30 | 01 May 2024 | | 56.04 | 13.8 | 0.41 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 6 | 31 | 01 June 2024 | | 42.16 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 7 | 30 | 01 July 2024 | | 28.2 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 8 | 31 | 01 August 2024 | | 14.15 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.15 | 0.08 | 0.0 | 0.0 | 14.23 | 0.0 | 0.0 | 0.0 | 14.23 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "02 April 2024" - And Create an interest pause period with start date "10 April 2024" and end date "10 July 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 5 | 30 | 01 May 2024 | | 55.76 | 14.08 | 0.13 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 6 | 31 | 01 June 2024 | | 41.55 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 7 | 30 | 01 July 2024 | | 27.34 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 8 | 31 | 01 August 2024 | | 13.24 | 14.1 | 0.11 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.24 | 0.08 | 0.0 | 0.0 | 13.32 | 0.0 | 0.0 | 0.0 | 13.32 | - And Loan Repayment schedule has the following data in Total row: + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | - And Loan Transactions tab has the following data: + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause update --- - When Admin sets the business date to "15 April 2024" - And Update the interest pause period with start date "10 April 2024" and end date "25 May 2024" + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 5 | 30 | 01 May 2024 | | 55.76 | 14.08 | 0.13 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 6 | 31 | 01 June 2024 | | 41.62 | 14.14 | 0.07 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 7 | 30 | 01 July 2024 | | 27.65 | 13.97 | 0.24 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 8 | 31 | 01 August 2024 | | 13.6 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.6 | 0.08 | 0.0 | 0.0 | 13.68 | 0.0 | 0.0 | 0.0 | 13.68 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.74 | 0.0 | 0.0 | 101.74 | 17.01 | 0.0 | 0.0 | 84.73 | - And Loan Transactions tab has the following data: + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 30.94 | 0.12 | 0.0 | 0.0 | 31.06 | 0.0 | 0.0 | 0.0 | 31.06 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.29 | 0.0 | 0.0 | 118.3 | 17.01 | 0.0 | 0.0 | 101.29 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | -# --- Interest pause delete --- - When Admin sets the business date to "16 April 2024" - And Delete the interest pause period - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 5 | 30 | 01 May 2024 | | 56.08 | 13.76 | 0.45 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 6 | 31 | 01 June 2024 | | 42.2 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 7 | 30 | 01 July 2024 | | 28.24 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 8 | 31 | 01 August 2024 | | 14.19 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.19 | 0.08 | 0.0 | 0.0 | 14.27 | 0.0 | 0.0 | 0.0 | 14.27 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.33 | 0.0 | 0.0 | 102.33 | 17.01 | 0.0 | 0.0 | 85.32 | - And Loan Transactions tab has the following data: + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | + + When Admin sets the business date to "02 April 2024" + When Admin runs inline COB job for Loan + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "16 April 2024" + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | + + When Loan Pay-off is made on "02 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4286 - Scenario: Verify Re-aging with loan reschedule: UC1.1: Interest handling: DEFAULT, reschedule - extra terms + @TestRailId:C4171 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with partial chargeback with custom payment alloc after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6.1 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -8904,13 +8689,13 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -8922,122 +8707,77 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule before re-age --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | | | | 2 | | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - # --- Reschedule after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 July 2024 | 02 April 2024 | | | | 2 | | - Then Loan Repayment schedule has 11 periods, with the following data for periods: + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount + Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 34.01 | 8.38 | 0.25 | 0.0 | 0.0 | 8.63 | 0.0 | 0.0 | 0.0 | 8.63 | - | 8 | 31 | 01 August 2024 | | 25.58 | 8.43 | 0.2 | 0.0 | 0.0 | 8.63 | 0.0 | 0.0 | 0.0 | 8.63 | - | 9 | 31 | 01 September 2024 | | 17.1 | 8.48 | 0.15 | 0.0 | 0.0 | 8.63 | 0.0 | 0.0 | 0.0 | 8.63 | - | 10 | 30 | 01 October 2024 | | 8.57 | 8.53 | 0.1 | 0.0 | 0.0 | 8.63 | 0.0 | 0.0 | 0.0 | 8.63 | - | 11 | 31 | 01 November 2024 | | 0.0 | 8.57 | 0.05 | 0.0 | 0.0 | 8.62 | 0.0 | 0.0 | 0.0 | 8.62 | - And Loan Repayment schedule has the following data in Total row: + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 23.35 | 0.7 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 3.05 | 0.0 | 0.0 | 103.05 | 17.01 | 0.0 | 0.0 | 86.04 | - And Loan Transactions tab has the following data: + | 109.42 | 1.87 | 0.0 | 0.0 | 111.29 | 17.01 | 0.0 | 0.0 | 94.28 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" + | 31 March 2024 | Accrual | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | + + When Loan Pay-off is made on "01 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - # TODO check and unSkip when WAIVE_INTEREST strategy is implemented - @Skip @TestRailId:C4287 - Scenario: Verify Re-aging with loan reschedule: UC1.2: Interest handling: WAIVE_INTEREST, reschedule - extra terms + @TestRailId:C4172 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with full chargeback with custom payment alloc after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6.2 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -9047,13 +8787,13 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -9065,124 +8805,79 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | | | | 2 | | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | WAIVE_INTEREST | - # TODO check numbers + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Reschedule after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 July 2024 | 02 April 2024 | | | | 2 | | -# TODO check numbers + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - | 10 | 30 | 01 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - | 11 | 31 | 01 November 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 30.36 | 0.7 | 0.0 | 0.0 | 31.06 | 0.0 | 0.0 | 0.0 | 31.06 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: + | 116.43 | 1.87 | 0.0 | 0.0 | 118.3 | 17.01 | 0.0 | 0.0 | 101.29 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" + | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | + + When Loan Pay-off is made on "01 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met -# TODO check and unSkip when PS-2938 is done - @Skip @TestRailId:C4290 - Scenario: Verify Re-aging with loan reschedule: UC2.1: Interest handling: DEFAULT, reschedule - adjustedDueDate + @TestRailId:C4173 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with MIR after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6.3 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -9192,14 +8887,15 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + When Admin runs inline COB job for Loan And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount Then Loan Repayment schedule has 6 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 | @@ -9210,115 +8906,170 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule before re-age --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | 15 April 2024 | | | | | - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 8 periods, with the following data for periods: + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 4 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.27 | 83.57 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | - # --- Reschedule after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 May 2024 | 02 April 2024 | 15 June 2024 | | | | | -# TODO check numbers - Then Loan Repayment schedule has 8 periods, with the following data for periods: + + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + + | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 April 2024" with 34.02 EUR transaction amount + Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 4 | 31 | 15 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 15 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 15 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 31 | 15 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - | 8 | 31 | 15 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | 01 April 2024 | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 14.05 | 0.0 | 0.0 | 0.0 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 3.99 | 3.99 | 0.0 | 10.06 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 3.99 | 3.99 | 0.0 | 10.06 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 3.99 | 3.99 | 0.0 | 10.06 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 3.99 | 3.99 | 0.0 | 10.06 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 4.01 | 4.01 | 0.0 | 10.02 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 51.03 | 19.97 | 0.0 | 50.26 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + + | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Merchant Issued Refund | 34.02 | 33.9 | 0.12 | 0.0 | 0.0 | 49.67 | false | false | + + When Loan Pay-off is made on "01 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - # TODO check and unSkip when PS-2938 is done - @Skip @TestRailId:C4291 - Scenario: Verify Re-aging with loan reschedule: UC2.2: Interest handling: WAIVE_INTEREST, reschedule - adjustedDueDate + @TestRailId:C4174 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with PR and accrual activity after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6.4 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_REFUND_INTEREST_RECALC_ACCRUAL_ACTIVITY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -9328,13 +9079,13 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -9346,114 +9097,95 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule before re-age --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | 15 April 2024 | | | | | - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | - And Loan Repayment schedule has the following data in Total row: + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | - And Loan Transactions tab has the following data: + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | WAIVE_INTEREST | - Then Loan Repayment schedule has 8 periods, with the following data for periods: + | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "01 April 2024" with 34.02 EUR transaction amount + Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 4 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | 01 April 2024 | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 14.05 | 0.0 | 0.0 | 0.0 | + | 5 | 30 | 01 May 2024 | 01 April 2024 | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 14.05 | 14.05 | 0.0 | 0.0 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 6.41 | 6.41 | 0.0 | 7.64 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 51.52 | 20.46 | 0.0 | 49.77 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.27 | 83.57 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | - # --- Reschedule after re-age --- + | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Payout Refund | 34.02 | 33.78 | 0.24 | 0.0 | 0.0 | 49.79 | false | false | + | 01 April 2024 | Interest Refund | 0.49 | 0.49 | 0.0 | 0.0 | 0.0 | 49.3 | false | false | + When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 May 2024 | 02 April 2024 | 15 June 2024 | | | | | -# TODO check numbers - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 4 | 31 | 15 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 15 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 15 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 31 | 15 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - | 8 | 31 | 15 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: + When Admin runs inline COB job for Loan + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- + | 01 April 2024 | Payout Refund | 34.02 | 33.78 | 0.24 | 0.0 | 0.0 | 49.79 | false | false | + | 01 April 2024 | Interest Refund | 0.49 | 0.49 | 0.0 | 0.0 | 0.0 | 49.3 | false | false | + | 01 April 2024 | Accrual Activity | 0.12 | 0.0 | 0.12 | 0.0 | 0.0 | 0.0 | false | false | + When Loan Pay-off is made on "02 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4294 - Scenario: Verify Re-aging with loan reschedule: UC3: Interest handling: DEFAULT, reschedule - newInterestRate + @TestRailId:C4175 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with BuyDownFee after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6.5 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_PROGRESSIVE_ADVANCED_PAYMENT_ALLOCATION_BUYDOWN_FEES | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -9463,13 +9195,13 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -9481,169 +9213,253 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule before re-age --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | | | | | 10 | - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.97 | 16.6 | 0.49 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.53 | 0.56 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 4 | 30 | 01 May 2024 | | 33.77 | 16.67 | 0.42 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.28 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.14 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.47 | 0.0 | 0.0 | 102.47 | 17.01 | 0.0 | 0.0 | 85.46 | - And Loan Transactions tab has the following data: + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.97 | 16.6 | 0.49 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.53 | 0.56 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 4 | 30 | 01 May 2024 | | 33.77 | 16.67 | 0.42 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.28 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.14 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.47 | 0.0 | 0.0 | 102.47 | 17.01 | 0.0 | 0.0 | 85.46 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.33 | 13.24 | 1.18 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | - | 5 | 30 | 01 May 2024 | | 56.5 | 13.83 | 0.59 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | - | 6 | 31 | 01 June 2024 | | 42.55 | 13.95 | 0.47 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | - | 7 | 30 | 01 July 2024 | | 28.48 | 14.07 | 0.35 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | - | 8 | 31 | 01 August 2024 | | 14.3 | 14.18 | 0.24 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.3 | 0.12 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | - And Loan Repayment schedule has the following data in Total row: + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 3.53 | 0.0 | 0.0 | 103.53 | 17.01 | 0.0 | 0.0 | 86.52 | - And Loan Transactions tab has the following data: + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.37 | 83.57 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | - # --- Reschedule after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 May 2024 | 02 April 2024 | | | | | 12 | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin adds buy down fee with "AUTOPAY" payment type to the loan on "01 April 2024" with "50" EUR transaction amount Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.33 | 13.24 | 1.18 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | - | 5 | 30 | 01 May 2024 | | 56.56 | 13.77 | 0.7 | 0.0 | 0.0 | 14.47 | 0.0 | 0.0 | 0.0 | 14.47 | - | 6 | 31 | 01 June 2024 | | 42.66 | 13.9 | 0.57 | 0.0 | 0.0 | 14.47 | 0.0 | 0.0 | 0.0 | 14.47 | - | 7 | 30 | 01 July 2024 | | 28.62 | 14.04 | 0.43 | 0.0 | 0.0 | 14.47 | 0.0 | 0.0 | 0.0 | 14.47 | - | 8 | 31 | 01 August 2024 | | 14.44 | 14.18 | 0.29 | 0.0 | 0.0 | 14.47 | 0.0 | 0.0 | 0.0 | 14.47 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.44 | 0.14 | 0.0 | 0.0 | 14.58 | 0.0 | 0.0 | 0.0 | 14.58 | - And Loan Repayment schedule has the following data in Total row: + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 3.89 | 0.0 | 0.0 | 103.89 | 17.01 | 0.0 | 0.0 | 86.88 | - And Loan Transactions tab has the following data: + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.37 | 83.57 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Buy Down Fee | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C4295 - Scenario: Verify Re-aging with loan reschedule: UC4: Interest handling: DEFAULT, reschedule, N+1 installment + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4176 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with downpayment - interest bearing loan with equal amortization; outstanding payable interest - UC7 When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + 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_ADV_PYMNT_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE_AUTO_DOWNPAYMENT | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 7 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2024 | | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 4 | 31 | 01 April 2024 | | 37.82 | 12.47 | 0.29 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 5 | 30 | 01 May 2024 | | 25.28 | 12.54 | 0.22 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 6 | 31 | 01 June 2024 | | 12.67 | 12.61 | 0.15 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 7 | 30 | 01 July 2024 | | 0.0 | 12.67 | 0.07 | 0.0 | 0.0 | 12.74 | 0.0 | 0.0 | 0.0 | 12.74 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: + | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 25.0 | 0.0 | 0.0 | 76.54 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- + | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | + When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 periods, with the following data for periods: + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 12.76 EUR transaction amount + Then Loan Repayment schedule has 7 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: + | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 4 | 31 | 01 April 2024 | | 37.82 | 12.47 | 0.29 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 5 | 30 | 01 May 2024 | | 25.28 | 12.54 | 0.22 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 6 | 31 | 01 June 2024 | | 12.67 | 12.61 | 0.15 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 7 | 30 | 01 July 2024 | | 0.0 | 12.67 | 0.07 | 0.0 | 0.0 | 12.74 | 0.0 | 0.0 | 0.0 | 12.74 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: + | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 37.76 | 0.0 | 0.0 | 63.78 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- N+1 installment --- - When Admin sets the business date to "02 February 2024" - When Admin adds "LOAN_NSF_FEE" due date charge with "25 December 2024" due date and 20 EUR transaction amount - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | + | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 10 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 15 March 2024 | 62.68 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 14 | 15 March 2024 | 15 March 2024 | 62.68 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 5 | 17 | 01 April 2024 | | 52.23 | 10.45 | 0.09 | 0.0 | 0.0 | 10.54 | 0.0 | 0.0 | 0.0 | 10.54 | + | 6 | 30 | 01 May 2024 | | 41.78 | 10.45 | 0.09 | 0.0 | 0.0 | 10.54 | 0.0 | 0.0 | 0.0 | 10.54 | + | 7 | 31 | 01 June 2024 | | 31.33 | 10.45 | 0.09 | 0.0 | 0.0 | 10.54 | 0.0 | 0.0 | 0.0 | 10.54 | + | 8 | 30 | 01 July 2024 | | 20.88 | 10.45 | 0.09 | 0.0 | 0.0 | 10.54 | 0.0 | 0.0 | 0.0 | 10.54 | + | 9 | 31 | 01 August 2024 | | 10.43 | 10.45 | 0.09 | 0.0 | 0.0 | 10.54 | 0.0 | 0.0 | 0.0 | 10.54 | + | 10 | 31 | 01 September 2024 | | 0.0 | 10.43 | 0.09 | 0.0 | 0.0 | 10.52 | 0.0 | 0.0 | 0.0 | 10.52 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.98 | 0.0 | 0.0 | 100.98 | 37.76 | 0.0 | 0.0 | 63.22 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | + | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | + | 14 March 2024 | Accrual | 0.96 | 0.0 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 63.22 | 62.68 | 0.54 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4177 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with repayment - interest bearing loan with equal amortization; outstanding FULL interest - UC1 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 7 | 177 | 25 December 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 20.0 | 122.05 | 17.01 | 0.0 | 0.0 | 105.04 | - And Loan Transactions tab has the following data: + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 7 periods, with the following data for periods: + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4178 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and 2nd disb before re-age - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC1.1 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | @@ -9652,74 +9468,9377 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 7 | 177 | 25 December 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | - And Loan Repayment schedule has the following data in Total row: + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 20.0 | 122.05 | 17.01 | 0.0 | 0.0 | 105.04 | - And Loan Transactions tab has the following data: + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 10 periods, with the following data for periods: + + When Admin successfully disburse the loan on "01 February 2024" with "50" EUR transaction amount + When Admin runs inline COB job for Loan + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | | | 01 February 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 29 | 01 March 2024 | | 107.17 | 26.4 | 0.78 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | + | 3 | 31 | 01 April 2024 | | 80.62 | 26.55 | 0.63 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | + | 4 | 30 | 01 May 2024 | | 53.91 | 26.71 | 0.47 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | + | 5 | 31 | 01 June 2024 | | 27.04 | 26.87 | 0.31 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | + | 6 | 30 | 01 July 2024 | | 0.0 | 27.04 | 0.16 | 0.0 | 0.0 | 27.2 | 0.0 | 0.0 | 0.0 | 27.2 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.93 | 0.0 | 0.0 | 152.93 | 17.01 | 0.0 | 0.0 | 135.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - | 10 | 115 | 25 December 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 20.0 | 122.8 | 17.01 | 0.0 | 0.0 | 105.79 | - And Loan Transactions tab has the following data: + | | | 01 February 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.4 | 0.0 | 0.0 | 22.66 | 0.0 | 0.0 | 0.0 | 22.66 | + | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.4 | 0.0 | 0.0 | 22.66 | 0.0 | 0.0 | 0.0 | 22.66 | + | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.4 | 0.0 | 0.0 | 22.66 | 0.0 | 0.0 | 0.0 | 22.66 | + | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.4 | 0.0 | 0.0 | 22.66 | 0.0 | 0.0 | 0.0 | 22.66 | + | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.4 | 0.0 | 0.0 | 22.66 | 0.0 | 0.0 | 0.0 | 22.66 | + | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.41 | 0.0 | 0.0 | 22.68 | 0.0 | 0.0 | 0.0 | 22.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.99 | 0.0 | 0.0 | 152.99 | 17.01 | 0.0 | 0.0 | 135.98 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + + | 01 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 135.98 | 133.57 | 2.41 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @Skip + @TestRailId:C4247 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with 2nd disb before and with chargeback and undo last disb after re-age - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC1.2 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "01 March 2024" + When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 31 | 01 April 2024 | | 88.04 | 29.01 | 0.68 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | + | 4 | 30 | 01 May 2024 | | 58.86 | 29.18 | 0.51 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | + | 5 | 31 | 01 June 2024 | | 29.51 | 29.35 | 0.34 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | + | 6 | 30 | 01 July 2024 | | 0.0 | 29.51 | 0.17 | 0.0 | 0.0 | 29.68 | 0.0 | 0.0 | 0.0 | 29.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.77 | 0.0 | 0.0 | 152.77 | 17.01 | 0.0 | 0.0 | 135.76 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 31 | 01 April 2024 | | 111.3 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 4 | 30 | 01 May 2024 | | 89.03 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 5 | 31 | 01 June 2024 | | 66.76 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 6 | 30 | 01 July 2024 | | 44.49 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 7 | 31 | 01 August 2024 | | 22.22 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 8 | 31 | 01 September 2024 | | 0.0 | 22.22 | 0.39 | 0.0 | 0.0 | 22.61 | 0.0 | 0.0 | 0.0 | 22.61 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.82 | 0.0 | 0.0 | 152.82 | 17.01 | 0.0 | 0.0 | 135.81 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 135.81 | 133.57 | 2.24 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 31 | 01 April 2024 | | 111.3 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 4 | 30 | 01 May 2024 | | 89.03 | 39.28 | 0.37 | 0.0 | 0.0 | 39.65 | 0.0 | 0.0 | 0.0 | 39.65 | + | 5 | 31 | 01 June 2024 | | 66.76 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 6 | 30 | 01 July 2024 | | 44.49 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 7 | 31 | 01 August 2024 | | 22.22 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 8 | 31 | 01 September 2024 | | 0.0 | 22.22 | 0.39 | 0.0 | 0.0 | 22.61 | 0.0 | 0.0 | 0.0 | 22.61 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 167.01 | 2.82 | 0.0 | 0.0 | 169.83 | 17.01 | 0.0 | 0.0 | 152.82 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 135.81 | 133.57 | 2.24 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 150.58 | false | false | + +# --- undo last disbursement should be allowed on thet point --- # + When Admin successfully undo last disbursal + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 March 2024 | 82.99 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 82.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 69.16 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | + | 4 | 30 | 01 May 2024 | | 55.33 | 30.84 | 0.18 | 0.0 | 0.0 | 31.02 | 0.0 | 0.0 | 0.0 | 31.02 | + | 5 | 31 | 01 June 2024 | | 41.5 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | + | 6 | 30 | 01 July 2024 | | 27.67 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | + | 7 | 31 | 01 August 2024 | | 13.84 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | + | 8 | 31 | 01 September 2024 | | 0.0 | 13.84 | 0.16 | 0.0 | 0.0 | 14.0 | 0.0 | 0.0 | 0.0 | 14.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.06 | 0.0 | 0.0 | 118.07 | 17.01 | 0.0 | 0.0 | 101.06 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | true | + | 15 March 2024 | Re-age | 84.05 | 82.99 | 1.06 | 0.0 | 0.0 | 0.0 | false | true | + | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4248 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with MIR trn before re-age - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC1.3 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "01 March 2024" + When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 March 2024" with 34.02 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | + | 4 | 30 | 01 May 2024 | | 33.54 | 16.79 | 0.22 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | + | 5 | 31 | 01 June 2024 | | 16.68 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.68 | 0.07 | 0.0 | 0.0 | 16.75 | 4.26 | 4.26 | 0.0 | 12.49 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.8 | 0.0 | 0.0 | 101.8 | 51.03 | 17.01 | 0.0 | 50.77 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Merchant Issued Refund | 34.02 | 33.53 | 0.49 | 0.0 | 0.0 | 50.04 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 50.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 41.7 | 8.34 | 0.12 | 0.0 | 0.0 | 8.46 | 0.0 | 0.0 | 0.0 | 8.46 | + | 5 | 30 | 01 May 2024 | | 33.36 | 8.34 | 0.12 | 0.0 | 0.0 | 8.46 | 0.0 | 0.0 | 0.0 | 8.46 | + | 6 | 31 | 01 June 2024 | | 25.02 | 8.34 | 0.12 | 0.0 | 0.0 | 8.46 | 0.0 | 0.0 | 0.0 | 8.46 | + | 7 | 30 | 01 July 2024 | | 16.68 | 8.34 | 0.12 | 0.0 | 0.0 | 8.46 | 0.0 | 0.0 | 0.0 | 8.46 | + | 8 | 31 | 01 August 2024 | | 8.34 | 8.34 | 0.12 | 0.0 | 0.0 | 8.46 | 0.0 | 0.0 | 0.0 | 8.46 | + | 9 | 31 | 01 September 2024 | | 0.0 | 8.34 | 0.13 | 0.0 | 0.0 | 8.47 | 0.0 | 0.0 | 0.0 | 8.47 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.8 | 0.0 | 0.0 | 101.8 | 51.03 | 17.01 | 0.0 | 50.77 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Merchant Issued Refund | 34.02 | 33.53 | 0.49 | 0.0 | 0.0 | 50.04 | false | false | + | 15 March 2024 | Re-age | 50.77 | 50.04 | 0.73 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4179 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with repayment and charge - interest bearing loan with equal amortization; outstanding FULL interest - UC2 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 February 2024" + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 10 EUR transaction amount + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | Snooze fee | false | Specified due date | 15 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 1.65 | 0.0 | 15.83 | 0.0 | 0.0 | 0.0 | 15.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 10.0 | 0.0 | 112.09 | 17.01 | 0.0 | 0.0 | 95.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 11.27 | 0.0 | 1.27 | 10.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 95.08 | 83.57 | 1.51 | 10.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4180 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with charge and repayment - interest bearing loan with equal amortization; outstanding FULL interest - UC2.1 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 February 2024" + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 10 EUR transaction amount + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | Snooze fee | false | Specified due date | 15 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 10.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 17.01 | 0.0 | 0.0 | 95.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "16 February 2024" + And Customer makes "AUTOPAY" repayment on "16 February 2024" with 10 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 10.0 | 0.0 | 27.01 | 10.0 | 10.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 27.01 | 10.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 16 February 2024 | Repayment | 10.0 | 0.0 | 0.0 | 10.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 10.0 | 0.0 | 10.0 | 10.0 | 10.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 10.0 | 0.0 | 112.09 | 27.01 | 10.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 16 February 2024 | Repayment | 10.0 | 0.0 | 0.0 | 10.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 11.27 | 0.0 | 1.27 | 10.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4181 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with repayment and chargeback - interest bearing loan with equal amortization; outstanding FULL interest - UC3 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.15 | 33.43 | 0.59 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 2.15 | 0.0 | 0.0 | 119.16 | 17.01 | 0.0 | 0.0 | 102.15 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 83.82 | 16.76 | 0.28 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 5 | 30 | 01 May 2024 | | 67.06 | 16.76 | 0.28 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 6 | 31 | 01 June 2024 | | 50.3 | 16.76 | 0.28 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 7 | 30 | 01 July 2024 | | 33.54 | 16.76 | 0.28 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 8 | 31 | 01 August 2024 | | 16.78 | 16.76 | 0.28 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 9 | 31 | 01 September 2024 | | 0.0 | 16.78 | 0.27 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 2.25 | 0.0 | 0.0 | 119.26 | 17.01 | 0.0 | 0.0 | 102.25 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | + | 14 March 2024 | Accrual | 1.42 | 0.0 | 1.42 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 102.25 | 100.58 | 1.67 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4182 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding FULL interest - UC3.1 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 25.89 | 1.12 | 0.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | + | 3 | 31 | 01 April 2024 | | 50.48 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.95 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 109.42 | 2.68 | 0.0 | 0.0 | 112.1 | 17.01 | 0.0 | 0.0 | 95.09 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 77.49 | 15.5 | 0.36 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | + | 5 | 30 | 01 May 2024 | | 61.99 | 15.5 | 0.36 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | + | 6 | 31 | 01 June 2024 | | 46.49 | 15.5 | 0.36 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | + | 7 | 30 | 01 July 2024 | | 30.99 | 15.5 | 0.36 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | + | 8 | 31 | 01 August 2024 | | 15.49 | 15.5 | 0.36 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | + | 9 | 31 | 01 September 2024 | | 0.0 | 15.49 | 0.37 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 109.42 | 2.75 | 0.0 | 0.0 | 112.17 | 17.01 | 0.0 | 0.0 | 95.16 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | + | 14 March 2024 | Accrual | 1.35 | 0.0 | 1.35 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 95.16 | 92.99 | 2.17 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4183 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and full chargeback with payment alloc - interest bearing loan with equal amortization; outstanding FULL interest - UC3.2 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.14 | 32.86 | 1.16 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.43 | 2.72 | 0.0 | 0.0 | 119.15 | 17.01 | 0.0 | 0.0 | 102.14 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 83.33 | 16.67 | 0.37 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 5 | 30 | 01 May 2024 | | 66.66 | 16.67 | 0.37 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 6 | 31 | 01 June 2024 | | 49.99 | 16.67 | 0.37 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 7 | 30 | 01 July 2024 | | 33.32 | 16.67 | 0.37 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 8 | 31 | 01 August 2024 | | 16.65 | 16.67 | 0.37 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + | 9 | 31 | 01 September 2024 | | 0.0 | 16.65 | 0.39 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.43 | 2.82 | 0.0 | 0.0 | 119.25 | 17.01 | 0.0 | 0.0 | 102.24 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.4 | 0.0 | 1.4 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 102.24 | 100.0 | 2.24 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4184 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment, charge and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding FULL interest - UC3.3 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + When Admin runs inline COB job for Loan + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 8 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 8.0 | 0.0 | 25.01 | 17.01 | 0.0 | 0.0 | 8.0 | + | 2 | 29 | 01 March 2024 | | 67.06 | 18.51 | 0.5 | 8.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | + | 3 | 31 | 01 April 2024 | | 50.44 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.72 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.91 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.91 | 0.1 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 102.0 | 2.06 | 16.0 | 0.0 | 120.06 | 17.01 | 0.0 | 0.0 | 103.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 9.01 | 0.0 | 8.0 | 0.0 | 90.99 | false | false | + | 01 February 2024 | Chargeback | 10.0 | 2.0 | 0.0 | 8.0 | 0.0 | 92.99 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 March 2024 | 90.99 | 9.01 | 0.0 | 8.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 77.49 | 15.5 | 0.36 | 1.33 | 0.0 | 17.19 | 0.0 | 0.0 | 0.0 | 17.19 | + | 5 | 30 | 01 May 2024 | | 61.99 | 15.5 | 0.36 | 1.33 | 0.0 | 17.19 | 0.0 | 0.0 | 0.0 | 17.19 | + | 6 | 31 | 01 June 2024 | | 46.49 | 15.5 | 0.36 | 1.33 | 0.0 | 17.19 | 0.0 | 0.0 | 0.0 | 17.19 | + | 7 | 30 | 01 July 2024 | | 30.99 | 15.5 | 0.36 | 1.33 | 0.0 | 17.19 | 0.0 | 0.0 | 0.0 | 17.19 | + | 8 | 31 | 01 August 2024 | | 15.49 | 15.5 | 0.36 | 1.33 | 0.0 | 17.19 | 0.0 | 0.0 | 0.0 | 17.19 | + | 9 | 31 | 01 September 2024 | | 0.0 | 15.49 | 0.37 | 1.35 | 0.0 | 17.21 | 0.0 | 0.0 | 0.0 | 17.21 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 102.0 | 2.17 | 16.0 | 0.0 | 120.17 | 17.01 | 0.0 | 0.0 | 103.16 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 9.01 | 0.0 | 8.0 | 0.0 | 90.99 | false | false | + | 01 February 2024 | Chargeback | 10.0 | 2.0 | 0.0 | 8.0 | 0.0 | 92.99 | false | false | + + | 01 February 2024 | Accrual | 8.02 | 0.0 | 0.02 | 8.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + + | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 103.16 | 92.99 | 2.17 | 8.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4185 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment, charges(penalty and fee) and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding FULL interest - UC3.4 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 8 EUR transaction amount + When Admin adds "LOAN_NSF_FEE" due date charge with "01 February 2024" due date and 10 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 34.02 EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 8.0 | 10.0 | 35.01 | 34.02 | 0.0 | 0.0 | 0.99 | + | 2 | 29 | 01 March 2024 | | 67.14 | 32.45 | 0.58 | 0.99 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.02 | 2.14 | 8.99 | 10.0 | 137.15 | 34.02 | 0.0 | 0.0 | 103.13 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 34.02 | 16.02 | 0.0 | 8.0 | 10.0 | 83.98 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 16.02 | 0.0 | 0.99 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 March 2024 | 83.98 | 16.02 | 0.0 | 8.0 | 10.0 | 34.02 | 34.02 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 83.33 | 16.67 | 0.37 | 0.16 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | + | 5 | 30 | 01 May 2024 | | 66.66 | 16.67 | 0.37 | 0.16 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | + | 6 | 31 | 01 June 2024 | | 49.99 | 16.67 | 0.37 | 0.16 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | + | 7 | 30 | 01 July 2024 | | 33.32 | 16.67 | 0.37 | 0.16 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | + | 8 | 31 | 01 August 2024 | | 16.65 | 16.67 | 0.37 | 0.16 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | + | 9 | 31 | 01 September 2024 | | 0.0 | 16.65 | 0.39 | 0.19 | 0.0 | 17.23 | 0.0 | 0.0 | 0.0 | 17.23 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.02 | 2.24 | 8.99 | 10.0 | 137.25 | 34.02 | 0.0 | 0.0 | 103.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 34.02 | 16.02 | 0.0 | 8.0 | 10.0 | 83.98 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 16.02 | 0.0 | 0.99 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 19.4 | 0.0 | 1.4 | 8.0 | 10.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 103.23 | 100.0 | 2.24 | 0.99 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4186 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and charges(fee and penalty) with due date after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC3.5 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 April 2024" due date and 8 EUR transaction amount + When Admin adds "LOAN_NSF_FEE" due date charge with "01 April 2024" due date and 10 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 8.0 | 10.0 | 35.01 | 0.0 | 0.0 | 0.0 | 35.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 8.0 | 10.0 | 120.05 | 0.0 | 0.0 | 0.0 | 120.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 83.33 | 16.67 | 0.37 | 1.33 | 1.67 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | + | 5 | 30 | 01 May 2024 | | 66.66 | 16.67 | 0.37 | 1.33 | 1.67 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | + | 6 | 31 | 01 June 2024 | | 49.99 | 16.67 | 0.37 | 1.33 | 1.67 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | + | 7 | 30 | 01 July 2024 | | 33.32 | 16.67 | 0.37 | 1.33 | 1.67 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | + | 8 | 31 | 01 August 2024 | | 16.65 | 16.67 | 0.37 | 1.33 | 1.67 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | + | 9 | 31 | 01 September 2024 | | 0.0 | 16.65 | 0.39 | 1.35 | 1.65 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.24 | 8.0 | 10.0 | 120.24 | 0.0 | 0.0 | 0.0 | 120.24 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 20.04 EUR transaction amount + Then Loan has 100.2 outstanding amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | + + When Admin sets the business date to "01 May 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 20.04 EUR transaction amount + Then Loan has 80.16 outstanding amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | + | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 66.66 | false | false | + + When Admin sets the business date to "01 June 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 June 2024" with 20.04 EUR transaction amount + Then Loan has 60.12 outstanding amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | + | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 66.66 | false | false | + | 01 June 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 49.99 | false | false | + + When Admin sets the business date to "01 July 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 July 2024" with 20.04 EUR transaction amount + Then Loan has 40.08 outstanding amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | + | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 66.66 | false | false | + | 01 June 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 49.99 | false | false | + | 01 July 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 33.32 | false | false | + + When Admin sets the business date to "01 August 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 August 2024" with 20.04 EUR transaction amount + Then Loan has 20.04 outstanding amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | + | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 66.66 | false | false | + | 01 June 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 49.99 | false | false | + | 01 July 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 33.32 | false | false | + | 01 August 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 16.65 | false | false | + + When Admin sets the business date to "01 September 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 September 2024" with 20.04 EUR transaction amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | + | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | + | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 66.66 | false | false | + | 01 June 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 49.99 | false | false | + | 01 July 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 33.32 | false | false | + | 01 August 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 16.65 | false | false | + | 01 September 2024 | Repayment | 20.04 | 16.65 | 0.39 | 1.35 | 1.65 | 0.0 | false | false | + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4187 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with repayment and charge - interest bearing loan with equal amortization; outstanding FULL interest - UC4 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + When Admin runs inline COB job for Loan + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 July 2024" due date and 10 EUR transaction amount + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | Snooze fee | false | Specified due date | 15 July 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 1.65 | 0.0 | 15.83 | 0.0 | 0.0 | 0.0 | 15.83 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 10.0 | 0.0 | 112.09 | 17.01 | 0.0 | 0.0 | 95.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 06 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 16 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 19 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + + | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 10 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 12 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 95.08 | 83.57 | 1.51 | 10.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4188 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with partially paid installment - interest bearing loan with equal amortization; outstanding FULL interest - UC5 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 7.99 | 7.99 | 0.0 | 9.02 | + | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 25.0 | 7.99 | 0.0 | 77.0 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 75.58 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 75.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 62.98 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 5 | 30 | 01 May 2024 | | 50.38 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 6 | 31 | 01 June 2024 | | 37.78 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 7 | 30 | 01 July 2024 | | 25.18 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 8 | 31 | 01 August 2024 | | 12.58 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 9 | 31 | 01 September 2024 | | 0.0 | 12.58 | 0.24 | 0.0 | 0.0 | 12.82 | 0.0 | 0.0 | 0.0 | 12.82 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.02 | 0.0 | 0.0 | 102.02 | 25.0 | 7.99 | 0.0 | 77.02 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 14 March 2024 | Accrual | 1.2 | 0.0 | 1.2 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 77.02 | 75.58 | 1.44 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4208 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding full interest - UC5.1 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 75.58 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 62.98 | 12.6 | 0.21 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | + | 5 | 30 | 01 May 2024 | | 50.38 | 12.6 | 0.21 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | + | 6 | 31 | 01 June 2024 | | 37.78 | 12.6 | 0.21 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | + | 7 | 30 | 01 July 2024 | | 25.18 | 12.6 | 0.21 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | + | 8 | 31 | 01 August 2024 | | 12.58 | 12.6 | 0.21 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | + | 9 | 31 | 01 September 2024 | | 0.0 | 12.58 | 0.23 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.86 | 0.0 | 0.0 | 101.86 | 25.0 | 7.99 | 0.0 | 76.86 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 14 March 2024 | Accrual | 1.2 | 0.0 | 1.2 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 76.86 | 75.58 | 1.28 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4189 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with chargeback after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C_4190 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with full chargeback with custom payment alloc after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6.1 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 30.36 | 0.83 | 0.0 | 0.0 | 31.19 | 0.0 | 0.0 | 0.0 | 31.19 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.43 | 2.67 | 0.0 | 0.0 | 119.1 | 17.01 | 0.0 | 0.0 | 102.09 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4191 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with partial chargeback with custom payment alloc after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6.2 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 23.35 | 0.83 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 109.42 | 2.67 | 0.0 | 0.0 | 112.09 | 17.01 | 0.0 | 0.0 | 95.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4331 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with partial chargeback with custom payment alloc on re-age transaction date - interest bearing loan with equal amortization; outstanding FULL interest - UC6.2.1 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 23.35 | 0.83 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 109.42 | 2.67 | 0.0 | 0.0 | 112.09 | 17.01 | 0.0 | 0.0 | 95.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4192 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with PR after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6.3 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "01 April 2024" with 34.02 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | 01 April 2024 | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 14.18 | 0.0 | 0.0 | 0.0 | + | 5 | 30 | 01 May 2024 | 01 April 2024 | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 14.18 | 14.18 | 0.0 | 0.0 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 5.66 | 5.66 | 0.0 | 8.52 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 51.03 | 19.84 | 0.0 | 51.06 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Payout Refund | 34.02 | 33.52 | 0.5 | 0.0 | 0.0 | 50.05 | false | false | + + When Admin sets the business date to "02 April 2024" + When Admin runs inline COB job for Loan + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Payout Refund | 34.02 | 33.52 | 0.5 | 0.0 | 0.0 | 50.05 | false | false | + + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4193 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with MIR and accrual activity after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6.4 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_REFUND_INTEREST_RECALC_ACCRUAL_ACTIVITY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 April 2024" with 34.02 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | 01 April 2024 | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 14.18 | 0.0 | 0.0 | 0.0 | + | 5 | 30 | 01 May 2024 | 01 April 2024 | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 14.18 | 14.18 | 0.0 | 0.0 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 6.21 | 6.21 | 0.0 | 7.97 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 51.58 | 20.39 | 0.0 | 50.51 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Merchant Issued Refund | 34.02 | 33.52 | 0.5 | 0.0 | 0.0 | 50.05 | false | false | + | 01 April 2024 | Interest Refund | 0.55 | 0.55 | 0.0 | 0.0 | 0.0 | 49.5 | false | false | + + When Admin sets the business date to "02 April 2024" + When Admin runs inline COB job for Loan + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Merchant Issued Refund | 34.02 | 33.52 | 0.5 | 0.0 | 0.0 | 50.05 | false | false | + | 01 April 2024 | Interest Refund | 0.55 | 0.55 | 0.0 | 0.0 | 0.0 | 49.5 | false | false | + | 01 April 2024 | Accrual Activity | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4194 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with BuyDownFee after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6.5 + When Admin sets the business date to "01 January 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_PROGRESSIVE_ADVANCED_PAYMENT_ALLOCATION_BUYDOWN_FEES | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin runs inline COB job for Loan + When Admin adds buy down fee with "AUTOPAY" payment type to the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Buy Down Fee | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "02 April 2024" + When Admin runs inline COB job for Loan + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Buy Down Fee | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Buy Down Fee Amortization | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4195 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging transaction with downpayment - interest bearing loan with equal amortization; outstanding FULL interest - UC7 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE_AUTO_DOWNPAYMENT | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 7 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2024 | | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 4 | 31 | 01 April 2024 | | 37.82 | 12.47 | 0.29 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 5 | 30 | 01 May 2024 | | 25.28 | 12.54 | 0.22 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 6 | 31 | 01 June 2024 | | 12.67 | 12.61 | 0.15 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 7 | 30 | 01 July 2024 | | 0.0 | 12.67 | 0.07 | 0.0 | 0.0 | 12.74 | 0.0 | 0.0 | 0.0 | 12.74 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 25.0 | 0.0 | 0.0 | 76.54 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 12.76 EUR transaction amount + Then Loan Repayment schedule has 7 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 4 | 31 | 01 April 2024 | | 37.82 | 12.47 | 0.29 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 5 | 30 | 01 May 2024 | | 25.28 | 12.54 | 0.22 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 6 | 31 | 01 June 2024 | | 12.67 | 12.61 | 0.15 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | + | 7 | 30 | 01 July 2024 | | 0.0 | 12.67 | 0.07 | 0.0 | 0.0 | 12.74 | 0.0 | 0.0 | 0.0 | 12.74 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 37.76 | 0.0 | 0.0 | 63.78 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | + | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin runs inline COB job for Loan + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 10 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | + | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | + | 3 | 29 | 01 March 2024 | 15 March 2024 | 62.68 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 14 | 15 March 2024 | 15 March 2024 | 62.68 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 5 | 17 | 01 April 2024 | | 52.23 | 10.45 | 0.19 | 0.0 | 0.0 | 10.64 | 0.0 | 0.0 | 0.0 | 10.64 | + | 6 | 30 | 01 May 2024 | | 41.78 | 10.45 | 0.19 | 0.0 | 0.0 | 10.64 | 0.0 | 0.0 | 0.0 | 10.64 | + | 7 | 31 | 01 June 2024 | | 31.33 | 10.45 | 0.19 | 0.0 | 0.0 | 10.64 | 0.0 | 0.0 | 0.0 | 10.64 | + | 8 | 30 | 01 July 2024 | | 20.88 | 10.45 | 0.19 | 0.0 | 0.0 | 10.64 | 0.0 | 0.0 | 0.0 | 10.64 | + | 9 | 31 | 01 August 2024 | | 10.43 | 10.45 | 0.19 | 0.0 | 0.0 | 10.64 | 0.0 | 0.0 | 0.0 | 10.64 | + | 10 | 31 | 01 September 2024 | | 0.0 | 10.43 | 0.19 | 0.0 | 0.0 | 10.62 | 0.0 | 0.0 | 0.0 | 10.62 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.58 | 0.0 | 0.0 | 101.58 | 37.76 | 0.0 | 0.0 | 63.82 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | + | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | + | 14 March 2024 | Accrual | 0.96 | 0.0 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 63.82 | 62.68 | 1.14 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4239 + Scenario: Verify Re-aging reversal on interest bearing loan - UC3.1: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST, re-aging is NOT the latest transaction on loan + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Transaction after re-aging --- + When Admin sets the business date to "16 March 2024" + And Customer makes "AUTOPAY" repayment on "16 March 2024" with 14.05 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | 16 March 2024 | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 14.05 | 14.05 | 0.0 | 0.0 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 31.06 | 14.05 | 0.0 | 70.23 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 16 March 2024 | Repayment | 14.05 | 13.93 | 0.12 | 0.0 | 0.0 | 69.64 | false | false | +# --- Reversal of re-age transaction --- + When Admin sets the business date to "01 April 2024" + And Admin successfully undo Loan re-aging transaction + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 14.05 | 0.0 | 14.05 | 2.96 | + | 3 | 31 | 01 April 2024 | | 50.49 | 16.56 | 0.45 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.77 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.1 | 0.0 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.11 | 0.0 | 0.0 | 102.11 | 31.06 | 0.0 | 14.05 | 71.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | true | false | + | 16 March 2024 | Repayment | 14.05 | 13.56 | 0.49 | 0.0 | 0.0 | 70.01 | false | true | + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4240 + Scenario: Verify Re-aging reversal on interest bearing loan - UC4.1: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST, re-aging is NOT the latest transaction on loan + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false |false | + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false |false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false |false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false |false | +# --- Transaction after re-aging --- + When Admin sets the business date to "16 March 2024" + And Customer makes "AUTOPAY" repayment on "16 March 2024" with 14.18 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | 16 March 2024 | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 14.18 | 14.18 | 0.0 | 0.0 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 31.19 | 14.18 | 0.0 | 70.9 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 16 March 2024 | Repayment | 14.18 | 13.93 | 0.25 | 0.0 | 0.0 | 69.64 | false | false | +# --- Reversal of re-age transaction --- + When Admin sets the business date to "01 April 2024" + And Admin successfully undo Loan re-aging transaction + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 14.18 | 0.0 | 14.18 | 2.83 | + | 3 | 31 | 01 April 2024 | | 50.49 | 16.56 | 0.45 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.77 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.1 | 0.0 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.11 | 0.0 | 0.0 | 102.11 | 31.19 | 0.0 | 14.18 | 70.92 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | true | false | + | 16 March 2024 | Repayment | 14.18 | 13.69 | 0.49 | 0.0 | 0.0 | 69.88 | false | true | + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4235 @AdvancedPaymentAllocation + Scenario: Verify Re-aging on charged-off loan with Equal amortization payable interest - zero interest charge-off - UC10 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + When Admin sets the business date to "01 March 2024" + And Admin does charge-off the loan on "01 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "15 March 2024" + Then Admin fails to create a Loan re-aging transaction with the following data because loan was charged-off: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4236 @AdvancedPaymentAllocation + Scenario: Verify Re-aging on charged-off loan with Equal amortization payable interest - accelerate maturity charge-off - UC11 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + When Admin sets the business date to "01 March 2024" + And Admin does charge-off the loan on "01 March 2024" + 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "15 March 2024" + Then Admin fails to create a Loan re-aging transaction with the following data because loan was charged-off: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4237 @AdvancedPaymentAllocation + Scenario: Verify Re-aging with Equal amortization payable interest - Fees and Interest Split after re-aging - UC12 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + When Admin sets the business date to "15 February 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 May 2024" due date and 10 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 10.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 17.01 | 0.0 | 0.0 | 95.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | Snooze fee | false | Specified due date | 15 May 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.65 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 5 | 30 | 01 May 2024 | | 55.73 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 6 | 31 | 01 June 2024 | | 41.81 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 7 | 30 | 01 July 2024 | | 27.89 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 8 | 31 | 01 August 2024 | | 13.97 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.97 | 0.11 | 1.65 | 0.0 | 15.73 | 0.0 | 0.0 | 0.0 | 15.73 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 10.0 | 0.0 | 111.29 | 17.01 | 0.0 | 0.0 | 94.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 94.28 | 83.57 | 0.71 | 10.0 | 0.0 | 0.0 | false | false | + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | Snooze fee | false | Specified due date | 15 May 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4238 @AdvancedPaymentAllocation + Scenario: Verify Re-aging with Equal amortization payable interest on contract terminated loan - UC13 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_CONTRACT_TERMINATION | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + When Admin sets the business date to "01 March 2024" + And Admin successfully terminates loan contract + 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | + | 01 March 2024 | Contract Termination | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "15 March 2024" + Then Admin fails to create a Loan re-aging transaction with the following data because loan was contract terminated: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + When Loan Pay-off is made on "01 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4241 @AdvancedPaymentAllocation + Scenario: Verify Re-aging on interest bearing loan - equal amortization + payable outstanding interest - reverse-repay, backdated repayment - UC8 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024| | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "01 April 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 67.05 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 55.88 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | + | 5 | 30 | 01 May 2024 | | 44.71 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | + | 6 | 31 | 01 June 2024 | | 33.54 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | + | 7 | 30 | 01 July 2024 | | 22.37 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | + | 8 | 31 | 01 August 2024 | | 11.2 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | + | 9 | 31 | 01 September 2024| | 0.0 | 11.2 | 0.03 | 0.0 | 0.0 | 11.23 | 0.0 | 0.0 | 0.0 | 11.23 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.25 | 0.0 | 0.0 | 101.25 | 34.02 | 0.0 | 0.0 | 67.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 15 March 2024 | Re-age | 67.23 | 67.05 | 0.18 | 0.0 | 0.0 | 0.0 | false | true | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4242 @AdvancedPaymentAllocation + Scenario: Verify Re-aging on interest bearing loan - equal amortization + payable outstanding interest - reverse-repay, reversal of backdated repayment - UC8.1 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 34.02 | 0.0 | 0.0 | 68.03 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 67.05 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 55.88 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | + | 5 | 30 | 01 May 2024 | | 44.71 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | + | 6 | 31 | 01 June 2024 | | 33.54 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | + | 7 | 30 | 01 July 2024 | | 22.37 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | + | 8 | 31 | 01 August 2024 | | 11.2 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | + | 9 | 31 | 01 September 2024| | 0.0 | 11.2 | 0.03 | 0.0 | 0.0 | 11.23 | 0.0 | 0.0 | 0.0 | 11.23 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.25 | 0.0 | 0.0 | 101.25 | 34.02 | 0.0 | 0.0 | 67.23 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 15 March 2024 | Re-age | 67.23 | 67.05 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Customer undo "1"th transaction made on "01 March 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024| | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | true | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | true | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4243 @AdvancedPaymentAllocation + Scenario: Verify Re-aging on interest bearing loan - equal amortization + full outstanding interest - reverse-repay, backdated repayment - UC8 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024| | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "01 April 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 67.05 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 55.87 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | + | 5 | 30 | 01 May 2024 | | 44.69 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | + | 6 | 31 | 01 June 2024 | | 33.51 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | + | 7 | 30 | 01 July 2024 | | 22.33 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | + | 8 | 31 | 01 August 2024 | | 11.15 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | + | 9 | 31 | 01 September 2024| | 0.0 | 11.15 | 0.18 | 0.0 | 0.0 | 11.33 | 0.0 | 0.0 | 0.0 | 11.33 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 34.02 | 0.0 | 0.0 | 68.03 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 15 March 2024 | Re-age | 68.03 | 67.05 | 0.98 | 0.0 | 0.0 | 0.0 | false | true | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4244 @AdvancedPaymentAllocation + Scenario: Verify Re-aging on interest bearing loan - equal amortization + full outstanding interest - reverse-repay, reversal of backdated repayment - UC8.1 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024| | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + When Admin sets the business date to "01 April 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 67.05 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 55.87 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | + | 5 | 30 | 01 May 2024 | | 44.69 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | + | 6 | 31 | 01 June 2024 | | 33.51 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | + | 7 | 30 | 01 July 2024 | | 22.33 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | + | 8 | 31 | 01 August 2024 | | 11.15 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | + | 9 | 31 | 01 September 2024| | 0.0 | 11.15 | 0.18 | 0.0 | 0.0 | 11.33 | 0.0 | 0.0 | 0.0 | 11.33 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 34.02 | 0.0 | 0.0 | 68.03 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 15 March 2024 | Re-age | 68.03 | 67.05 | 0.98 | 0.0 | 0.0 | 0.0 | false | true | + When Customer undo "1"th transaction made on "01 March 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024| | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | true | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | true | + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4249 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with 2nd disb and partial chargeback(with custom pmnt alloc) after re-age - interest bearing multidisb loan with default behaviour - UC1 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 01 April 2024 | 6 | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 96.48 | 23.77 | 0.7 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 6 | 31 | 01 June 2024 | | 72.57 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 7 | 30 | 01 July 2024 | | 48.52 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 8 | 31 | 01 August 2024 | | 24.33 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 9 | 31 | 01 September 2024 | | 0.0 | 24.33 | 0.14 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 3.66 | 0.0 | 0.0 | 153.66 | 17.01 | 0.0 | 0.0 | 136.65 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 96.58 | 40.1 | 1.38 | 0.0 | 0.0 | 41.48 | 0.0 | 0.0 | 0.0 | 41.48 | + | 6 | 31 | 01 June 2024 | | 72.67 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 7 | 30 | 01 July 2024 | | 48.62 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 8 | 31 | 01 August 2024 | | 24.43 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 9 | 31 | 01 September 2024 | | 0.0 | 24.43 | 0.14 | 0.0 | 0.0 | 24.57 | 0.0 | 0.0 | 0.0 | 24.57 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 166.43 | 4.34 | 0.0 | 0.0 | 170.77 | 17.01 | 0.0 | 0.0 | 153.76 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 150.0 | false | false | + + When Admin successfully undo last disbursal + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.46 | 30.22 | 1.09 | 0.0 | 0.0 | 31.31 | 0.0 | 0.0 | 0.0 | 31.31 | + | 6 | 31 | 01 June 2024 | | 42.49 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.44 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.31 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.31 | 0.08 | 0.0 | 0.0 | 14.39 | 0.0 | 0.0 | 0.0 | 14.39 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.43 | 3.48 | 0.0 | 0.0 | 119.91 | 17.01 | 0.0 | 0.0 | 102.9 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4250 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with 2nd disb and partial chargeback(with custom pmnt alloc) after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC2 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.11 | 0.0 | 0.0 | 24.03 | 0.0 | 0.0 | 0.0 | 24.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 1.29 | 0.0 | 0.0 | 151.29 | 17.01 | 0.0 | 0.0 | 134.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 95.71 | 40.36 | 0.7 | 0.0 | 0.0 | 41.06 | 0.0 | 0.0 | 0.0 | 41.06 | + | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.11 | 0.0 | 0.0 | 24.03 | 0.0 | 0.0 | 0.0 | 24.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 166.43 | 1.87 | 0.0 | 0.0 | 168.3 | 17.01 | 0.0 | 0.0 | 151.29 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 150.0 | false | false | + +# --- undo re-age --- # + When Admin successfully undo Loan re-aging transaction + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 4 | 30 | 01 May 2024 | | 67.34 | 49.62 | 1.26 | 0.0 | 0.0 | 50.88 | 0.0 | 0.0 | 0.0 | 50.88 | + | 5 | 31 | 01 June 2024 | | 33.86 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 6 | 30 | 01 July 2024 | | 0.0 | 33.86 | 0.2 | 0.0 | 0.0 | 34.06 | 0.0 | 0.0 | 0.0 | 34.06 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 166.43 | 3.41 | 0.0 | 0.0 | 169.84 | 17.01 | 0.0 | 0.0 | 152.83 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | true | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 150.0 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4251 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with 2nd disb and charge after re-age and undo re-age - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC3 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.26 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.09 | 0.0 | 0.0 | 152.09 | 17.01 | 0.0 | 0.0 | 135.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Admin adds "LOAN_NSF_FEE" due date charge with "05 October 2024" due date and 10 EUR transaction amount + Then Loan Repayment schedule has 10 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.26 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 10 | 34 | 05 October 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.09 | 0.0 | 10.0 | 162.09 | 17.01 | 0.0 | 0.0 | 145.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + 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 | 05 October 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @Skip + @TestRailId:C4252 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with backdated re-aging before 2nd disb - interest bearing multidisb loan with default re-aging behaviour - UC4 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + +# --- backdated re-aging ---# + #TODO - double check: 500 error while do backdated re-age with default behaviour + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 15 March 2024 | 6 | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 4 | 30 | 01 May 2024 | | 96.48 | 23.77 | 0.7 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 5 | 31 | 01 June 2024 | | 72.57 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 6 | 30 | 01 July 2024 | | 48.52 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 7 | 31 | 01 August 2024 | | 24.33 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 8 | 31 | 01 September 2024 | | 0.0 | 24.33 | 0.14 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 3.66 | 0.0 | 0.0 | 153.66 | 17.01 | 0.0 | 0.0 | 136.65 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4253 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with backdated re-aging before 2nd disb - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC5 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + +# --- backdated re-aging ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 15 March 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 0 | 15 March 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 31 | 15 April 2024 | | 95.71 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 6 | 30 | 15 May 2024 | | 71.78 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 7 | 31 | 15 June 2024 | | 47.85 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 8 | 30 | 15 July 2024 | | 23.92 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 9 | 31 | 15 August 2024 | | 0.0 | 23.92 | 0.11 | 0.0 | 0.0 | 24.03 | 0.0 | 0.0 | 0.0 | 24.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 1.29 | 0.0 | 0.0 | 151.29 | 17.01 | 0.0 | 0.0 | 134.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4254 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with backdated re-aging before 2nd disb - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC6 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + +# --- backdated re-aging ---# + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 15 March 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 0 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 31 | 15 April 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 6 | 30 | 15 May 2024 | | 71.78 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 7 | 31 | 15 June 2024 | | 47.85 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 8 | 30 | 15 July 2024 | | 23.92 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 9 | 31 | 15 August 2024 | | 0.0 | 23.92 | 0.26 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.09 | 0.0 | 0.0 | 152.09 | 17.01 | 0.0 | 0.0 | 135.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + +# --- undo last disbursement --- # + When Admin successfully undo last disbursal + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 0 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 31 | 15 April 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 30 | 15 May 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 31 | 15 June 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 30 | 15 July 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 15 August 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4255 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with backdated 2nd disb and chargeback after re-age - interest bearing multidisbursal loan with default behaviour - UC7 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 01 April 2024 | 6 | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 112.04 | 21.53 | 1.27 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 5 | 30 | 01 May 2024 | | 89.89 | 22.15 | 0.65 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 6 | 31 | 01 June 2024 | | 67.61 | 22.28 | 0.52 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 7 | 30 | 01 July 2024 | | 45.2 | 22.41 | 0.39 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 8 | 31 | 01 August 2024 | | 22.66 | 22.54 | 0.26 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 9 | 31 | 01 September 2024 | | 0.0 | 22.66 | 0.13 | 0.0 | 0.0 | 22.79 | 0.0 | 0.0 | 0.0 | 22.79 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 3.8 | 0.0 | 0.0 | 153.8 | 17.01 | 0.0 | 0.0 | 136.79 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | + + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 12 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 112.04 | 21.53 | 1.27 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 5 | 30 | 01 May 2024 | | 89.96 | 33.5 | 1.3 | 0.0 | 0.0 | 34.8 | 0.0 | 0.0 | 0.0 | 34.8 | + | 6 | 31 | 01 June 2024 | | 67.68 | 22.28 | 0.52 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 7 | 30 | 01 July 2024 | | 45.27 | 22.41 | 0.39 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 8 | 31 | 01 August 2024 | | 22.73 | 22.54 | 0.26 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 9 | 31 | 01 September 2024 | | 0.0 | 22.73 | 0.13 | 0.0 | 0.0 | 22.86 | 0.0 | 0.0 | 0.0 | 22.86 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 161.42 | 4.45 | 0.0 | 0.0 | 165.87 | 17.01 | 0.0 | 0.0 | 148.86 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | + | 01 April 2024 | Chargeback | 12.0 | 11.42 | 0.58 | 0.0 | 0.0 | 144.99 | false | false | + + # --- undo last disbursement --- # + # When Admin successfully undo last disbursal + # Then Loan Repayment schedule has 8 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 | + # | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + # | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + # | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + # | 3 | 14 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # | 4 | 31 | 15 April 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # | 5 | 30 | 15 May 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # | 6 | 31 | 15 June 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # | 7 | 30 | 15 July 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # | 8 | 31 | 15 August 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # Then Loan Repayment schedule has the following data in Total row: + # | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + # | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + # Then Loan Transactions tab has the following data: + # | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + # | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + # | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + # | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4256 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with backdated 2nd disb and charge after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC8 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 1.42 | 0.0 | 0.0 | 151.42 | 17.01 | 0.0 | 0.0 | 134.41 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | + + When Admin adds "LOAN_NSF_FEE" due date charge with "05 May 2024" due date and 10 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 10.0 | 32.4 | 0.0 | 0.0 | 0.0 | 32.4 | + | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 1.42 | 0.0 | 10.0 | 161.42 | 17.01 | 0.0 | 0.0 | 144.41 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | + + # --- undo last disbursement --- # + # When Admin successfully undo last disbursal + # Then Loan Repayment schedule has 8 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 | + # | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + # | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + # | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + # | 3 | 14 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # | 4 | 31 | 15 April 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # | 5 | 30 | 15 May 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # | 6 | 31 | 15 June 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # | 7 | 30 | 15 July 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # | 8 | 31 | 15 August 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + # Then Loan Repayment schedule has the following data in Total row: + # | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + # | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + # Then Loan Transactions tab has the following data: + # | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + # | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + # | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + # | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4257 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with backdated 2nd disb after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC9 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 111.3 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 5 | 30 | 01 May 2024 | | 89.03 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 6 | 31 | 01 June 2024 | | 66.76 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 7 | 30 | 01 July 2024 | | 44.49 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 8 | 31 | 01 August 2024 | | 22.22 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | + | 9 | 31 | 01 September 2024 | | 0.0 | 22.22 | 0.39 | 0.0 | 0.0 | 22.61 | 0.0 | 0.0 | 0.0 | 22.61 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.82 | 0.0 | 0.0 | 152.82 | 17.01 | 0.0 | 0.0 | 135.81 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 135.81 | 133.57 | 2.24 | 0.0 | 0.0 | 0.0 | false | true | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4258 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with CI after re-age with over applied amount - interest bearing multidisb loan with default behaviour - UC10 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 01 April 2024 | 6 | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 96.48 | 23.77 | 0.7 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 6 | 31 | 01 June 2024 | | 72.57 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 7 | 30 | 01 July 2024 | | 48.52 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 8 | 31 | 01 August 2024 | | 24.33 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 9 | 31 | 01 September 2024 | | 0.0 | 24.33 | 0.14 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 3.66 | 0.0 | 0.0 | 153.66 | 17.01 | 0.0 | 0.0 | 136.65 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 14.3 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | 01 April 2024 | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 14.3 | 0.0 | 0.0 | 0.0 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 96.48 | 23.77 | 0.7 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 6 | 31 | 01 June 2024 | | 72.57 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 7 | 30 | 01 July 2024 | | 48.52 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 8 | 31 | 01 August 2024 | | 24.33 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 9 | 31 | 01 September 2024 | | 0.0 | 24.33 | 0.14 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 3.66 | 0.0 | 0.0 | 153.66 | 31.31 | 0.0 | 0.0 | 122.35 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 01 April 2024 | Repayment | 14.3 | 13.32 | 0.98 | 0.0 | 0.0 | 120.25 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4259 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with CI after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC11 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.11 | 0.0 | 0.0 | 24.03 | 0.0 | 0.0 | 0.0 | 24.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 1.29 | 0.0 | 0.0 | 151.29 | 17.01 | 0.0 | 0.0 | 134.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Admin successfully undo Loan re-aging transaction + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | true | false | + | 01 April 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4260 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with CI after re-age - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC12 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.26 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.09 | 0.0 | 0.0 | 152.09 | 17.01 | 0.0 | 0.0 | 135.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4261 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with backdated CI and CI adj after re-age - interest bearing multidisb loan default behaviour - UC13 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 01 April 2024 | 6 | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024| | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 March 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 112.04 | 21.53 | 1.27 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 5 | 30 | 01 May 2024 | | 89.89 | 22.15 | 0.65 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 6 | 31 | 01 June 2024 | | 67.61 | 22.28 | 0.52 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 7 | 30 | 01 July 2024 | | 45.2 | 22.41 | 0.39 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 8 | 31 | 01 August 2024 | | 22.66 | 22.54 | 0.26 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 9 | 31 | 01 September 2024| | 0.0 | 22.66 | 0.13 | 0.0 | 0.0 | 22.79 | 0.0 | 0.0 | 0.0 | 22.79 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 3.8 | 0.0 | 0.0 | 153.8 | 17.01 | 0.0 | 0.0 | 136.79 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | + + And Admin adds capitalized income adjustment with "AUTOPAY" payment type to the loan on "01 April 2024" with "20" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 112.04 | 21.53 | 1.27 | 0.0 | 0.0 | 22.8 | 20.0 | 0.0 | 0.0 | 2.8 | + | 5 | 30 | 01 May 2024 | | 89.89 | 22.15 | 0.65 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 6 | 31 | 01 June 2024 | | 67.61 | 22.28 | 0.52 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 7 | 30 | 01 July 2024 | | 45.2 | 22.41 | 0.39 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 8 | 31 | 01 August 2024 | | 22.66 | 22.54 | 0.26 | 0.0 | 0.0 | 22.8 | 0.0 | 0.0 | 0.0 | 22.8 | + | 9 | 31 | 01 September 2024| | 0.0 | 22.66 | 0.13 | 0.0 | 0.0 | 22.79 | 0.0 | 0.0 | 0.0 | 22.79 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 3.8 | 0.0 | 0.0 | 153.8 | 37.01 | 0.0 | 0.0 | 116.79 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | + | 01 April 2024 | Capitalized Income Adjustment | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 113.57 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4262 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with 2nd disb and CI after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC14 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 April 2024" with "30" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | | | 01 April 2024 | | 30.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 79.71 | 19.93 | 0.12 | 0.0 | 0.0 | 20.05 | 0.0 | 0.0 | 0.0 | 20.05 | + | 6 | 31 | 01 June 2024 | | 59.78 | 19.93 | 0.12 | 0.0 | 0.0 | 20.05 | 0.0 | 0.0 | 0.0 | 20.05 | + | 7 | 30 | 01 July 2024 | | 39.85 | 19.93 | 0.12 | 0.0 | 0.0 | 20.05 | 0.0 | 0.0 | 0.0 | 20.05 | + | 8 | 31 | 01 August 2024 | | 19.92 | 19.93 | 0.12 | 0.0 | 0.0 | 20.05 | 0.0 | 0.0 | 0.0 | 20.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 19.92 | 0.11 | 0.0 | 0.0 | 20.03 | 0.0 | 0.0 | 0.0 | 20.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 130.0 | 1.29 | 0.0 | 0.0 | 131.29 | 17.01 | 0.0 | 0.0 | 114.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 30.0 | 0.0 | 0.0 | 0.0 | 0.0 | 113.57 | false | false | + + And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 April 2024" with "20" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | | | 01 April 2024 | | 30.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | | | 01 April 2024 | | 20.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.11 | 0.0 | 0.0 | 24.03 | 0.0 | 0.0 | 0.0 | 24.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 1.29 | 0.0 | 0.0 | 151.29 | 17.01 | 0.0 | 0.0 | 134.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 30.0 | 0.0 | 0.0 | 0.0 | 0.0 | 113.57 | false | false | + | 01 April 2024 | Capitalized Income | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4263 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with backdated re-aging after CI with CI undo afterwards - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC15 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "01 May 2024" + And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 May 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 34.01 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 May 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 31 | 01 June 2024 | | 42.28 | 41.73 | 0.49 | 0.0 | 0.0 | 42.22 | 0.0 | 0.0 | 0.0 | 42.22 | + | 6 | 30 | 01 July 2024 | | 0.0 | 42.28 | 0.25 | 0.0 | 0.0 | 42.53 | 0.0 | 0.0 | 0.0 | 42.53 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.79 | 0.0 | 0.0 | 152.79 | 17.01 | 0.0 | 0.0 | 135.78 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 May 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 April 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 0 | 01 April 2024 | | 69.64 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | | | 01 May 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 6 | 31 | 01 June 2024 | | 79.28 | 26.43 | 0.26 | 0.0 | 0.0 | 26.69 | 0.0 | 0.0 | 0.0 | 26.69 | + | 7 | 30 | 01 July 2024 | | 52.85 | 26.43 | 0.26 | 0.0 | 0.0 | 26.69 | 0.0 | 0.0 | 0.0 | 26.69 | + | 8 | 31 | 01 August 2024 | | 26.42 | 26.43 | 0.26 | 0.0 | 0.0 | 26.69 | 0.0 | 0.0 | 0.0 | 26.69 | + | 9 | 31 | 01 September 2024 | | 0.0 | 26.42 | 0.27 | 0.0 | 0.0 | 26.69 | 0.0 | 0.0 | 0.0 | 26.69 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.15 | 0.0 | 0.0 | 152.15 | 17.01 | 0.0 | 0.0 | 135.14 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 April 2024 | Re-age | 85.14 | 83.57 | 1.57 | 0.0 | 0.0 | 0.0 | false | false | + | 01 May 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + + When Admin sets the business date to "02 May 2024" + When Customer undo "1"th "Capitalized Income" transaction made on "01 May 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 April 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | 01 April 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 0 | 01 April 2024 | | 69.64 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.27 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 17.01 | 0.0 | 0.0 | 85.14 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 April 2024 | Re-age | 85.14 | 83.57 | 1.57 | 0.0 | 0.0 | 0.0 | false | false | + | 01 May 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | true | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4264 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with 2nd disb and chargeback after re-age - interest bearing multidisb loan that expects tranches with default behaviour - UC16 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin creates a fully customized loan with disbursements details and 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 | 1st_tranche_disb_expected_date | 1st_tranche_disb_principal | 2nd_tranche_disb_expected_date | 2nd_tranche_disb_principal | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_EXPECT_TRANCHE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 01 January 2024 | 100.0 | 01 April 2024 | 50.0 | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + Then Loan Tranche Details tab has the following data: + | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | + | 01 January 2024 | 01 January 2024 | 100.0 | | + | 01 April 2024 | | 50.0 | | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 01 April 2024 | 6 | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 5 | 30 | 01 May 2024 | | 106.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 92.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 78.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 64.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 50.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 96.48 | 23.77 | 0.7 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 6 | 31 | 01 June 2024 | | 72.57 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 7 | 30 | 01 July 2024 | | 48.52 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 8 | 31 | 01 August 2024 | | 24.33 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 9 | 31 | 01 September 2024 | | 0.0 | 24.33 | 0.14 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 3.66 | 0.0 | 0.0 | 153.66 | 17.01 | 0.0 | 0.0 | 136.65 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + Then Loan Tranche Details tab has the following data: + | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | + | 01 January 2024 | 01 January 2024 | 100.0 | | + | 01 April 2024 | 01 April 2024 | 50.0 | | + + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 12 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 30 | 01 May 2024 | | 96.55 | 35.7 | 0.77 | 0.0 | 0.0 | 36.47 | 0.0 | 0.0 | 0.0 | 36.47 | + | 6 | 31 | 01 June 2024 | | 72.64 | 23.91 | 0.56 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 7 | 30 | 01 July 2024 | | 48.59 | 24.05 | 0.42 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 8 | 31 | 01 August 2024 | | 24.4 | 24.19 | 0.28 | 0.0 | 0.0 | 24.47 | 0.0 | 0.0 | 0.0 | 24.47 | + | 9 | 31 | 01 September 2024 | | 0.0 | 24.4 | 0.14 | 0.0 | 0.0 | 24.54 | 0.0 | 0.0 | 0.0 | 24.54 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 162.0 | 3.73 | 0.0 | 0.0 | 165.73 | 17.01 | 0.0 | 0.0 | 148.72 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 01 April 2024 | Chargeback | 12.0 | 12.0 | 0.0 | 0.0 | 0.0 | 145.57 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4265 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with backdated 2nd disb and charge after re-age - interest bearing multidisb loan that expects tranches with equal amortization; outstanding payable interest - UC17 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin creates a fully customized loan with disbursements details and 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 | 1st_tranche_disb_expected_date | 1st_tranche_disb_principal | 2nd_tranche_disb_expected_date | 2nd_tranche_disb_principal | + | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_EXPECT_TRANCHE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 01 January 2024 | 100.0 | 01 March 2024 | 50.0 | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 3 | 31 | 01 April 2024 | | 100.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + Then Loan Tranche Details tab has the following data: + | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | + | 01 January 2024 | 01 January 2024 | 100.0 | | + | 01 March 2024 | | 50.0 | | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 3 | 31 | 01 April 2024 | | 100.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + When Admin sets the business date to "01 April 2024" + When Admin adds "LOAN_NSF_FEE" due date charge with "05 October 2024" due date and 10 EUR transaction amount + Then Loan Repayment schedule has 10 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + | 10 | 34 | 05 October 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 10.0 | 111.29 | 17.01 | 0.0 | 0.0 | 94.28 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + And 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 | 05 October 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + + When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 10 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | + | 10 | 34 | 05 October 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 1.42 | 0.0 | 10.0 | 161.42 | 17.01 | 0.0 | 0.0 | 144.41 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | + Then Loan Tranche Details tab has the following data: + | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | + | 01 January 2024 | 01 January 2024 | 100.0 | | + | 01 March 2024 | 01 March 2024 | 50.0 | | + + And Customer makes "AUTOPAY" repayment on "01 April 2024" with 22.4 EUR transaction amount + Then Loan Repayment schedule has 10 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | 01 April 2024 | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 22.4 | 0.0 | 0.0 | 0.0 | + | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | + | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | + | 10 | 34 | 05 October 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 1.42 | 0.0 | 10.0 | 161.42 | 39.41 | 0.0 | 0.0 | 122.01 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | + | 01 April 2024 | Repayment | 22.4 | 22.26 | 0.14 | 0.0 | 0.0 | 111.31 | false | false | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4266 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with backdated 2nd disb after re-age - interest bearing multidisb loan that expects tranches with equal amortization; outstanding full interest - UC18 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin creates a fully customized loan with disbursements details and 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 | 1st_tranche_disb_expected_date | 1st_tranche_disb_principal | 2nd_tranche_disb_expected_date | 2nd_tranche_disb_principal | + | LP2_ADV_PYMNT_INT_DAILY_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_EXPECT_TRANCHE_APPROVED_OVER_APPLIED | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 01 January 2024 | 100.0 | 01 April 2024 | 50.0 | + And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + Then Loan Tranche Details tab has the following data: + | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | + | 01 January 2024 | 01 January 2024 | 100.0 | | + | 01 April 2024 | | 50.0 | | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | + | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + +# --- 2nd disbursement ---# + When Admin sets the business date to "01 April 2024" + When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | + | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + +# --- backdated re-aging on March, 15 2024 --- # + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 15 March 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 0 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 31 | 15 April 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 6 | 30 | 15 May 2024 | | 71.78 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 7 | 31 | 15 June 2024 | | 47.85 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 8 | 30 | 15 July 2024 | | 23.92 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | 9 | 31 | 15 August 2024 | | 0.0 | 23.92 | 0.26 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 2.09 | 0.0 | 0.0 | 152.09 | 17.01 | 0.0 | 0.0 | 135.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + +# --- add 2nd expected disbursement details with expected disbursement date - 15 Apr, 2024 --- # + And Admin successfully add disbursement detail to the loan on "15 April 2024" with 50 EUR transaction amount + Then Loan Tranche Details tab has the following data: + | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | + | 01 January 2024 | 01 January 2024 | 100.0 | | + | 01 April 2024 | 01 April 2024 | 50.0 | | + | 15 April 2024 | | 50.0 | 50.0 | + + When Admin sets the business date to "15 April 2024" + When Admin successfully disburse the loan on "15 April 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 0 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 5 | 31 | 15 April 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | + | | | 15 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 6 | 30 | 15 May 2024 | | 109.28 | 36.43 | 0.25 | 0.0 | 0.0 | 36.68 | 0.0 | 0.0 | 0.0 | 36.68 | + | 7 | 31 | 15 June 2024 | | 72.85 | 36.43 | 0.25 | 0.0 | 0.0 | 36.68 | 0.0 | 0.0 | 0.0 | 36.68 | + | 8 | 30 | 15 July 2024 | | 36.42 | 36.43 | 0.25 | 0.0 | 0.0 | 36.68 | 0.0 | 0.0 | 0.0 | 36.68 | + | 9 | 31 | 15 August 2024 | | 0.0 | 36.42 | 0.26 | 0.0 | 0.0 | 36.68 | 0.0 | 0.0 | 0.0 | 36.68 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 200.0 | 2.09 | 0.0 | 0.0 | 202.09 | 17.01 | 0.0 | 0.0 | 185.08 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | + | 15 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 183.57 | false | false | + Then Loan Tranche Details tab has the following data: + | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | + | 01 January 2024 | 01 January 2024 | 100.0 | | + | 01 April 2024 | 01 April 2024 | 50.0 | | + | 15 April 2024 | 15 April 2024 | 50.0 | 50.0 | + + When Loan Pay-off is made on "01 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4272 @AdvancedPaymentAllocation + Scenario: Verify Re-aging on interest bearing, no interest recalculation loan is not allowed (not implemented) + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE" loan product "DEFAULT" transaction type to "NEXT_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_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + When Admin creates a Loan re-aging transaction by Loan external ID with the following data, but fails with 501 error code: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 16 January 2025 | 5 | + When Loan Pay-off is made on "01 January 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4273 + Scenario: Verify Re-aging with interest pause: UC1: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST, interest pause before re-aging + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Interest pause --- + When Admin sets the business date to "02 February 2024" + And Create an interest pause period with start date "10 February 2024" and end date "10 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | +# TODO check numbers + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.17 | 0.0 | 0.0 | 14.1 | 0.0 | 0.0 | 0.0 | 14.1 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.17 | 0.0 | 0.0 | 14.1 | 0.0 | 0.0 | 0.0 | 14.1 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.17 | 0.0 | 0.0 | 14.1 | 0.0 | 0.0 | 0.0 | 14.1 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.17 | 0.0 | 0.0 | 14.1 | 0.0 | 0.0 | 0.0 | 14.1 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.17 | 0.0 | 0.0 | 14.1 | 0.0 | 0.0 | 0.0 | 14.1 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.15 | 0.0 | 0.0 | 14.07 | 0.0 | 0.0 | 0.0 | 14.07 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.58 | 0.0 | 0.0 | 101.58 | 17.01 | 0.0 | 0.0 | 84.57 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.57 | 83.57 | 1.0 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4274 + Scenario: Verify Re-aging with interest pause: UC2: Interest handling: DEFAULT, interest pause before re-aging + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Interest pause --- + When Admin sets the business date to "02 February 2024" + And Create an interest pause period with start date "10 February 2024" and end date "10 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 56.04 | 13.8 | 0.41 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 42.16 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 28.2 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 14.15 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.15 | 0.08 | 0.0 | 0.0 | 14.23 | 0.0 | 0.0 | 0.0 | 14.23 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + +# TODO check and unSkip when PS-2934 is done + @Skip @TestRailId:C4275 + Scenario: Verify Re-aging with interest pause: UC3: Interest handling: DEFAULT, interest pause overlapping re-aging + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Interest pause --- + When Admin sets the business date to "02 February 2024" + And Create an interest pause period with start date "10 February 2024" and end date "10 May 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.68 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 32.67 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 15.8 | 16.87 | 0.14 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 15.8 | 0.09 | 0.0 | 0.0 | 15.89 | 0.0 | 0.0 | 0.0 | 15.89 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.94 | 0.0 | 0.0 | 100.94 | 17.01 | 0.0 | 0.0 | 83.93 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.68 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 32.67 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 15.8 | 16.87 | 0.14 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 15.8 | 0.09 | 0.0 | 0.0 | 15.89 | 0.0 | 0.0 | 0.0 | 15.89 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.94 | 0.0 | 0.0 | 100.94 | 17.01 | 0.0 | 0.0 | 83.93 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +#TODO check interests +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 56.04 | 13.8 | 0.41 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 42.16 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 28.2 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 14.15 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.15 | 0.08 | 0.0 | 0.0 | 14.23 | 0.0 | 0.0 | 0.0 | 14.23 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4276 + Scenario: Verify Re-aging with interest pause: UC4: Interest handling: DEFAULT, interest pause after re-aging + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + # --- Interest pause --- + When Admin sets the business date to "02 April 2024" + And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.08 | 14.17 | 0.13 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 41.78 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 27.65 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 13.51 | 14.14 | 0.16 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.51 | 0.08 | 0.0 | 0.0 | 13.59 | 0.0 | 0.0 | 0.0 | 13.59 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.1 | 0.0 | 0.0 | 102.1 | 17.01 | 0.0 | 0.0 | 85.09 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + + @Skip @TestRailId:C4277 + Scenario: Verify Re-aging with interest pause: UC4.1: Interest handling: WAIVE_INTEREST, interest pause after re-aging + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | WAIVE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + # --- Interest pause --- + When Admin sets the business date to "02 April 2024" + And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.08 | 14.17 | 0.13 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 41.78 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 27.65 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 13.51 | 14.14 | 0.16 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.51 | 0.08 | 0.0 | 0.0 | 13.59 | 0.0 | 0.0 | 0.0 | 13.59 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.1 | 0.0 | 0.0 | 102.1 | 17.01 | 0.0 | 0.0 | 85.09 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4278 + Scenario: Verify Re-aging with interest pause: UC4.2: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST, interest pause after re-aging + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + # --- Interest pause --- + When Admin sets the business date to "02 April 2024" + And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4279 + Scenario: Verify Re-aging with interest pause: UC4.3: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST, interest pause after re-aging + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + # --- Interest pause --- + When Admin sets the business date to "02 April 2024" + And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4280 + Scenario: Verify Re-aging with interest pause: UC5: Interest handling: DEFAULT, backdated interest pause created after re-aging, backdated to after re-aging + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + # --- Interest pause --- + When Admin sets the business date to "01 July 2024" + And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.08 | 14.17 | 0.13 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 41.78 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 27.82 | 13.96 | 0.34 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 13.68 | 14.14 | 0.16 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.68 | 0.08 | 0.0 | 0.0 | 13.76 | 0.0 | 0.0 | 0.0 | 13.76 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.27 | 0.0 | 0.0 | 102.27 | 17.01 | 0.0 | 0.0 | 85.26 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "01 July 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + # TODO check and unSkip when PS-2934 is done + @Skip @TestRailId:C4281 + Scenario: Verify Re-aging with interest pause: UC6: Interest handling: DEFAULT, backdated interest pause created after re-aging, overlapping (start date before re-aging, end date after re-aging) + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + # --- Interest pause --- + When Admin sets the business date to "01 July 2024" + And Create an interest pause period with start date "10 February 2024" and end date "10 June 2024" +# TODO check interests + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.08 | 14.17 | 0.13 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 41.78 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 27.82 | 13.96 | 0.34 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 13.68 | 14.14 | 0.16 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.68 | 0.08 | 0.0 | 0.0 | 13.76 | 0.0 | 0.0 | 0.0 | 13.76 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.27 | 0.0 | 0.0 | 102.27 | 17.01 | 0.0 | 0.0 | 85.26 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "01 July 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + +# TODO check and unSkip after PS-2922 is done + @Skip @TestRailId:C4282 + Scenario: Verify Re-aging with interest pause: UC7: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST, multiple pauses, early repayment, mid-pause repayment + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid - early repayment--- + When Admin sets the business date to "14 January 2024" + And Customer makes "AUTOPAY" repayment on "14 January 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.23 | 0.78 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.01 | 17.01 | 0.0 | 84.99 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | + # --- Interest pause --- + And Create an interest pause period with start date "15 January 2024" and end date "10 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.22 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.48 | 16.74 | 0.27 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 32.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 15.94 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 15.94 | 0.09 | 0.0 | 0.0 | 16.03 | 0.0 | 0.0 | 0.0 | 16.03 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.08 | 0.0 | 0.0 | 101.08 | 17.01 | 17.01 | 0.0 | 84.07 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.22 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.48 | 16.74 | 0.27 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 32.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 15.94 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 15.94 | 0.09 | 0.0 | 0.0 | 16.03 | 0.0 | 0.0 | 0.0 | 16.03 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.08 | 0.0 | 0.0 | 101.08 | 17.01 | 17.01 | 0.0 | 84.07 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | +#TODO check extra line + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.36 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 5 | 30 | 01 May 2024 | | 55.49 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 6 | 31 | 01 June 2024 | | 41.62 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 7 | 30 | 01 July 2024 | | 27.75 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 8 | 31 | 01 August 2024 | | 13.88 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.88 | 0.03 | 0.0 | 0.0 | 13.91 | 0.0 | 0.0 | 0.0 | 13.91 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.32 | 0.0 | 0.0 | 100.32 | 17.01 | 17.01 | 0.0 | 83.31 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | + | 15 March 2024 | Re-age | 83.31 | 83.23 | 0.08 | 0.0 | 0.0 | 0.0 | false | false | + # --- 2nd Interest pause --- + When Admin sets the business date to "02 April 2024" + And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" + #TODO check extra line + interests + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.36 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 5 | 30 | 01 May 2024 | | 55.49 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 6 | 31 | 01 June 2024 | | 41.62 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 7 | 30 | 01 July 2024 | | 27.75 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 8 | 31 | 01 August 2024 | | 13.88 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.88 | 0.03 | 0.0 | 0.0 | 13.91 | 0.0 | 0.0 | 0.0 | 13.91 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.32 | 0.0 | 0.0 | 100.32 | 17.01 | 17.01 | 0.0 | 83.31 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | + | 15 March 2024 | Re-age | 83.31 | 83.23 | 0.08 | 0.0 | 0.0 | 0.0 | false | false | +# --- Mid-pause repayment --- + When Admin sets the business date to "01 May 2024" + And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | 01 May 2024 | 69.36 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 13.88 | 0.0 | 13.88| 0.0 | + | 5 | 30 | 01 May 2024 | | 55.49 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 3.13 | 0.0 | 0.0 | 10.75 | + | 6 | 31 | 01 June 2024 | | 41.62 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 7 | 30 | 01 July 2024 | | 27.75 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 8 | 31 | 01 August 2024 | | 13.88 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.88 | 0.03 | 0.0 | 0.0 | 13.91 | 0.0 | 0.0 | 0.0 | 13.91 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.32 | 0.0 | 0.0 | 100.32 | 34.02 | 17.01 | 13.88 | 66.3 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | + | 15 March 2024 | Re-age | 83.31 | 83.23 | 0.08 | 0.0 | 0.0 | 0.0 | false | false | + | 01 May 2024 | Repayment | 17.01 | 16.99 | 0.02 | 0.0 | 0.0 | 66.24 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "01 May 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4283 + Scenario: Verify Re-aging with interest pause: UC8: Interest handling: DEFAULT, interest pause, fee, payout refund, CBR + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Interest pause --- + When Admin sets the business date to "02 February 2024" + And Create an interest pause period with start date "10 February 2024" and end date "10 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 56.04 | 13.8 | 0.41 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 42.16 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 28.2 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 14.15 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.15 | 0.08 | 0.0 | 0.0 | 14.23 | 0.0 | 0.0 | 0.0 | 14.23 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | + # --- Interest pause --- + When Admin sets the business date to "02 April 2024" + And Create an interest pause period with start date "10 April 2024" and end date "10 July 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 55.76 | 14.08 | 0.13 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 41.55 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 27.34 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 13.24 | 14.1 | 0.11 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.24 | 0.08 | 0.0 | 0.0 | 13.32 | 0.0 | 0.0 | 0.0 | 13.32 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | + # --- Multiple types of transactions --- + When Admin sets the business date to "15 April 2024" + And Admin adds "LOAN_NSF_FEE" due date charge with "15 April 2024" due date and 25 EUR transaction amount + When Admin sets the business date to "16 April 2024" + And Customer makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "16 April 2024" with 40 EUR transaction amount and self-generated Idempotency key + When Admin sets the business date to "17 April 2024" + And Customer makes "AUTOPAY" repayment on "17 April 2024" with 80 EUR transaction amount + When Admin sets the business date to "18 April 2024" + Then Loan status will be "OVERPAID" + And Loan has 11.34 overpaid amount + And Admin makes Credit Balance Refund transaction on "18 April 2024" with 11.34 EUR transaction amount + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | 16 April 2024 | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 14.21 | 0.0 | 14.21 | 0.0 | + | 5 | 30 | 01 May 2024 | 17 April 2024 | 55.76 | 14.08 | 0.13 | 0.0 | 25.0 | 39.21 | 39.21 | 39.21 | 0.0 | 0.0 | + | 6 | 31 | 01 June 2024 | 17 April 2024 | 41.55 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 14.21 | 14.21 | 0.0 | 0.0 | + | 7 | 30 | 01 July 2024 | 17 April 2024 | 27.34 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 14.21 | 14.21 | 0.0 | 0.0 | + | 8 | 31 | 01 August 2024 | 17 April 2024 | 13.13 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 14.21 | 14.21 | 0.0 | 0.0 | + | 9 | 31 | 01 September 2024 | 17 April 2024 | 0.0 | 13.13 | 0.0 | 0.0 | 0.0 | 13.13 | 13.13 | 13.13 | 0.0 | 0.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.19 | 0.0 | 25.0 | 126.19 | 126.19 | 94.97 | 14.21 | 0.0 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | + | 01 April 2024 | Accrual Activity | 0.48 | 0.0 | 0.48 | 0.0 | 0.0 | 0.0 | false | false | + | 16 April 2024 | Payout Refund | 40.0 | 14.52 | 0.48 | 0.0 | 25.0 | 69.05 | false | false | + | 16 April 2024 | Interest Refund | 0.52 | 0.39 | 0.13 | 0.0 | 0.0 | 68.66 | false | false | + | 17 April 2024 | Repayment | 80.0 | 68.66 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + | 17 April 2024 | Accrual | 25.58 | 0.0 | 0.58 | 0.0 | 25.0 | 0.0 | false | false | + | 17 April 2024 | Accrual Activity | 25.13 | 0.0 | 0.13 | 0.0 | 25.0 | 0.0 | false | false | + | 18 April 2024 | Credit Balance Refund | 11.34 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4284 + Scenario: Verify Re-aging with interest pause: UC9: Interest handling: DEFAULT, interest pause, charge-off + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Interest pause --- + When Admin sets the business date to "02 February 2024" + And Create an interest pause period with start date "10 February 2024" and end date "10 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 56.04 | 13.8 | 0.41 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 42.16 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 28.2 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 14.15 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.15 | 0.08 | 0.0 | 0.0 | 14.23 | 0.0 | 0.0 | 0.0 | 14.23 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | + # --- Interest pause --- + When Admin sets the business date to "02 April 2024" + And Create an interest pause period with start date "10 April 2024" and end date "10 July 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 55.76 | 14.08 | 0.13 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 41.55 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 27.34 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 13.24 | 14.1 | 0.11 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.24 | 0.08 | 0.0 | 0.0 | 13.32 | 0.0 | 0.0 | 0.0 | 13.32 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | + # --- Charge-off --- + When Admin sets the business date to "15 April 2024" + And Admin does charge-off the loan on "15 April 2024" + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 15 March 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 April 2024 | | 69.98 | 13.59 | 0.62 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 4 | 30 | 01 May 2024 | | 55.87 | 14.11 | 0.13 | 0.0 | 0.0 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | + | 5 | 31 | 01 June 2024 | | 41.63 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | + | 6 | 30 | 01 July 2024 | | 27.39 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | + | 7 | 31 | 01 August 2024 | | 13.26 | 14.13 | 0.11 | 0.0 | 0.0 | 14.24 | 0.0 | 0.0 | 0.0 | 14.24 | + | 8 | 31 | 01 September 2024 | | 0.0 | 13.26 | 0.08 | 0.0 | 0.0 | 13.34 | 0.0 | 0.0 | 0.0 | 13.34 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.52 | 0.0 | 0.0 | 101.52 | 17.01 | 0.0 | 0.0 | 84.51 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.7 | 83.57 | 0.13 | 0.0 | 0.0 | 0.0 | false | true | + | 15 April 2024 | Accrual | 1.33 | 0.0 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | + | 15 April 2024 | Charge-off | 84.51 | 83.57 | 0.94 | 0.0 | 0.0 | 0.0 | false | false | +# --- Charge-off undo --- + When Admin sets the business date to "16 April 2024" + And Admin does a charge-off undo the loan + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 55.76 | 14.08 | 0.13 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 41.55 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 27.34 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 13.24 | 14.1 | 0.11 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.24 | 0.08 | 0.0 | 0.0 | 13.32 | 0.0 | 0.0 | 0.0 | 13.32 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | true | + | 15 April 2024 | Accrual | 1.33 | 0.0 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | + | 15 April 2024 | Charge-off | 84.51 | 83.57 | 0.94 | 0.0 | 0.0 | 0.0 | true | false | +# --- Close loan --- + When Loan Pay-off is made on "16 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4285 + Scenario: Verify Re-aging with interest pause: UC10: Interest handling: DEFAULT, interest pause update, delete + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Interest pause --- + When Admin sets the business date to "02 February 2024" + And Create an interest pause period with start date "10 February 2024" and end date "10 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 56.04 | 13.8 | 0.41 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 42.16 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 28.2 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 14.15 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.15 | 0.08 | 0.0 | 0.0 | 14.23 | 0.0 | 0.0 | 0.0 | 14.23 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | + # --- Interest pause --- + When Admin sets the business date to "02 April 2024" + And Create an interest pause period with start date "10 April 2024" and end date "10 July 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 55.76 | 14.08 | 0.13 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 41.55 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 27.34 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 13.24 | 14.1 | 0.11 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.24 | 0.08 | 0.0 | 0.0 | 13.32 | 0.0 | 0.0 | 0.0 | 13.32 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | + # --- Interest pause update --- + When Admin sets the business date to "15 April 2024" + And Update the interest pause period with start date "10 April 2024" and end date "25 May 2024" + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 55.76 | 14.08 | 0.13 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 41.62 | 14.14 | 0.07 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 27.65 | 13.97 | 0.24 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 13.6 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.6 | 0.08 | 0.0 | 0.0 | 13.68 | 0.0 | 0.0 | 0.0 | 13.68 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.74 | 0.0 | 0.0 | 101.74 | 17.01 | 0.0 | 0.0 | 84.73 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | +# --- Interest pause delete --- + When Admin sets the business date to "16 April 2024" + And Delete the interest pause period + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.84 | 13.73 | 0.48 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 5 | 30 | 01 May 2024 | | 56.08 | 13.76 | 0.45 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 6 | 31 | 01 June 2024 | | 42.2 | 13.88 | 0.33 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 7 | 30 | 01 July 2024 | | 28.24 | 13.96 | 0.25 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 8 | 31 | 01 August 2024 | | 14.19 | 14.05 | 0.16 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.19 | 0.08 | 0.0 | 0.0 | 14.27 | 0.0 | 0.0 | 0.0 | 14.27 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.33 | 0.0 | 0.0 | 102.33 | 17.01 | 0.0 | 0.0 | 85.32 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 83.78 | 83.57 | 0.21 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "16 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + +# TODO check and unSkip when PS-2937 is done + @Skip @TestRailId:C4286 + Scenario: Verify Re-aging with loan reschedule: UC1.1: Interest handling: DEFAULT, reschedule - extra terms + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Reschedule before re-age --- + When Admin sets the business date to "02 February 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 March 2024 | 02 February 2024 | | | | 2 | | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + # --- Reschedule after re-age --- + When Admin sets the business date to "02 April 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 July 2024 | 02 April 2024 | | | | 2 | | +# TODO check numbers + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 10 | 30 | 01 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 11 | 31 | 01 November 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + # TODO check and unSkip when PS-2937 is done + @Skip @TestRailId:C4287 + Scenario: Verify Re-aging with loan reschedule: UC1.2: Interest handling: WAIVE_INTEREST, reschedule - extra terms + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Reschedule --- + When Admin sets the business date to "02 February 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 March 2024 | 02 February 2024 | | | | 2 | | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | WAIVE_INTEREST | + # TODO check numbers + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Reschedule after re-age --- + When Admin sets the business date to "02 April 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 July 2024 | 02 April 2024 | | | | 2 | | +# TODO check numbers + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 10 | 30 | 01 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 11 | 31 | 01 November 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + +# TODO check and unSkip when PS-2937 is done + @Skip @TestRailId:C4288 + Scenario: Verify Re-aging with loan reschedule: UC1.3: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST, reschedule - extra terms + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Reschedule --- + When Admin sets the business date to "02 February 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 March 2024 | 02 February 2024 | | | | 2 | | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + # TODO check numbers + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Reschedule after re-age --- + When Admin sets the business date to "02 April 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 July 2024 | 02 April 2024 | | | | 2 | | +# TODO check numbers + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 10 | 30 | 01 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 11 | 31 | 01 November 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + +# TODO check and unSkip when PS-2937 is done + @Skip @TestRailId:C4289 + Scenario: Verify Re-aging with loan reschedule: UC1.4: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST, reschedule - extra terms + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Reschedule --- + When Admin sets the business date to "02 February 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 March 2024 | 02 February 2024 | | | | 2 | | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | + | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + # TODO check numbers + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | + | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | + | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | + | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | + | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | + | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.34 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.57 | 0.0 | 0.0 | 102.57 | 17.01 | 0.0 | 0.0 | 85.56 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 85.56 | 83.57 | 1.99 | 0.0 | 0.0 | 0.0 | false | false | +# --- Reschedule after re-age --- + When Admin sets the business date to "02 April 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 July 2024 | 02 April 2024 | | | | 2 | | +# TODO check numbers + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 10 | 30 | 01 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 11 | 31 | 01 November 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + +# TODO check and unSkip when PS-2938 is done + @Skip @TestRailId:C4290 + Scenario: Verify Re-aging with loan reschedule: UC2.1: Interest handling: DEFAULT, reschedule - adjustedDueDate + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Reschedule before re-age --- + When Admin sets the business date to "02 February 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 March 2024 | 02 February 2024 | 15 April 2024 | | | | | + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 4 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.27 | 83.57 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + # --- Reschedule after re-age --- + When Admin sets the business date to "02 April 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 May 2024 | 02 April 2024 | 15 June 2024 | | | | | +# TODO check numbers + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 4 | 31 | 15 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 15 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 15 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 31 | 15 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 8 | 31 | 15 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + # TODO check and unSkip when PS-2938 is done + @Skip @TestRailId:C4291 + Scenario: Verify Re-aging with loan reschedule: UC2.2: Interest handling: WAIVE_INTEREST, reschedule - adjustedDueDate + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Reschedule before re-age --- + When Admin sets the business date to "02 February 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 March 2024 | 02 February 2024 | 15 April 2024 | | | | | + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | WAIVE_INTEREST | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 4 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.27 | 83.57 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + # --- Reschedule after re-age --- + When Admin sets the business date to "02 April 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 May 2024 | 02 April 2024 | 15 June 2024 | | | | | +# TODO check numbers + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 4 | 31 | 15 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 15 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 15 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 31 | 15 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 8 | 31 | 15 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + # TODO check and unSkip when PS-2938 is done + @Skip @TestRailId:C4292 + Scenario: Verify Re-aging with loan reschedule: UC2.3: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST, reschedule - adjustedDueDate + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Reschedule before re-age --- + When Admin sets the business date to "02 February 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 March 2024 | 02 February 2024 | 15 April 2024 | | | | | + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 4 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.27 | 83.57 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + # --- Reschedule after re-age --- + When Admin sets the business date to "02 April 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 May 2024 | 02 April 2024 | 15 June 2024 | | | | | +# TODO check numbers + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 4 | 31 | 15 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 15 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 15 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 31 | 15 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 8 | 31 | 15 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + # TODO check and unSkip when PS-2938 is done + @Skip @TestRailId:C4293 + Scenario: Verify Re-aging with loan reschedule: UC2.4: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST, reschedule - adjustedDueDate + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Reschedule before re-age --- + When Admin sets the business date to "02 February 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 March 2024 | 02 February 2024 | 15 April 2024 | | | | | + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 4 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.27 | 83.57 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | + # --- Reschedule after re-age --- + When Admin sets the business date to "02 April 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 May 2024 | 02 April 2024 | 15 June 2024 | | | | | +# TODO check numbers + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 4 | 31 | 15 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 15 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 15 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 31 | 15 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 8 | 31 | 15 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4294 + Scenario: Verify Re-aging with loan reschedule: UC3: Interest handling: DEFAULT, reschedule - newInterestRate + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Reschedule before re-age --- + When Admin sets the business date to "02 February 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 March 2024 | 02 February 2024 | | | | | 10 | + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.97 | 16.6 | 0.49 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + | 3 | 31 | 01 April 2024 | | 50.44 | 16.53 | 0.56 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + | 4 | 30 | 01 May 2024 | | 33.77 | 16.67 | 0.42 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.28 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.14 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.47 | 0.0 | 0.0 | 102.47 | 17.01 | 0.0 | 0.0 | 85.46 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 66.97 | 16.6 | 0.49 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + | 3 | 31 | 01 April 2024 | | 50.44 | 16.53 | 0.56 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + | 4 | 30 | 01 May 2024 | | 33.77 | 16.67 | 0.42 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.28 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.14 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.47 | 0.0 | 0.0 | 102.47 | 17.01 | 0.0 | 0.0 | 85.46 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.33 | 13.24 | 1.18 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | + | 5 | 30 | 01 May 2024 | | 56.5 | 13.83 | 0.59 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | + | 6 | 31 | 01 June 2024 | | 42.55 | 13.95 | 0.47 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | + | 7 | 30 | 01 July 2024 | | 28.48 | 14.07 | 0.35 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | + | 8 | 31 | 01 August 2024 | | 14.3 | 14.18 | 0.24 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.3 | 0.12 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 3.53 | 0.0 | 0.0 | 103.53 | 17.01 | 0.0 | 0.0 | 86.52 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.37 | 83.57 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | + # --- Reschedule after re-age --- + When Admin sets the business date to "02 April 2024" + When Admin creates and approves Loan reschedule with the following data: + | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | + | 01 May 2024 | 02 April 2024 | | | | | 12 | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.33 | 13.24 | 1.18 | 0.0 | 0.0 | 14.42 | 0.0 | 0.0 | 0.0 | 14.42 | + | 5 | 30 | 01 May 2024 | | 56.56 | 13.77 | 0.7 | 0.0 | 0.0 | 14.47 | 0.0 | 0.0 | 0.0 | 14.47 | + | 6 | 31 | 01 June 2024 | | 42.66 | 13.9 | 0.57 | 0.0 | 0.0 | 14.47 | 0.0 | 0.0 | 0.0 | 14.47 | + | 7 | 30 | 01 July 2024 | | 28.62 | 14.04 | 0.43 | 0.0 | 0.0 | 14.47 | 0.0 | 0.0 | 0.0 | 14.47 | + | 8 | 31 | 01 August 2024 | | 14.44 | 14.18 | 0.29 | 0.0 | 0.0 | 14.47 | 0.0 | 0.0 | 0.0 | 14.47 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.44 | 0.14 | 0.0 | 0.0 | 14.58 | 0.0 | 0.0 | 0.0 | 14.58 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 3.89 | 0.0 | 0.0 | 103.89 | 17.01 | 0.0 | 0.0 | 86.88 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.37 | 83.57 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | + + @TestRailId:C4295 + Scenario: Verify Re-aging with loan reschedule: UC4: Interest handling: DEFAULT, reschedule, N+1 installment + When Admin sets the business date to "01 January 2024" + And Admin creates a client with random data + And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule + And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | +# --- First installment paid --- + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- N+1 installment --- + When Admin sets the business date to "02 February 2024" + When Admin adds "LOAN_NSF_FEE" due date charge with "25 December 2024" due date and 20 EUR transaction amount + Then Loan Repayment schedule has 7 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 7 | 177 | 25 December 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 20.0 | 122.05 | 17.01 | 0.0 | 0.0 | 105.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Check before re-age --- + When Admin sets the business date to "15 March 2024" + Then Loan Repayment schedule has 7 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 7 | 177 | 25 December 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 20.0 | 122.05 | 17.01 | 0.0 | 0.0 | 105.04 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | +# --- Re-age transaction --- + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + Then Loan Repayment schedule has 10 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 10 | 115 | 25 December 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 20.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 0.0 | 20.0 | 122.8 | 17.01 | 0.0 | 0.0 | 105.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + # --- N+1 installment after re-age --- + When Admin sets the business date to "02 April 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 November 2024" due date and 15 EUR transaction amount + Then Loan Repayment schedule has 10 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | + | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | + | 10 | 115 | 25 December 2024 | | 0.0 | 0.0 | 0.0 | 15.0 | 20.0 | 35.0 | 0.0 | 0.0 | 0.0 | 35.0 | + And Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.8 | 15.0 | 20.0 | 137.8 | 17.01 | 0.0 | 0.0 | 120.79 | + And Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | +# --- Close loan --- + When Loan Pay-off is made on "02 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4296 @AdvancedPaymentAllocation + Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed from MONTHS to DAYS - Interest Split scenario - UC13.1 + When Admin sets the business date to "01 January 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_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "15 March 2024" + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 15 | DAYS | 01 April 2024| 6 | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 17 | 01 April 2024 | | 70.36 | 13.21 | 0.98 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 5 | 15 | 16 April 2024 | | 56.38 | 13.98 | 0.21 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 6 | 15 | 01 May 2024 | | 42.35 | 14.03 | 0.16 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 7 | 15 | 16 May 2024 | | 28.28 | 14.07 | 0.12 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 8 | 15 | 31 May 2024 | | 14.17 | 14.11 | 0.08 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | + | 9 | 15 | 15 June 2024 | | 0.0 | 14.17 | 0.04 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.17 | 0.0 | 0.0 | 102.17 | 17.01 | 0.0 | 0.0 | 85.16 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | + When Loan Pay-off is made on "15 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4297 @AdvancedPaymentAllocation + Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed from DAYS to MONTHS - Fees and Interest Split before re-aging - UC13.2 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 90 | DAYS | 15 | DAYS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 15 | 16 January 2024 | | 83.45 | 16.55 | 0.29 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | + | 2 | 15 | 31 January 2024 | | 66.85 | 16.6 | 0.24 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | + | 3 | 15 | 15 February 2024 | | 50.2 | 16.65 | 0.19 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | + | 4 | 15 | 01 March 2024 | | 33.51 | 16.69 | 0.15 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | + | 5 | 15 | 16 March 2024 | | 16.77 | 16.74 | 0.1 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | + | 6 | 15 | 31 March 2024 | | 0.0 | 16.77 | 0.05 | 0.0 | 0.0 | 16.82 | 0.0 | 0.0 | 0.0 | 16.82 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.02 | 0.0 | 0.0 | 101.02 | 0.0 | 0.0 | 0.0 | 101.02 | + When Admin sets the business date to "16 January 2024" + And Customer makes "AUTOPAY" repayment on "16 January 2024" with 16.98 EUR transaction amount + When Admin sets the business date to "20 January 2024" + When Admin adds "LOAN_SNOOZE_FEE" due date charge with "20 January 2024" due date and 10 EUR transaction amount + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | Snooze fee | false | Specified due date | 20 January 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + When Admin sets the business date to "10 February 2024" + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 01 March 2024| 5 | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 15 | 16 January 2024 | 16 January 2024 | 83.45 | 16.55 | 0.29 | 0.0 | 0.0 | 16.84 | 16.84 | 0.0 | 0.0 | 0.0 | + | 2 | 15 | 31 January 2024 | | 83.31 | 0.14 | 0.0 | 10.0 | 0.0 | 10.14 | 0.14 | 0.14 | 0.0 | 10.0 | + | 3 | 10 | 10 February 2024 | 10 February 2024 | 83.31 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 20 | 01 March 2024 | | 67.03 | 16.28 | 0.72 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 5 | 31 | 01 April 2024 | | 50.43 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 6 | 30 | 01 May 2024 | | 33.72 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 7 | 31 | 01 June 2024 | | 16.92 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 8 | 30 | 01 July 2024 | | 0.0 | 16.92 | 0.1 | 0.0 | 0.0 | 17.02 | 0.0 | 0.0 | 0.0 | 17.02 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.0 | 10.0 | 0.0 | 112.0 | 16.98 | 0.14 | 0.0 | 95.02 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 16 January 2024 | Repayment | 16.98 | 16.69 | 0.29 | 0.0 | 0.0 | 83.31 | false | false | + | 10 February 2024 | Re-age | 83.71 | 83.31 | 0.4 | 0.0 | 0.0 | 0.0 | false | false | + Then Loan Charges tab has the following data: + | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | + | Snooze fee | false | Specified due date | 20 January 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + When Loan Pay-off is made on "10 February 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4298 @AdvancedPaymentAllocation + Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed from MONTHS to WEEKS - Charge-back before re-aging - UC13.3 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "05 February 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + When Admin sets the business date to "20 March 2024" + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 2 | WEEKS | 01 April 2024| 8 | + Then Loan Repayment schedule has 11 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 20 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 19 | 20 March 2024 | 20 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 12 | 01 April 2024 | | 88.9 | 11.1 | 1.74 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 5 | 14 | 15 April 2024 | | 76.3 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 6 | 14 | 29 April 2024 | | 63.67 | 12.63 | 0.21 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 7 | 14 | 13 May 2024 | | 51.0 | 12.67 | 0.17 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 8 | 14 | 27 May 2024 | | 38.29 | 12.71 | 0.13 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 9 | 14 | 10 June 2024 | | 25.55 | 12.74 | 0.1 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 10 | 14 | 24 June 2024 | | 12.78 | 12.77 | 0.07 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | + | 11 | 14 | 08 July 2024 | | 0.0 | 12.78 | 0.03 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 116.43 | 3.27 | 0.0 | 0.0 | 119.7 | 17.01 | 0.0 | 0.0 | 102.69 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 05 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | + | 20 March 2024 | Re-age | 101.51 | 100.0 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | + When Loan Pay-off is made on "20 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4299 @AdvancedPaymentAllocation + Scenario:Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed - N+1 Scenario - UC13.4 + When Admin sets the business date to "01 January 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_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "01 March 2024" + And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount + When Admin sets the business date to "25 March 2024" + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 2 | MONTHS | 01 May 2024 | 3 | + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 3 | 24 | 25 March 2024 | 25 March 2024 | 67.05 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 37 | 01 May 2024 | | 44.95 | 22.1 | 0.77 | 0.0 | 0.0 | 22.87 | 0.0 | 0.0 | 0.0 | 22.87 | + | 5 | 61 | 01 July 2024 | | 22.6 | 22.35 | 0.52 | 0.0 | 0.0 | 22.87 | 0.0 | 0.0 | 0.0 | 22.87 | + | 6 | 62 | 01 September 2024| | 0.0 | 22.6 | 0.26 | 0.0 | 0.0 | 22.86 | 0.0 | 0.0 | 0.0 | 22.86 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.62 | 0.0 | 0.0 | 102.62 | 34.02 | 0.0 | 0.0 | 68.6 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | + | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | + | 25 March 2024 | Re-age | 67.35 | 67.05 | 0.3 | 0.0 | 0.0 | 0.0 | false | false | + When Loan Pay-off is made on "25 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4300 @AdvancedPaymentAllocation + Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed from WEEKS to DAYS - Partially paid installment - UC13.5 + When Admin sets the business date to "01 January 2024" + When Admin creates a client with random data + When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 12 | WEEKS | 2 | WEEKS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 14 | 15 January 2024 | | 83.44 | 16.56 | 0.27 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | + | 2 | 14 | 29 January 2024 | | 66.84 | 16.6 | 0.23 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | + | 3 | 14 | 12 February 2024 | | 50.19 | 16.65 | 0.18 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | + | 4 | 14 | 26 February 2024 | | 33.5 | 16.69 | 0.14 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | + | 5 | 14 | 11 March 2024 | | 16.76 | 16.74 | 0.09 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | + | 6 | 14 | 25 March 2024 | | 0.0 | 16.76 | 0.05 | 0.0 | 0.0 | 16.81 | 0.0 | 0.0 | 0.0 | 16.81 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.96 | 0.0 | 0.0 | 100.96 | 0.0 | 0.0 | 0.0 | 100.96 | + When Admin sets the business date to "15 January 2024" + And Customer makes "AUTOPAY" repayment on "15 January 2024" with 16.86 EUR transaction amount + When Admin sets the business date to "29 January 2024" + And Customer makes "AUTOPAY" repayment on "29 January 2024" with 10.0 EUR transaction amount + When Admin sets the business date to "20 February 2024" + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 10 | DAYS | 01 March 2024| 5 | + Then Loan Repayment schedule has 9 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 14 | 15 January 2024 | 15 January 2024 | 83.44 | 16.56 | 0.27 | 0.0 | 0.0 | 16.83 | 16.83 | 0.0 | 0.0 | 0.0 | + | 2 | 14 | 29 January 2024 | 20 February 2024 | 73.64 | 9.8 | 0.23 | 0.0 | 0.0 | 10.03 | 10.03 | 0.03 | 0.0 | 0.0 | + | 3 | 14 | 12 February 2024 | 20 February 2024 | 73.64 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 4 | 8 | 20 February 2024 | 20 February 2024 | 73.64 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 5 | 10 | 01 March 2024 | | 59.21 | 14.43 | 0.45 | 0.0 | 0.0 | 14.88 | 0.0 | 0.0 | 0.0 | 14.88 | + | 6 | 10 | 11 March 2024 | | 44.45 | 14.76 | 0.12 | 0.0 | 0.0 | 14.88 | 0.0 | 0.0 | 0.0 | 14.88 | + | 7 | 10 | 21 March 2024 | | 29.66 | 14.79 | 0.09 | 0.0 | 0.0 | 14.88 | 0.0 | 0.0 | 0.0 | 14.88 | + | 8 | 10 | 31 March 2024 | | 14.84 | 14.82 | 0.06 | 0.0 | 0.0 | 14.88 | 0.0 | 0.0 | 0.0 | 14.88 | + | 9 | 10 | 10 April 2024 | | 0.0 | 14.84 | 0.03 | 0.0 | 0.0 | 14.87 | 0.0 | 0.0 | 0.0 | 14.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.25 | 0.0 | 0.0 | 101.25 | 26.86 | 0.03 | 0.0 | 74.39 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 15 January 2024 | Repayment | 16.86 | 16.59 | 0.27 | 0.0 | 0.0 | 83.41 | false | false | + | 29 January 2024 | Repayment | 10.0 | 9.77 | 0.23 | 0.0 | 0.0 | 73.64 | false | false | + | 20 February 2024 | Re-age | 73.95 | 73.64 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | + When Loan Pay-off is made on "20 February 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4301 @AdvancedPaymentAllocation + Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed (15 to 30 DAYS) - Multiple installments paid - UC13.6 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 90 | DAYS | 15 | DAYS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 15 | 16 January 2024 | | 83.45 | 16.55 | 0.29 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | + | 2 | 15 | 31 January 2024 | | 66.85 | 16.6 | 0.24 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | + | 3 | 15 | 15 February 2024 | | 50.2 | 16.65 | 0.19 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | + | 4 | 15 | 01 March 2024 | | 33.51 | 16.69 | 0.15 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | + | 5 | 15 | 16 March 2024 | | 16.77 | 16.74 | 0.1 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | + | 6 | 15 | 31 March 2024 | | 0.0 | 16.77 | 0.05 | 0.0 | 0.0 | 16.82 | 0.0 | 0.0 | 0.0 | 16.82 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.02 | 0.0 | 0.0 | 101.02 | 0.0 | 0.0 | 0.0 | 101.02 | + When Admin sets the business date to "16 January 2024" + And Customer makes "AUTOPAY" repayment on "16 January 2024" with 16.98 EUR transaction amount + When Admin sets the business date to "31 January 2024" + And Customer makes "AUTOPAY" repayment on "31 January 2024" with 16.98 EUR transaction amount + When Admin sets the business date to "15 February 2024" + And Customer makes "AUTOPAY" repayment on "15 February 2024" with 16.98 EUR transaction amount + When Admin sets the business date to "10 March 2024" + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 30 | DAYS | 01 April 2024| 2 | + Then Loan Repayment schedule has 7 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 15 | 16 January 2024 | 16 January 2024 | 83.45 | 16.55 | 0.29 | 0.0 | 0.0 | 16.84 | 16.84 | 0.0 | 0.0 | 0.0 | + | 2 | 15 | 31 January 2024 | 31 January 2024 | 66.85 | 16.6 | 0.24 | 0.0 | 0.0 | 16.84 | 16.84 | 0.14 | 0.0 | 0.0 | + | 3 | 15 | 15 February 2024 | 15 February 2024 | 50.2 | 16.65 | 0.19 | 0.0 | 0.0 | 16.84 | 16.84 | 0.28 | 0.0 | 0.0 | + | 4 | 15 | 01 March 2024 | 10 March 2024 | 49.78 | 0.42 | 0.0 | 0.0 | 0.0 | 0.42 | 0.42 | 0.42 | 0.0 | 0.0 | + | 5 | 9 | 10 March 2024 | 10 March 2024 | 49.78 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 6 | 22 | 01 April 2024 | | 25.04 | 24.74 | 0.45 | 0.0 | 0.0 | 25.19 | 0.0 | 0.0 | 0.0 | 25.19 | + | 7 | 30 | 01 May 2024 | | 0.0 | 25.04 | 0.15 | 0.0 | 0.0 | 25.19 | 0.0 | 0.0 | 0.0 | 25.19 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.32 | 0.0 | 0.0 | 101.32 | 50.94 | 0.84 | 0.0 | 50.38 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 16 January 2024 | Repayment | 16.98 | 16.69 | 0.29 | 0.0 | 0.0 | 83.31 | false | false | + | 31 January 2024 | Repayment | 16.98 | 16.74 | 0.24 | 0.0 | 0.0 | 66.57 | false | false | + | 15 February 2024 | Repayment | 16.98 | 16.79 | 0.19 | 0.0 | 0.0 | 49.78 | false | false | + | 10 March 2024 | Re-age | 50.02 | 49.78 | 0.24 | 0.0 | 0.0 | 0.0 | false | false | + When Loan Pay-off is made on "10 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4302 @AdvancedPaymentAllocation + Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed from DAYS to WEEKS with penalties - UC13.7 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 60 | DAYS | 10 | DAYS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 10 | 11 January 2024 | | 83.41 | 16.59 | 0.19 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | + | 2 | 10 | 21 January 2024 | | 66.79 | 16.62 | 0.16 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | + | 3 | 10 | 31 January 2024 | | 50.14 | 16.65 | 0.13 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | + | 4 | 10 | 10 February 2024 | | 33.46 | 16.68 | 0.1 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | + | 5 | 10 | 20 February 2024 | | 16.75 | 16.71 | 0.07 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | + | 6 | 10 | 01 March 2024 | | 0.0 | 16.75 | 0.03 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 0.68 | 0.0 | 0.0 | 100.68 | 0.0 | 0.0 | 0.0 | 100.68 | + When Admin sets the business date to "11 January 2024" + And Customer makes "AUTOPAY" repayment on "11 January 2024" with 16.8 EUR transaction amount + When Admin sets the business date to "31 January 2024" + When Admin adds "LOAN_NSF_FEE" due date charge with "31 January 2024" due date and 5 EUR transaction amount + 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 | 31 January 2024 | Flat | 5.0 | 0.0 | 0.0 | 5.0 | + When Admin sets the business date to "15 February 2024" + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | WEEKS | 01 March 2024 | 6 | + Then Loan Repayment schedule has 11 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 10 | 11 January 2024 | 11 January 2024 | 83.41 | 16.59 | 0.19 | 0.0 | 0.0 | 16.78 | 16.78 | 0.0 | 0.0 | 0.0 | + | 2 | 10 | 21 January 2024 | 15 February 2024 | 83.39 | 0.02 | 0.0 | 0.0 | 0.0 | 0.02 | 0.02 | 0.02 | 0.0 | 0.0 | + | 3 | 10 | 31 January 2024 | | 83.39 | 0.0 | 0.0 | 0.0 | 5.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | + | 4 | 10 | 10 February 2024 | 15 February 2024 | 83.39 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 5 | 5 | 15 February 2024 | 15 February 2024 | 83.39 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 6 | 15 | 01 March 2024 | | 70.11 | 13.28 | 0.8 | 0.0 | 0.0 | 14.08 | 0.0 | 0.0 | 0.0 | 14.08 | + | 7 | 7 | 08 March 2024 | | 56.13 | 13.98 | 0.1 | 0.0 | 0.0 | 14.08 | 0.0 | 0.0 | 0.0 | 14.08 | + | 8 | 7 | 15 March 2024 | | 42.13 | 14.0 | 0.08 | 0.0 | 0.0 | 14.08 | 0.0 | 0.0 | 0.0 | 14.08 | + | 9 | 7 | 22 March 2024 | | 28.11 | 14.02 | 0.06 | 0.0 | 0.0 | 14.08 | 0.0 | 0.0 | 0.0 | 14.08 | + | 10 | 7 | 29 March 2024 | | 14.07 | 14.04 | 0.04 | 0.0 | 0.0 | 14.08 | 0.0 | 0.0 | 0.0 | 14.08 | + | 11 | 7 | 05 April 2024 | | 0.0 | 14.07 | 0.02 | 0.0 | 0.0 | 14.09 | 0.0 | 0.0 | 0.0 | 14.09 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.29 | 0.0 | 5.0 | 106.29 | 16.8 | 0.02 | 0.0 | 89.49 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 11 January 2024 | Repayment | 16.8 | 16.61 | 0.19 | 0.0 | 0.0 | 83.39 | false | false | + | 15 February 2024 | Re-age | 83.95 | 83.39 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | + 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 | 31 January 2024 | Flat | 5.0 | 0.0 | 0.0 | 5.0 | + When Loan Pay-off is made on "15 February 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + @TestRailId:C4303 @AdvancedPaymentAllocation + Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed - change from WEEKS to MONTHS with multiple repayment transactions - UC13.8 + When Admin sets the business date to "01 January 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_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 18 | WEEKS | 3 | WEEKS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 21 | 22 January 2024 | | 83.5 | 16.5 | 0.41 | 0.0 | 0.0 | 16.91 | 0.0 | 0.0 | 0.0 | 16.91 | + | 2 | 21 | 12 February 2024 | | 66.93 | 16.57 | 0.34 | 0.0 | 0.0 | 16.91 | 0.0 | 0.0 | 0.0 | 16.91 | + | 3 | 21 | 04 March 2024 | | 50.29 | 16.64 | 0.27 | 0.0 | 0.0 | 16.91 | 0.0 | 0.0 | 0.0 | 16.91 | + | 4 | 21 | 25 March 2024 | | 33.59 | 16.7 | 0.21 | 0.0 | 0.0 | 16.91 | 0.0 | 0.0 | 0.0 | 16.91 | + | 5 | 21 | 15 April 2024 | | 16.82 | 16.77 | 0.14 | 0.0 | 0.0 | 16.91 | 0.0 | 0.0 | 0.0 | 16.91 | + | 6 | 21 | 06 May 2024 | | 0.0 | 16.82 | 0.07 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.44 | 0.0 | 0.0 | 101.44 | 0.0 | 0.0 | 0.0 | 101.44 | + When Admin sets the business date to "22 January 2024" + And Customer makes "AUTOPAY" repayment on "22 January 2024" with 17.16 EUR transaction amount + When Admin sets the business date to "12 February 2024" + And Customer makes "AUTOPAY" repayment on "12 February 2024" with 17.16 EUR transaction amount + When Admin sets the business date to "04 March 2024" + And Customer makes "AUTOPAY" repayment on "04 March 2024" with 10.0 EUR transaction amount + When Admin sets the business date to "20 March 2024" + When Admin creates a Loan re-aging transaction with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | + | 1 | MONTHS | 01 April 2024| 4 | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 21 | 22 January 2024 | 22 January 2024 | 83.5 | 16.5 | 0.41 | 0.0 | 0.0 | 16.91 | 16.91 | 0.0 | 0.0 | 0.0 | + | 2 | 21 | 12 February 2024 | 12 February 2024 | 66.93 | 16.57 | 0.34 | 0.0 | 0.0 | 16.91 | 16.91 | 0.25 | 0.0 | 0.0 | + | 3 | 21 | 04 March 2024 | 20 March 2024 | 56.7 | 10.23 | 0.27 | 0.0 | 0.0 | 10.5 | 10.5 | 0.5 | 0.0 | 0.0 | + | 4 | 16 | 20 March 2024 | 20 March 2024 | 56.7 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 5 | 12 | 01 April 2024 | | 42.63 | 14.07 | 0.31 | 0.0 | 0.0 | 14.38 | 0.0 | 0.0 | 0.0 | 14.38 | + | 6 | 30 | 01 May 2024 | | 28.5 | 14.13 | 0.25 | 0.0 | 0.0 | 14.38 | 0.0 | 0.0 | 0.0 | 14.38 | + | 7 | 31 | 01 June 2024 | | 14.29 | 14.21 | 0.17 | 0.0 | 0.0 | 14.38 | 0.0 | 0.0 | 0.0 | 14.38 | + | 8 | 30 | 01 July 2024 | | 0.0 | 14.29 | 0.08 | 0.0 | 0.0 | 14.37 | 0.0 | 0.0 | 0.0 | 14.37 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.83 | 0.0 | 0.0 | 101.83 | 44.32 | 0.75 | 0.0 | 57.51 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 22 January 2024 | Repayment | 17.16 | 16.75 | 0.41 | 0.0 | 0.0 | 83.25 | false | false | + | 12 February 2024 | Repayment | 17.16 | 16.82 | 0.34 | 0.0 | 0.0 | 66.43 | false | false | + | 04 March 2024 | Repayment | 10.0 | 9.73 | 0.27 | 0.0 | 0.0 | 56.7 | false | false | + | 20 March 2024 | Re-age | 56.88 | 56.7 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | + When Loan Pay-off is made on "20 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + # january 1: disburse 100 + # february 1: repay 25 + # february 1: chargeback 17.01 + # april 1st: reage start date : february 15 PAYABLE + @TestRailId:C4325 @AdvancedPaymentAllocation + Scenario: Verify Loan backdated re-aging during 2nd installment after chargeback on reage start date on a closed period transaction with partially paid installment; adjust to last - interest bearing loan with equal amortization; payable interest - UC1 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + + When Admin sets the business date to "1 February 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "1 April 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 15 February 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 14 | 15 February 2024 | 15 February 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 0 | 15 February 2024 | | 77.15 | 15.44 | 0.04 | 0.0 | 0.0 | 15.48 | 0.0 | 0.0 | 0.0 | 15.48 | + | 4 | 29 | 15 March 2024 | | 61.71 | 15.44 | 0.04 | 0.0 | 0.0 | 15.48 | 0.0 | 0.0 | 0.0 | 15.48 | + | 5 | 31 | 15 April 2024 | | 46.27 | 15.44 | 0.04 | 0.0 | 0.0 | 15.48 | 0.0 | 0.0 | 0.0 | 15.48 | + | 6 | 30 | 15 May 2024 | | 30.83 | 15.44 | 0.04 | 0.0 | 0.0 | 15.48 | 0.0 | 0.0 | 0.0 | 15.48 | + | 7 | 31 | 15 June 2024 | | 15.39 | 15.44 | 0.04 | 0.0 | 0.0 | 15.48 | 0.0 | 0.0 | 0.0 | 15.48 | + | 8 | 30 | 15 July 2024 | | 0.0 | 15.39 | 0.06 | 0.0 | 0.0 | 15.45 | 0.0 | 0.0 | 0.0 | 15.45 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 0.84 | 0.0 | 0.0 | 117.85 | 25.0 | 7.99 | 0.0 | 92.85 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + | 15 February 2024 | Re-age | 92.85 | 92.59 | 0.26 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "1 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + # january 1: disburse 100 + # february 1: repay 25 + # february 1: chargeback 17.01 + # april 1st: reage start date : february 15 FULL + @TestRailId:C4326 @AdvancedPaymentAllocation + Scenario: Verify Loan backdated re-aging during 2nd installment after chargeback on reage start date on a closed period transaction with partially paid installment; adjust to last - interest bearing loan with equal amortization; full interest - UC1 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + + When Admin sets the business date to "1 February 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "1 April 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 15 February 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 14 | 15 February 2024 | 15 February 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 0 | 15 February 2024 | | 77.16 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 4 | 29 | 15 March 2024 | | 61.73 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 5 | 31 | 15 April 2024 | | 46.3 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 6 | 30 | 15 May 2024 | | 30.87 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 7 | 31 | 15 June 2024 | | 15.44 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 8 | 30 | 15 July 2024 | | 0.0 | 15.44 | 0.23 | 0.0 | 0.0 | 15.67 | 0.0 | 0.0 | 0.0 | 15.67 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + | 15 February 2024 | Re-age | 93.92 | 92.59 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "1 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + # january 1: disburse 100 + # february 1: repay 25 + # february 1: chargeback 17.01 + # april 1st: reage start date : March 1 PAYABLE + @TestRailId:C4327 @AdvancedPaymentAllocation + Scenario: Verify Loan backdated re-aging on 2nd due after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC2 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "1 April 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 1 March 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 0 | 01 March 2024 | | 77.16 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.09 | 0.0 | 0.0 | 15.53 | 0.0 | 0.0 | 0.0 | 15.53 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.12 | 0.0 | 0.0 | 118.13 | 25.0 | 7.99 | 0.0 | 93.13 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + | 01 March 2024 | Re-age | 93.13 | 92.59 | 0.54 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "1 April 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met + + # january 1: disburse 100 + # february 1: repay 25 + # february 1: chargeback 17.01 + # april 1st: reage start date : March 1 FULL + @TestRailId:C4328 @AdvancedPaymentAllocation + Scenario: Verify Loan backdated re-aging on 2nd due after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; full interest - UC2 + When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - # --- N+1 installment after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 November 2024" due date and 15 EUR transaction amount - Then Loan Repayment schedule has 10 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - | 10 | 115 | 25 December 2024 | | 0.0 | 0.0 | 0.0 | 15.0 | 20.0 | 35.0 | 0.0 | 0.0 | 0.0 | 35.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 15.0 | 20.0 | 137.8 | 17.01 | 0.0 | 0.0 | 120.79 | - And Loan Transactions tab has the following data: + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "1 April 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 1 March 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 0 | 01 March 2024 | | 77.16 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.23 | 0.0 | 0.0 | 15.67 | 0.0 | 0.0 | 0.0 | 15.67 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + | 01 March 2024 | Re-age | 93.92 | 92.59 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "1 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4296 @AdvancedPaymentAllocation - Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed from MONTHS to DAYS - Interest Split scenario - UC13.1 + # january 1: disburse 100 + # february 1: repay 25 + # february 1: chargeback 17.01 + # april 1st: reage start date : February 1 PAYABLE + @TestRailId:C4329 @AdvancedPaymentAllocation + Scenario: Verify Loan backdated re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC3 When Admin sets the business date to "01 January 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_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -9734,100 +18853,177 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 15 | DAYS | 01 April 2024| 6 | - Then Loan Repayment schedule has 9 periods, with the following data for periods: + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount + Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.36 | 13.21 | 0.98 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 5 | 15 | 16 April 2024 | | 56.38 | 13.98 | 0.21 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 6 | 15 | 01 May 2024 | | 42.35 | 14.03 | 0.16 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 7 | 15 | 16 May 2024 | | 28.28 | 14.07 | 0.12 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 8 | 15 | 31 May 2024 | | 14.17 | 14.11 | 0.08 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 9 | 15 | 15 June 2024 | | 0.0 | 14.17 | 0.04 | 0.0 | 0.0 | 14.21 | 0.0 | 0.0 | 0.0 | 14.21 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "1 April 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 February 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 7 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 92.59 | 24.42 | 0.58 | 0.0 | 0.0 | 25.0 | 25.0 | 7.99 | 0.0 | 0.0 | + | 2 | 0 | 01 February 2024 | | 77.16 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | + | 3 | 29 | 01 March 2024 | | 61.73 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | + | 4 | 31 | 01 April 2024 | | 46.3 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | + | 5 | 30 | 01 May 2024 | | 30.87 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | + | 6 | 31 | 01 June 2024 | | 15.44 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | + | 7 | 30 | 01 July 2024 | | 0.0 | 15.44 | 0.0 | 0.0 | 0.0 | 15.44 | 0.0 | 0.0 | 0.0 | 15.44 | + Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.17 | 0.0 | 0.0 | 102.17 | 17.01 | 0.0 | 0.0 | 85.16 | + | 117.01 | 0.58 | 0.0 | 0.0 | 117.59 | 25.0 | 7.99 | 0.0 | 92.59 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "15 March 2024" + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + | 01 February 2024 | Re-age | 92.59 | 92.59 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "1 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4297 @AdvancedPaymentAllocation - Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed from DAYS to MONTHS - Fees and Interest Split before re-aging - UC13.2 + # january 1: disburse 100 + # february 1: repay 25 + # february 1: chargeback 17.01 + # april 1st: reage start date : February 1 FULL + @TestRailId:C4330 @AdvancedPaymentAllocation + Scenario: Verify Loan backdated re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; full interest - UC3 When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 90 | DAYS | 15 | DAYS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 15 | 16 January 2024 | | 83.45 | 16.55 | 0.29 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | - | 2 | 15 | 31 January 2024 | | 66.85 | 16.6 | 0.24 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | - | 3 | 15 | 15 February 2024 | | 50.2 | 16.65 | 0.19 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | - | 4 | 15 | 01 March 2024 | | 33.51 | 16.69 | 0.15 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | - | 5 | 15 | 16 March 2024 | | 16.77 | 16.74 | 0.1 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | - | 6 | 15 | 31 March 2024 | | 0.0 | 16.77 | 0.05 | 0.0 | 0.0 | 16.82 | 0.0 | 0.0 | 0.0 | 16.82 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.02 | 0.0 | 0.0 | 101.02 | 0.0 | 0.0 | 0.0 | 101.02 | - When Admin sets the business date to "16 January 2024" - And Customer makes "AUTOPAY" repayment on "16 January 2024" with 16.98 EUR transaction amount - When Admin sets the business date to "20 January 2024" - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "20 January 2024" due date and 10 EUR transaction amount - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 20 January 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - When Admin sets the business date to "10 February 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 01 March 2024| 5 | - Then Loan Repayment schedule has 8 periods, with the following data for periods: + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount + Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 15 | 16 January 2024 | 16 January 2024 | 83.45 | 16.55 | 0.29 | 0.0 | 0.0 | 16.84 | 16.84 | 0.0 | 0.0 | 0.0 | - | 2 | 15 | 31 January 2024 | | 83.31 | 0.14 | 0.0 | 10.0 | 0.0 | 10.14 | 0.14 | 0.14 | 0.0 | 10.0 | - | 3 | 10 | 10 February 2024 | 10 February 2024 | 83.31 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 20 | 01 March 2024 | | 67.03 | 16.28 | 0.72 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 5 | 31 | 01 April 2024 | | 50.43 | 16.6 | 0.4 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 6 | 30 | 01 May 2024 | | 33.72 | 16.71 | 0.29 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 7 | 31 | 01 June 2024 | | 16.92 | 16.8 | 0.2 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - | 8 | 30 | 01 July 2024 | | 0.0 | 16.92 | 0.1 | 0.0 | 0.0 | 17.02 | 0.0 | 0.0 | 0.0 | 17.02 | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "1 April 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 February 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 7 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 92.59 | 24.42 | 0.58 | 0.0 | 0.0 | 25.0 | 25.0 | 7.99 | 0.0 | 0.0 | + | 2 | 0 | 01 February 2024 | | 77.16 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 3 | 29 | 01 March 2024 | | 61.73 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 4 | 31 | 01 April 2024 | | 46.3 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 5 | 30 | 01 May 2024 | | 30.87 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 6 | 31 | 01 June 2024 | | 15.44 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 7 | 30 | 01 July 2024 | | 0.0 | 15.44 | 0.23 | 0.0 | 0.0 | 15.67 | 0.0 | 0.0 | 0.0 | 15.67 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.0 | 10.0 | 0.0 | 112.0 | 16.98 | 0.14 | 0.0 | 95.02 | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 16 January 2024 | Repayment | 16.98 | 16.69 | 0.29 | 0.0 | 0.0 | 83.31 | false | false | - | 10 February 2024 | Re-age | 83.71 | 83.31 | 0.4 | 0.0 | 0.0 | 0.0 | false | false | - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 20 January 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - When Loan Pay-off is made on "10 February 2024" + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + | 01 February 2024 | Re-age | 93.92 | 92.59 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "1 April 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4298 @AdvancedPaymentAllocation - Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed from MONTHS to WEEKS - Charge-back before re-aging - UC13.3 + @TestRailId:C4332 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and 2nd disb before re-age at the same date - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC1 When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + | 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_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | @@ -9841,48 +19037,64 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "05 February 2024" - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - When Admin sets the business date to "20 March 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 2 | WEEKS | 01 April 2024| 8 | - Then Loan Repayment schedule has 11 periods, with the following data for periods: + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "03 January 2024" + When Admin successfully disburse the loan on "03 January 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 20 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 19 | 20 March 2024 | 20 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 12 | 01 April 2024 | | 88.9 | 11.1 | 1.74 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 5 | 14 | 15 April 2024 | | 76.3 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 6 | 14 | 29 April 2024 | | 63.67 | 12.63 | 0.21 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 7 | 14 | 13 May 2024 | | 51.0 | 12.67 | 0.17 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 8 | 14 | 27 May 2024 | | 38.29 | 12.71 | 0.13 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 9 | 14 | 10 June 2024 | | 25.55 | 12.74 | 0.1 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 10 | 14 | 24 June 2024 | | 12.78 | 12.77 | 0.07 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 11 | 14 | 08 July 2024 | | 0.0 | 12.78 | 0.03 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | + | | | 03 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 125.35 | 24.65 | 0.86 | 0.0 | 0.0 | 25.51 | 0.0 | 0.0 | 0.0 | 25.51 | + | 2 | 29 | 01 March 2024 | | 100.57 | 24.78 | 0.73 | 0.0 | 0.0 | 25.51 | 0.0 | 0.0 | 0.0 | 25.51 | + | 3 | 31 | 01 April 2024 | | 75.65 | 24.92 | 0.59 | 0.0 | 0.0 | 25.51 | 0.0 | 0.0 | 0.0 | 25.51 | + | 4 | 30 | 01 May 2024 | | 50.58 | 25.07 | 0.44 | 0.0 | 0.0 | 25.51 | 0.0 | 0.0 | 0.0 | 25.51 | + | 5 | 31 | 01 June 2024 | | 25.37 | 25.21 | 0.3 | 0.0 | 0.0 | 25.51 | 0.0 | 0.0 | 0.0 | 25.51 | + | 6 | 30 | 01 July 2024 | | 0.0 | 25.37 | 0.15 | 0.0 | 0.0 | 25.52 | 0.0 | 0.0 | 0.0 | 25.52 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 3.07 | 0.0 | 0.0 | 153.07 | 0.0 | 0.0 | 0.0 | 153.07 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 03 January 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false | + + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 04 January 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 7 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 2 | 03 January 2024 | 03 January 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 03 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 1 | 04 January 2024 | | 125.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | + | 3 | 31 | 04 February 2024 | | 100.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | + | 4 | 29 | 04 March 2024 | | 75.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | + | 5 | 31 | 04 April 2024 | | 50.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | + | 6 | 30 | 04 May 2024 | | 24.99 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | + | 7 | 31 | 04 June 2024 | | 0.0 | 24.99 | 0.0 | 0.0 | 0.0 | 24.99 | 0.0 | 0.0 | 0.0 | 24.99 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.43 | 3.27 | 0.0 | 0.0 | 119.7 | 17.01 | 0.0 | 0.0 | 102.69 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 0.04 | 0.0 | 0.0 | 150.04 | 0.0 | 0.0 | 0.0 | 150.04 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 05 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | - | 20 March 2024 | Re-age | 101.51 | 100.0 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "20 March 2024" + | 03 January 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false | + | 03 January 2024 | Re-age | 150.04 | 150.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "03 January 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4299 @AdvancedPaymentAllocation - Scenario:Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed - N+1 Scenario - UC13.4 + @TestRailId:C4333 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging trn with repayment and 2nd disb after re-age at the same date - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC2 When Admin sets the business date to "01 January 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_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" + | 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_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | @@ -9896,260 +19108,237 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "01 March 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount - When Admin sets the business date to "25 March 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 2 | MONTHS | 01 May 2024 | 3 | - Then Loan Repayment schedule has 6 periods, with the following data for periods: + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "03 January 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 04 January 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 7 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 24 | 25 March 2024 | 25 March 2024 | 67.05 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 37 | 01 May 2024 | | 44.95 | 22.1 | 0.77 | 0.0 | 0.0 | 22.87 | 0.0 | 0.0 | 0.0 | 22.87 | - | 5 | 61 | 01 July 2024 | | 22.6 | 22.35 | 0.52 | 0.0 | 0.0 | 22.87 | 0.0 | 0.0 | 0.0 | 22.87 | - | 6 | 62 | 01 September 2024| | 0.0 | 22.6 | 0.26 | 0.0 | 0.0 | 22.86 | 0.0 | 0.0 | 0.0 | 22.86 | + | 1 | 2 | 03 January 2024 | 03 January 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 2 | 1 | 04 January 2024 | | 83.34 | 16.66 | 0.01 | 0.0 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | + | 3 | 31 | 04 February 2024 | | 66.68 | 16.66 | 0.01 | 0.0 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | + | 4 | 29 | 04 March 2024 | | 50.02 | 16.66 | 0.01 | 0.0 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | + | 5 | 31 | 04 April 2024 | | 33.36 | 16.66 | 0.01 | 0.0 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | + | 6 | 30 | 04 May 2024 | | 16.69 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | + | 7 | 31 | 04 June 2024 | | 0.0 | 16.69 | 0.0 | 0.0 | 0.0 | 16.69 | 0.0 | 0.0 | 0.0 | 16.69 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.62 | 0.0 | 0.0 | 102.62 | 34.02 | 0.0 | 0.0 | 68.6 | + | 100.0 | 0.04 | 0.0 | 0.0 | 100.04 | 0.0 | 0.0 | 0.0 | 100.04 | + + When Admin successfully disburse the loan on "03 January 2024" with "50" EUR transaction amount + Then Loan Repayment schedule has 7 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 2 | 03 January 2024 | 03 January 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | | | 03 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 2 | 1 | 04 January 2024 | | 125.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | + | 3 | 31 | 04 February 2024 | | 100.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | + | 4 | 29 | 04 March 2024 | | 75.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | + | 5 | 31 | 04 April 2024 | | 50.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | + | 6 | 30 | 04 May 2024 | | 24.99 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | + | 7 | 31 | 04 June 2024 | | 0.0 | 24.99 | 0.0 | 0.0 | 0.0 | 24.99 | 0.0 | 0.0 | 0.0 | 24.99 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 150.0 | 0.04 | 0.0 | 0.0 | 150.04 | 0.0 | 0.0 | 0.0 | 150.04 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 25 March 2024 | Re-age | 67.35 | 67.05 | 0.3 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "25 March 2024" + | 03 January 2024 | Re-age | 100.04 | 100.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | false | + | 03 January 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false | + + When Loan Pay-off is made on "03 January 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4300 @AdvancedPaymentAllocation - Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed from WEEKS to DAYS - Partially paid installment - UC13.5 + @TestRailId:C4334 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC4.1 When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 12 | WEEKS | 2 | WEEKS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_INTEREST_RECALC_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 14 | 15 January 2024 | | 83.44 | 16.56 | 0.27 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | - | 2 | 14 | 29 January 2024 | | 66.84 | 16.6 | 0.23 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | - | 3 | 14 | 12 February 2024 | | 50.19 | 16.65 | 0.18 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | - | 4 | 14 | 26 February 2024 | | 33.5 | 16.69 | 0.14 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | - | 5 | 14 | 11 March 2024 | | 16.76 | 16.74 | 0.09 | 0.0 | 0.0 | 16.83 | 0.0 | 0.0 | 0.0 | 16.83 | - | 6 | 14 | 25 March 2024 | | 0.0 | 16.76 | 0.05 | 0.0 | 0.0 | 16.81 | 0.0 | 0.0 | 0.0 | 16.81 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.96 | 0.0 | 0.0 | 100.96 | 0.0 | 0.0 | 0.0 | 100.96 | - When Admin sets the business date to "15 January 2024" - And Customer makes "AUTOPAY" repayment on "15 January 2024" with 16.86 EUR transaction amount - When Admin sets the business date to "29 January 2024" - And Customer makes "AUTOPAY" repayment on "29 January 2024" with 10.0 EUR transaction amount - When Admin sets the business date to "20 February 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 10 | DAYS | 01 March 2024| 5 | - Then Loan Repayment schedule has 9 periods, with the following data for periods: + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount + Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 14 | 15 January 2024 | 15 January 2024 | 83.44 | 16.56 | 0.27 | 0.0 | 0.0 | 16.83 | 16.83 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 29 January 2024 | 20 February 2024 | 73.64 | 9.8 | 0.23 | 0.0 | 0.0 | 10.03 | 10.03 | 0.03 | 0.0 | 0.0 | - | 3 | 14 | 12 February 2024 | 20 February 2024 | 73.64 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 8 | 20 February 2024 | 20 February 2024 | 73.64 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 10 | 01 March 2024 | | 59.21 | 14.43 | 0.45 | 0.0 | 0.0 | 14.88 | 0.0 | 0.0 | 0.0 | 14.88 | - | 6 | 10 | 11 March 2024 | | 44.45 | 14.76 | 0.12 | 0.0 | 0.0 | 14.88 | 0.0 | 0.0 | 0.0 | 14.88 | - | 7 | 10 | 21 March 2024 | | 29.66 | 14.79 | 0.09 | 0.0 | 0.0 | 14.88 | 0.0 | 0.0 | 0.0 | 14.88 | - | 8 | 10 | 31 March 2024 | | 14.84 | 14.82 | 0.06 | 0.0 | 0.0 | 14.88 | 0.0 | 0.0 | 0.0 | 14.88 | - | 9 | 10 | 10 April 2024 | | 0.0 | 14.84 | 0.03 | 0.0 | 0.0 | 14.87 | 0.0 | 0.0 | 0.0 | 14.87 | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 7.99 | 7.99 | 0.0 | 9.02 | + | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.25 | 0.0 | 0.0 | 101.25 | 26.86 | 0.03 | 0.0 | 74.39 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 25.0 | 7.99 | 0.0 | 77.0 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 15 January 2024 | Repayment | 16.86 | 16.59 | 0.27 | 0.0 | 0.0 | 83.41 | false | false | - | 29 January 2024 | Repayment | 10.0 | 9.77 | 0.23 | 0.0 | 0.0 | 73.64 | false | false | - | 20 February 2024 | Re-age | 73.95 | 73.64 | 0.31 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "20 February 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - @TestRailId:C4301 @AdvancedPaymentAllocation - Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed (15 to 30 DAYS) - Multiple installments paid - UC13.6 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 90 | DAYS | 15 | DAYS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 15 | 16 January 2024 | | 83.45 | 16.55 | 0.29 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | - | 2 | 15 | 31 January 2024 | | 66.85 | 16.6 | 0.24 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | - | 3 | 15 | 15 February 2024 | | 50.2 | 16.65 | 0.19 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | - | 4 | 15 | 01 March 2024 | | 33.51 | 16.69 | 0.15 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | - | 5 | 15 | 16 March 2024 | | 16.77 | 16.74 | 0.1 | 0.0 | 0.0 | 16.84 | 0.0 | 0.0 | 0.0 | 16.84 | - | 6 | 15 | 31 March 2024 | | 0.0 | 16.77 | 0.05 | 0.0 | 0.0 | 16.82 | 0.0 | 0.0 | 0.0 | 16.82 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 7.99 | 7.99 | 0.0 | 26.03 | + | 3 | 31 | 01 April 2024 | | 50.48 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.95 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.02 | 0.0 | 0.0 | 101.02 | 0.0 | 0.0 | 0.0 | 101.02 | - When Admin sets the business date to "16 January 2024" - And Customer makes "AUTOPAY" repayment on "16 January 2024" with 16.98 EUR transaction amount - When Admin sets the business date to "31 January 2024" - And Customer makes "AUTOPAY" repayment on "31 January 2024" with 16.98 EUR transaction amount - When Admin sets the business date to "15 February 2024" - And Customer makes "AUTOPAY" repayment on "15 February 2024" with 16.98 EUR transaction amount - When Admin sets the business date to "10 March 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 30 | DAYS | 01 April 2024| 2 | - Then Loan Repayment schedule has 7 periods, with the following data for periods: + | 117.01 | 2.1 | 0.0 | 0.0 | 119.11 | 25.0 | 7.99 | 0.0 | 94.11 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "21 February 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 March 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 8 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 15 | 16 January 2024 | 16 January 2024 | 83.45 | 16.55 | 0.29 | 0.0 | 0.0 | 16.84 | 16.84 | 0.0 | 0.0 | 0.0 | - | 2 | 15 | 31 January 2024 | 31 January 2024 | 66.85 | 16.6 | 0.24 | 0.0 | 0.0 | 16.84 | 16.84 | 0.14 | 0.0 | 0.0 | - | 3 | 15 | 15 February 2024 | 15 February 2024 | 50.2 | 16.65 | 0.19 | 0.0 | 0.0 | 16.84 | 16.84 | 0.28 | 0.0 | 0.0 | - | 4 | 15 | 01 March 2024 | 10 March 2024 | 49.78 | 0.42 | 0.0 | 0.0 | 0.0 | 0.42 | 0.42 | 0.42 | 0.0 | 0.0 | - | 5 | 9 | 10 March 2024 | 10 March 2024 | 49.78 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 6 | 22 | 01 April 2024 | | 25.04 | 24.74 | 0.45 | 0.0 | 0.0 | 25.19 | 0.0 | 0.0 | 0.0 | 25.19 | - | 7 | 30 | 01 May 2024 | | 0.0 | 25.04 | 0.15 | 0.0 | 0.0 | 25.19 | 0.0 | 0.0 | 0.0 | 25.19 | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 20 | 21 February 2024 | 21 February 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 9 | 01 March 2024 | | 77.16 | 15.43 | 0.06 | 0.0 | 0.0 | 15.49 | 0.0 | 0.0 | 0.0 | 15.49 | + | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.06 | 0.0 | 0.0 | 15.49 | 0.0 | 0.0 | 0.0 | 15.49 | + | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.06 | 0.0 | 0.0 | 15.49 | 0.0 | 0.0 | 0.0 | 15.49 | + | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.06 | 0.0 | 0.0 | 15.49 | 0.0 | 0.0 | 0.0 | 15.49 | + | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.06 | 0.0 | 0.0 | 15.49 | 0.0 | 0.0 | 0.0 | 15.49 | + | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.07 | 0.0 | 0.0 | 15.51 | 0.0 | 0.0 | 0.0 | 15.51 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.32 | 0.0 | 0.0 | 101.32 | 50.94 | 0.84 | 0.0 | 50.38 | + | 117.01 | 0.95 | 0.0 | 0.0 | 117.96 | 25.0 | 7.99 | 0.0 | 92.96 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 16 January 2024 | Repayment | 16.98 | 16.69 | 0.29 | 0.0 | 0.0 | 83.31 | false | false | - | 31 January 2024 | Repayment | 16.98 | 16.74 | 0.24 | 0.0 | 0.0 | 66.57 | false | false | - | 15 February 2024 | Repayment | 16.98 | 16.79 | 0.19 | 0.0 | 0.0 | 49.78 | false | false | - | 10 March 2024 | Re-age | 50.02 | 49.78 | 0.24 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "10 March 2024" + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + | 21 February 2024 | Re-age | 92.96 | 92.59 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "21 February 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4302 @AdvancedPaymentAllocation - Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed from DAYS to WEEKS with penalties - UC13.7 + @TestRailId:C4335 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging on 1st installment after repay and charge on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC4.2 When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 60 | DAYS | 10 | DAYS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 10 | 11 January 2024 | | 83.41 | 16.59 | 0.19 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | - | 2 | 10 | 21 January 2024 | | 66.79 | 16.62 | 0.16 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | - | 3 | 10 | 31 January 2024 | | 50.14 | 16.65 | 0.13 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | - | 4 | 10 | 10 February 2024 | | 33.46 | 16.68 | 0.1 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | - | 5 | 10 | 20 February 2024 | | 16.75 | 16.71 | 0.07 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | - | 6 | 10 | 01 March 2024 | | 0.0 | 16.75 | 0.03 | 0.0 | 0.0 | 16.78 | 0.0 | 0.0 | 0.0 | 16.78 | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.68 | 0.0 | 0.0 | 100.68 | 0.0 | 0.0 | 0.0 | 100.68 | - When Admin sets the business date to "11 January 2024" - And Customer makes "AUTOPAY" repayment on "11 January 2024" with 16.8 EUR transaction amount - When Admin sets the business date to "31 January 2024" - When Admin adds "LOAN_NSF_FEE" due date charge with "31 January 2024" due date and 5 EUR transaction amount - 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 | 31 January 2024 | Flat | 5.0 | 0.0 | 0.0 | 5.0 | - When Admin sets the business date to "15 February 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | WEEKS | 01 March 2024 | 6 | - Then Loan Repayment schedule has 11 periods, with the following data for periods: + | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + + When Admin sets the business date to "01 February 2024" + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount + Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 10 | 11 January 2024 | 11 January 2024 | 83.41 | 16.59 | 0.19 | 0.0 | 0.0 | 16.78 | 16.78 | 0.0 | 0.0 | 0.0 | - | 2 | 10 | 21 January 2024 | 15 February 2024 | 83.39 | 0.02 | 0.0 | 0.0 | 0.0 | 0.02 | 0.02 | 0.02 | 0.0 | 0.0 | - | 3 | 10 | 31 January 2024 | | 83.39 | 0.0 | 0.0 | 0.0 | 5.0 | 5.0 | 0.0 | 0.0 | 0.0 | 5.0 | - | 4 | 10 | 10 February 2024 | 15 February 2024 | 83.39 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 5 | 15 February 2024 | 15 February 2024 | 83.39 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 6 | 15 | 01 March 2024 | | 70.11 | 13.28 | 0.8 | 0.0 | 0.0 | 14.08 | 0.0 | 0.0 | 0.0 | 14.08 | - | 7 | 7 | 08 March 2024 | | 56.13 | 13.98 | 0.1 | 0.0 | 0.0 | 14.08 | 0.0 | 0.0 | 0.0 | 14.08 | - | 8 | 7 | 15 March 2024 | | 42.13 | 14.0 | 0.08 | 0.0 | 0.0 | 14.08 | 0.0 | 0.0 | 0.0 | 14.08 | - | 9 | 7 | 22 March 2024 | | 28.11 | 14.02 | 0.06 | 0.0 | 0.0 | 14.08 | 0.0 | 0.0 | 0.0 | 14.08 | - | 10 | 7 | 29 March 2024 | | 14.07 | 14.04 | 0.04 | 0.0 | 0.0 | 14.08 | 0.0 | 0.0 | 0.0 | 14.08 | - | 11 | 7 | 05 April 2024 | | 0.0 | 14.07 | 0.02 | 0.0 | 0.0 | 14.09 | 0.0 | 0.0 | 0.0 | 14.09 | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 5.0 | 106.29 | 16.8 | 0.02 | 0.0 | 89.49 | + | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 11 January 2024 | Repayment | 16.8 | 16.61 | 0.19 | 0.0 | 0.0 | 83.39 | false | false | - | 15 February 2024 | Re-age | 83.95 | 83.39 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - 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 | 31 January 2024 | Flat | 5.0 | 0.0 | 0.0 | 5.0 | - When Loan Pay-off is made on "15 February 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - @TestRailId:C4303 @AdvancedPaymentAllocation - Scenario: Verify allowing Re-aging on interest bearing loan - Interest calculation: Default Behavior - due date and frequency changed - change from WEEKS to MONTHS with multiple repayment transactions - UC13.8 - When Admin sets the business date to "01 January 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_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 18 | WEEKS | 3 | WEEKS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount + And Admin adds "LOAN_NSF_FEE" due date charge with "01 February 2024" due date and 10 EUR transaction amount Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 21 | 22 January 2024 | | 83.5 | 16.5 | 0.41 | 0.0 | 0.0 | 16.91 | 0.0 | 0.0 | 0.0 | 16.91 | - | 2 | 21 | 12 February 2024 | | 66.93 | 16.57 | 0.34 | 0.0 | 0.0 | 16.91 | 0.0 | 0.0 | 0.0 | 16.91 | - | 3 | 21 | 04 March 2024 | | 50.29 | 16.64 | 0.27 | 0.0 | 0.0 | 16.91 | 0.0 | 0.0 | 0.0 | 16.91 | - | 4 | 21 | 25 March 2024 | | 33.59 | 16.7 | 0.21 | 0.0 | 0.0 | 16.91 | 0.0 | 0.0 | 0.0 | 16.91 | - | 5 | 21 | 15 April 2024 | | 16.82 | 16.77 | 0.14 | 0.0 | 0.0 | 16.91 | 0.0 | 0.0 | 0.0 | 16.91 | - | 6 | 21 | 06 May 2024 | | 0.0 | 16.82 | 0.07 | 0.0 | 0.0 | 16.89 | 0.0 | 0.0 | 0.0 | 16.89 | + | Nr | Days | Date | Paid date | Balance of loan | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 10.0 | 27.01 | 17.01 | 0.0 | 0.0 | 10.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.44 | 0.0 | 0.0 | 101.44 | 0.0 | 0.0 | 0.0 | 101.44 | - When Admin sets the business date to "22 January 2024" - And Customer makes "AUTOPAY" repayment on "22 January 2024" with 17.16 EUR transaction amount - When Admin sets the business date to "12 February 2024" - And Customer makes "AUTOPAY" repayment on "12 February 2024" with 17.16 EUR transaction amount - When Admin sets the business date to "04 March 2024" - And Customer makes "AUTOPAY" repayment on "04 March 2024" with 10.0 EUR transaction amount - When Admin sets the business date to "20 March 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | - | 1 | MONTHS | 01 April 2024| 4 | + | 100.0 | 1.81 | 0.0 | 10.0 | 111.81 | 25.0 | 7.99 | 0.0 | 86.81 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + 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 | 01 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | + + When Admin sets the business date to "21 February 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 21 February 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 8 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 21 | 22 January 2024 | 22 January 2024 | 83.5 | 16.5 | 0.41 | 0.0 | 0.0 | 16.91 | 16.91 | 0.0 | 0.0 | 0.0 | - | 2 | 21 | 12 February 2024 | 12 February 2024 | 66.93 | 16.57 | 0.34 | 0.0 | 0.0 | 16.91 | 16.91 | 0.25 | 0.0 | 0.0 | - | 3 | 21 | 04 March 2024 | 20 March 2024 | 56.7 | 10.23 | 0.27 | 0.0 | 0.0 | 10.5 | 10.5 | 0.5 | 0.0 | 0.0 | - | 4 | 16 | 20 March 2024 | 20 March 2024 | 56.7 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 12 | 01 April 2024 | | 42.63 | 14.07 | 0.31 | 0.0 | 0.0 | 14.38 | 0.0 | 0.0 | 0.0 | 14.38 | - | 6 | 30 | 01 May 2024 | | 28.5 | 14.13 | 0.25 | 0.0 | 0.0 | 14.38 | 0.0 | 0.0 | 0.0 | 14.38 | - | 7 | 31 | 01 June 2024 | | 14.29 | 14.21 | 0.17 | 0.0 | 0.0 | 14.38 | 0.0 | 0.0 | 0.0 | 14.38 | - | 8 | 30 | 01 July 2024 | | 0.0 | 14.29 | 0.08 | 0.0 | 0.0 | 14.37 | 0.0 | 0.0 | 0.0 | 14.37 | + | 1 | 31 | 01 February 2024 | 21 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 20 | 21 February 2024 | 21 February 2024 | 75.58 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 0 | 21 February 2024 | | 62.99 | 12.59 | 0.05 | 0.0 | 1.67 | 14.31 | 0.0 | 0.0 | 0.0 | 14.31 | + | 4 | 29 | 21 March 2024 | | 50.4 | 12.59 | 0.05 | 0.0 | 1.67 | 14.31 | 0.0 | 0.0 | 0.0 | 14.31 | + | 5 | 31 | 21 April 2024 | | 37.81 | 12.59 | 0.05 | 0.0 | 1.67 | 14.31 | 0.0 | 0.0 | 0.0 | 14.31 | + | 6 | 30 | 21 May 2024 | | 25.22 | 12.59 | 0.05 | 0.0 | 1.67 | 14.31 | 0.0 | 0.0 | 0.0 | 14.31 | + | 7 | 31 | 21 June 2024 | | 12.63 | 12.59 | 0.05 | 0.0 | 1.67 | 14.31 | 0.0 | 0.0 | 0.0 | 14.31 | + | 8 | 30 | 21 July 2024 | | 0.0 | 12.63 | 0.05 | 0.0 | 1.65 | 14.33 | 0.0 | 0.0 | 0.0 | 14.33 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.83 | 0.0 | 0.0 | 101.83 | 44.32 | 0.75 | 0.0 | 57.51 | + | 100.0 | 0.88 | 0.0 | 10.0 | 110.88 | 25.0 | 7.99 | 0.0 | 85.88 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 22 January 2024 | Repayment | 17.16 | 16.75 | 0.41 | 0.0 | 0.0 | 83.25 | false | false | - | 12 February 2024 | Repayment | 17.16 | 16.82 | 0.34 | 0.0 | 0.0 | 66.43 | false | false | - | 04 March 2024 | Repayment | 10.0 | 9.73 | 0.27 | 0.0 | 0.0 | 56.7 | false | false | - | 20 March 2024 | Re-age | 56.88 | 56.7 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "20 March 2024" + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 21 February 2024 | Re-age | 85.88 | 75.58 | 0.3 | 0.0 | 10.0 | 0.0 | false | false | + + When Loan Pay-off is made on "21 February 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4369 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging during 2nd installment after chargeback on reage start date on a closed period transaction with partially paid installment; adjust to last - interest bearing loan with default behaviour; payable interest - UC1 + @TestRailId:C4336 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging on date after maturity date after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC4.3 When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a fully customized loan with the following data: @@ -10172,6 +19361,7 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -10190,39 +19380,56 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - When Admin sets the business date to "1 February 2024" - When Admin runs inline COB job for Loan + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - When Admin sets the business date to "1 April 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 15 February 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 8 periods, with the following data for periods: + Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 15 February 2024 | 15 February 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 0 | 15 February 2024 | | 77.15 | 15.44 | 0.26 | 0.0 | 0.0 | 15.7 | 0.0 | 0.0 | 0.0 | 15.7 | - | 4 | 29 | 15 March 2024 | | 61.99 | 15.16 | 0.54 | 0.0 | 0.0 | 15.7 | 0.0 | 0.0 | 0.0 | 15.7 | - | 5 | 31 | 15 April 2024 | | 46.75 | 15.24 | 0.46 | 0.0 | 0.0 | 15.7 | 0.0 | 0.0 | 0.0 | 15.7 | - | 6 | 30 | 15 May 2024 | | 31.32 | 15.43 | 0.27 | 0.0 | 0.0 | 15.7 | 0.0 | 0.0 | 0.0 | 15.7 | - | 7 | 31 | 15 June 2024 | | 15.8 | 15.52 | 0.18 | 0.0 | 0.0 | 15.7 | 0.0 | 0.0 | 0.0 | 15.7 | - | 8 | 30 | 15 July 2024 | | 0.0 | 15.8 | 0.09 | 0.0 | 0.0 | 15.89 | 0.0 | 0.0 | 0.0 | 15.89 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "01 March 2024" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 August 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 153 | 01 August 2024 | | 77.16 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 4 | 31 | 01 September 2024 | | 61.73 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 5 | 30 | 01 October 2024 | | 46.3 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 6 | 31 | 01 November 2024 | | 30.87 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 7 | 30 | 01 December 2024 | | 15.44 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 8 | 31 | 01 January 2025 | | 0.0 | 15.44 | 0.09 | 0.0 | 0.0 | 15.53 | 0.0 | 0.0 | 0.0 | 15.53 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.38 | 0.0 | 0.0 | 119.39 | 25.0 | 7.99 | 0.0 | 94.39 | + | 117.01 | 1.12 | 0.0 | 0.0 | 118.13 | 25.0 | 7.99 | 0.0 | 93.13 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 15 February 2024 | Re-age | 92.85 | 92.59 | 0.26 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "1 April 2024" + | 01 March 2024 | Re-age | 93.13 | 92.59 | 0.54 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "01 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4378 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging on 2nd due after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with default behaviour - UC2 + @TestRailId:C4337 @AdvancedPaymentAllocation + Scenario: Verify Loan backdated re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to next - interest bearing loan with equal amortization; outstanding payable interest - UC4.4 When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a fully customized loan with the following data: @@ -10245,8 +19452,8 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + When Admin sets the business date to "01 February 2024" - # When Admin runs inline COB job for Loan And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount Then Loan Repayment schedule has 6 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 | @@ -10264,41 +19471,61 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - When Admin sets the business date to "1 April 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "01 March 2024" When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 1 March 2024 | 6 | DEFAULT | + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 March 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | Then Loan Repayment schedule has 8 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 0 | 01 March 2024 | | 77.38 | 15.21 | 0.54 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | - | 4 | 31 | 01 April 2024 | | 62.17 | 15.21 | 0.54 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | - | 5 | 30 | 01 May 2024 | | 46.78 | 15.39 | 0.36 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | - | 6 | 31 | 01 June 2024 | | 31.3 | 15.48 | 0.27 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | - | 7 | 30 | 01 July 2024 | | 15.73 | 15.57 | 0.18 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | - | 8 | 31 | 01 August 2024 | | 0.0 | 15.73 | 0.09 | 0.0 | 0.0 | 15.82 | 0.0 | 0.0 | 0.0 | 15.82 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 0 | 01 March 2024 | | 77.16 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | + | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.09 | 0.0 | 0.0 | 15.53 | 0.0 | 0.0 | 0.0 | 15.53 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.56 | 0.0 | 0.0 | 119.57 | 25.0 | 7.99 | 0.0 | 94.57 | + | 117.01 | 1.12 | 0.0 | 0.0 | 118.13 | 25.0 | 7.99 | 0.0 | 93.13 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | | 01 March 2024 | Re-age | 93.13 | 92.59 | 0.54 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "1 April 2024" + + When Loan Pay-off is made on "1 March 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4379 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with default behaviour - UC3 + @TestRailId:C4338 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding full interest - UC4.1 When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_INTEREST_RECALC_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -10316,58 +19543,80 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 7.99 | 7.99 | 0.0 | 9.02 | + | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | + | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 25.0 | 7.99 | 0.0 | 77.0 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - When Admin sets the business date to "1 April 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 7.99 | 7.99 | 0.0 | 26.03 | + | 3 | 31 | 01 April 2024 | | 50.48 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.95 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 2.1 | 0.0 | 0.0 | 119.11 | 25.0 | 7.99 | 0.0 | 94.11 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "21 February 2024" When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 February 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 7 periods, with the following data for periods: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 March 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 8 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 92.59 | 24.42 | 0.58 | 0.0 | 0.0 | 25.0 | 25.0 | 7.99 | 0.0 | 0.0 | - | 2 | 0 | 01 February 2024 | | 76.9 | 15.69 | 0.0 | 0.0 | 0.0 | 15.69 | 0.0 | 0.0 | 0.0 | 15.69 | - | 3 | 29 | 01 March 2024 | | 61.79 | 15.11 | 0.58 | 0.0 | 0.0 | 15.69 | 0.0 | 0.0 | 0.0 | 15.69 | - | 4 | 31 | 01 April 2024 | | 46.68 | 15.11 | 0.58 | 0.0 | 0.0 | 15.69 | 0.0 | 0.0 | 0.0 | 15.69 | - | 5 | 30 | 01 May 2024 | | 31.31 | 15.37 | 0.32 | 0.0 | 0.0 | 15.69 | 0.0 | 0.0 | 0.0 | 15.69 | - | 6 | 31 | 01 June 2024 | | 15.85 | 15.46 | 0.23 | 0.0 | 0.0 | 15.69 | 0.0 | 0.0 | 0.0 | 15.69 | - | 7 | 30 | 01 July 2024 | | 0.0 | 15.85 | 0.14 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 20 | 21 February 2024 | 21 February 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 9 | 01 March 2024 | | 77.16 | 15.43 | 0.25 | 0.0 | 0.0 | 15.68 | 0.0 | 0.0 | 0.0 | 15.68 | + | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.25 | 0.0 | 0.0 | 15.68 | 0.0 | 0.0 | 0.0 | 15.68 | + | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.25 | 0.0 | 0.0 | 15.68 | 0.0 | 0.0 | 0.0 | 15.68 | + | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.25 | 0.0 | 0.0 | 15.68 | 0.0 | 0.0 | 0.0 | 15.68 | + | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.25 | 0.0 | 0.0 | 15.68 | 0.0 | 0.0 | 0.0 | 15.68 | + | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.27 | 0.0 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.43 | 0.0 | 0.0 | 119.44 | 25.0 | 7.99 | 0.0 | 94.44 | + | 117.01 | 2.1 | 0.0 | 0.0 | 119.11 | 25.0 | 7.99 | 0.0 | 94.11 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 01 February 2024 | Re-age | 92.59 | 92.59 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | -# When Loan Pay-off is made on "1 April 2024" -# Then Loan is closed with zero outstanding balance and it's all installments have obligations met //cause error 500 + | 21 February 2024 | Re-age | 94.11 | 92.59 | 1.52 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "21 February 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4380 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with partial chargeback with custom payment alloc on re-age transaction date - interest bearing loan with default behaviour - UC6.2.1 + @TestRailId:C4339 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging on 1st installment after repay and charge on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding full interest - UC4.2 When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -10385,75 +19634,55 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 34.02 EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 66.95 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.23 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.41 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 17.01 | 16.4 | 0.1 | 0.0 | 0.0 | 16.5 | 0.0 | 0.0 | 0.0 | 16.5 | + | 6 | 30 | 01 July 2024 | 01 February 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + | 100.0 | 1.55 | 0.0 | 0.0 | 101.55 | 34.02 | 17.01 | 0.0 | 67.53 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "15 March 2024" + | 01 February 2024 | Repayment | 34.02 | 33.44 | 0.58 | 0.0 | 0.0 | 66.56 | false | false | + + When Admin sets the business date to "21 February 2024" When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount - Then Loan Repayment schedule has 9 periods, with the following data for periods: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 8 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 70.28 | 22.71 | 1.59 | 0.0 | 0.0 | 24.3 | 0.0 | 0.0 | 0.0 | 24.3 | - | 5 | 30 | 01 May 2024 | | 56.39 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 01 June 2024 | | 42.42 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 30 | 01 July 2024 | | 28.37 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 August 2024 | | 14.24 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 9 | 31 | 01 September 2024 | | 0.0 | 14.24 | 0.08 | 0.0 | 0.0 | 14.32 | 0.0 | 0.0 | 0.0 | 14.32 | + | 2 | 20 | 21 February 2024 | 21 February 2024 | 66.56 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | + | 3 | 40 | 01 April 2024 | | 55.46 | 11.1 | 0.16 | 0.0 | 0.0 | 11.26 | 0.0 | 0.0 | 0.0 | 11.26 | + | 4 | 30 | 01 May 2024 | | 44.36 | 11.1 | 0.16 | 0.0 | 0.0 | 11.26 | 0.0 | 0.0 | 0.0 | 11.26 | + | 5 | 31 | 01 June 2024 | | 33.26 | 11.1 | 0.16 | 0.0 | 0.0 | 11.26 | 0.0 | 0.0 | 0.0 | 11.26 | + | 6 | 30 | 01 July 2024 | | 22.16 | 11.1 | 0.16 | 0.0 | 0.0 | 11.26 | 0.0 | 0.0 | 0.0 | 11.26 | + | 7 | 31 | 01 August 2024 | | 11.06 | 11.1 | 0.16 | 0.0 | 0.0 | 11.26 | 0.0 | 0.0 | 0.0 | 11.26 | + | 8 | 31 | 01 September 2024 | | 0.0 | 11.06 | 0.17 | 0.0 | 0.0 | 11.23 | 0.0 | 0.0 | 0.0 | 11.23 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 109.42 | 3.41 | 0.0 | 0.0 | 112.83 | 17.01 | 0.0 | 0.0 | 95.82 | + | 100.0 | 1.55 | 0.0 | 0.0 | 101.55 | 34.02 | 17.01 | 0.0 | 67.53 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | - When Loan Pay-off is made on "15 March 2024" + | 01 February 2024 | Repayment | 34.02 | 33.44 | 0.58 | 0.0 | 0.0 | 66.56 | false | false | + | 21 February 2024 | Re-age | 67.53 | 66.56 | 0.97 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "21 February 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4381 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging post maturity date after chargeback on reage start date on a closed period transaction with partially paid installment; adjust to last - interest bearing loan with default behaviour - UC5.1 + @TestRailId:C4340 @AdvancedPaymentAllocation + Scenario: Verify Loan re-aging on date after maturity date after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding full interest - UC4.3 When Admin sets the business date to "01 January 2024" When Admin creates a client with random data When Admin creates a fully customized loan with the following data: @@ -10476,6 +19705,7 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -10494,44 +19724,61 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - When Admin sets the business date to "1 February 2024" + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - When Admin sets the business date to "1 April 2024" + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + + When Admin sets the business date to "01 March 2024" When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 August 2024 | 6 | DEFAULT | - Then Loan Repayment schedule has 9 periods, with the following data for periods: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 August 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 8 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 April 2024 | 100.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 4 | 122 | 01 August 2024 | | 79.63 | 12.96 | 3.24 | 0.0 | 0.0 | 16.2 | 0.0 | 0.0 | 0.0 | 16.2 | - | 5 | 31 | 01 September 2024 | | 63.89 | 15.74 | 0.46 | 0.0 | 0.0 | 16.2 | 0.0 | 0.0 | 0.0 | 16.2 | - | 6 | 30 | 01 October 2024 | | 48.06 | 15.83 | 0.37 | 0.0 | 0.0 | 16.2 | 0.0 | 0.0 | 0.0 | 16.2 | - | 7 | 31 | 01 November 2024 | | 32.14 | 15.92 | 0.28 | 0.0 | 0.0 | 16.2 | 0.0 | 0.0 | 0.0 | 16.2 | - | 8 | 30 | 01 December 2024 | | 16.13 | 16.01 | 0.19 | 0.0 | 0.0 | 16.2 | 0.0 | 0.0 | 0.0 | 16.2 | - | 9 | 31 | 01 January 2025 | | 0.0 | 16.13 | 0.09 | 0.0 | 0.0 | 16.22 | 0.0 | 0.0 | 0.0 | 16.22 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 153 | 01 August 2024 | | 77.16 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 4 | 31 | 01 September 2024 | | 61.73 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 5 | 30 | 01 October 2024 | | 46.3 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 6 | 31 | 01 November 2024 | | 30.87 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 7 | 30 | 01 December 2024 | | 15.44 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 8 | 31 | 01 January 2025 | | 0.0 | 15.44 | 0.23 | 0.0 | 0.0 | 15.67 | 0.0 | 0.0 | 0.0 | 15.67 | Then Loan Repayment schedule has the following data in Total row: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 5.21 | 0.0 | 0.0 | 122.22 | 25.0 | 7.99 | 0.0 | 97.22 | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | Then Loan Transactions tab has the following data: | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 01 April 2024 | Re-age | 93.67 | 92.59 | 1.08 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "1 April 2024" + | 01 March 2024 | Re-age | 93.92 | 92.59 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "01 MArch 2024" Then Loan is closed with zero outstanding balance and it's all installments have obligations met - @TestRailId:C4386 @AdvancedPaymentAllocation - Scenario: Verify that Re-aging with DEFAULT interest handling is forbidden on written-off loan + @TestRailId:C4341 @AdvancedPaymentAllocation + Scenario: Verify Loan backdated re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to next - interest bearing loan with equal amortization; outstanding full interest - UC4.4 When Admin sets the business date to "01 January 2024" When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | + | 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_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount Then Loan Repayment schedule has 6 periods, with the following data for periods: @@ -10547,36 +19794,72 @@ Then Loan Repayment schedule has 4 periods, with the following data for periods: | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount + And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | + | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + + When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount + Then Loan Repayment schedule has 6 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | + | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | + | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | + Then Loan Transactions tab has the following data: + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + When Admin sets the business date to "01 March 2024" - And Admin does write-off the loan on "01 March 2024" - Then Loan status will be "CLOSED_WRITTEN_OFF" + When Admin creates a Loan re-aging transaction by Loan external ID with the following data: + | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | + | 1 | MONTHS | 01 March 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | + Then Loan Repayment schedule has 8 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 | + | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | + | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | + | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | + | 3 | 0 | 01 March 2024 | | 77.16 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | + | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.23 | 0.0 | 0.0 | 15.67 | 0.0 | 0.0 | 0.0 | 15.67 | + Then Loan Repayment schedule has the following data in Total row: + | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | + | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Close (as written-off) | 85.04 | 83.57 | 1.47 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "15 March 2024" - Then Admin fails to create a Loan re-aging transaction with the following data because loan was closed: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | DEFAULT | + | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | + | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | + | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | + | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | + | 01 March 2024 | Re-age | 93.92 | 92.59 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | + + When Loan Pay-off is made on "1 March 2024" + Then Loan is closed with zero outstanding balance and it's all installments have obligations met diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingEqualAmortization.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingEqualAmortization.feature deleted file mode 100644 index 71427d4ac67..00000000000 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingEqualAmortization.feature +++ /dev/null @@ -1,10862 +0,0 @@ -@LoanReAgingEqualAmortizationFeature -Feature: LoanReAgingEqualAmortization - - @TestRailId:C4198 @AdvancedPaymentAllocation - Scenario: Verify Re-aging reversal on interest bearing loan - UC3: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | -# --- Reversal of re-age transaction --- - When Admin sets the business date to "01 April 2024" - And Admin successfully undo Loan re-aging transaction - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 17.01 | 0.0 | 0.0 | 85.14 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | true | - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4199 @AdvancedPaymentAllocation - Scenario: Verify Re-aging reversal on interest bearing loan - UC4: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | -# --- Reversal of re-age transaction --- - When Admin sets the business date to "01 April 2024" - And Admin successfully undo Loan re-aging transaction - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 17.01 | 0.0 | 0.0 | 85.14 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | true | - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4158 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment - interest bearing loan with equal amortization; outstanding payable interest + outstanding principal - UC1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - - When Admin sets the business date to "16 March 2024" - When Admin runs inline COB job for Loan - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 16 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 19 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - - | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "16 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4159 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and 2nd disb before re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC1.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin successfully disburse the loan on "01 February 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | | | 01 February 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 2 | 29 | 01 March 2024 | | 107.17 | 26.4 | 0.78 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | - | 3 | 31 | 01 April 2024 | | 80.62 | 26.55 | 0.63 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | - | 4 | 30 | 01 May 2024 | | 53.91 | 26.71 | 0.47 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | - | 5 | 31 | 01 June 2024 | | 27.04 | 26.87 | 0.31 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | - | 6 | 30 | 01 July 2024 | | 0.0 | 27.04 | 0.16 | 0.0 | 0.0 | 27.2 | 0.0 | 0.0 | 0.0 | 27.2 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.93 | 0.0 | 0.0 | 152.93 | 17.01 | 0.0 | 0.0 | 135.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | | | 01 February 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.19 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | - | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.19 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | - | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.19 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | - | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.19 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | - | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.19 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.18 | 0.0 | 0.0 | 22.45 | 0.0 | 0.0 | 0.0 | 22.45 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 1.71 | 0.0 | 0.0 | 151.71 | 17.01 | 0.0 | 0.0 | 134.7 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 14 March 2024 | Accrual | 1.69 | 0.0 | 1.69 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 134.7 | 133.57 | 1.13 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @Skip - @TestRailId:C4245 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with 2nd disb before and with chargeback and undo last disb after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC1.2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "01 March 2024" - When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 31 | 01 April 2024 | | 88.04 | 29.01 | 0.68 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | - | 4 | 30 | 01 May 2024 | | 58.86 | 29.18 | 0.51 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | - | 5 | 31 | 01 June 2024 | | 29.51 | 29.35 | 0.34 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | - | 6 | 30 | 01 July 2024 | | 0.0 | 29.51 | 0.17 | 0.0 | 0.0 | 29.68 | 0.0 | 0.0 | 0.0 | 29.68 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.77 | 0.0 | 0.0 | 152.77 | 17.01 | 0.0 | 0.0 | 135.76 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 1.42 | 0.0 | 0.0 | 151.42 | 17.01 | 0.0 | 0.0 | 134.41 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 5 | 30 | 01 May 2024 | | 89.05 | 39.27 | 0.14 | 0.0 | 0.0 | 39.41 | 0.0 | 0.0 | 0.0 | 39.41 | - | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 167.01 | 1.42 | 0.0 | 0.0 | 168.43 | 17.01 | 0.0 | 0.0 | 151.42 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 150.58 | false | false | - -# --- undo last disbursement should be allowed on that point --- # - When Admin successfully undo last disbursal - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 March 2024 | 82.99 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 82.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 69.16 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | - | 4 | 30 | 01 May 2024 | | 55.33 | 30.84 | 0.18 | 0.0 | 0.0 | 31.02 | 0.0 | 0.0 | 0.0 | 31.02 | - | 5 | 31 | 01 June 2024 | | 41.5 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | - | 6 | 30 | 01 July 2024 | | 27.67 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | - | 7 | 31 | 01 August 2024 | | 13.84 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | - | 8 | 31 | 01 September 2024 | | 0.0 | 13.84 | 0.16 | 0.0 | 0.0 | 14.0 | 0.0 | 0.0 | 0.0 | 14.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.06 | 0.0 | 0.0 | 118.07 | 17.01 | 0.0 | 0.0 | 101.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | true | - | 15 March 2024 | Re-age | 84.05 | 82.99 | 1.06 | 0.0 | 0.0 | 0.0 | false | true | - | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4246 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with MIR trn before re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC1.3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "01 March 2024" - When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 March 2024" with 34.02 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | - | 4 | 30 | 01 May 2024 | | 33.54 | 16.79 | 0.22 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | - | 5 | 31 | 01 June 2024 | | 16.68 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.68 | 0.07 | 0.0 | 0.0 | 16.75 | 4.26 | 4.26 | 0.0 | 12.49 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.8 | 0.0 | 0.0 | 101.8 | 51.03 | 17.01 | 0.0 | 50.77 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Merchant Issued Refund | 34.02 | 33.53 | 0.49 | 0.0 | 0.0 | 50.04 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 50.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 41.7 | 8.34 | 0.02 | 0.0 | 0.0 | 8.36 | 0.0 | 0.0 | 0.0 | 8.36 | - | 5 | 30 | 01 May 2024 | | 33.36 | 8.34 | 0.02 | 0.0 | 0.0 | 8.36 | 0.0 | 0.0 | 0.0 | 8.36 | - | 6 | 31 | 01 June 2024 | | 25.02 | 8.34 | 0.02 | 0.0 | 0.0 | 8.36 | 0.0 | 0.0 | 0.0 | 8.36 | - | 7 | 30 | 01 July 2024 | | 16.68 | 8.34 | 0.02 | 0.0 | 0.0 | 8.36 | 0.0 | 0.0 | 0.0 | 8.36 | - | 8 | 31 | 01 August 2024 | | 8.34 | 8.34 | 0.02 | 0.0 | 0.0 | 8.36 | 0.0 | 0.0 | 0.0 | 8.36 | - | 9 | 31 | 01 September 2024 | | 0.0 | 8.34 | 0.03 | 0.0 | 0.0 | 8.37 | 0.0 | 0.0 | 0.0 | 8.37 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.2 | 0.0 | 0.0 | 101.2 | 51.03 | 17.01 | 0.0 | 50.17 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Merchant Issued Refund | 34.02 | 33.53 | 0.49 | 0.0 | 0.0 | 50.04 | false | false | - | 15 March 2024 | Re-age | 50.17 | 50.04 | 0.13 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4160 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and charge - interest bearing loan with equal amortization; outstanding payable interest - UC2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 February 2024" - When Admin runs inline COB job for Loan - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 10 EUR transaction amount - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 15 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 10.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 17.01 | 0.0 | 0.0 | 95.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 February 2024 | Accrual | 0.8 | 0.0 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.65 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 5 | 30 | 01 May 2024 | | 55.73 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 6 | 31 | 01 June 2024 | | 41.81 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 7 | 30 | 01 July 2024 | | 27.89 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 8 | 31 | 01 August 2024 | | 13.97 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.97 | 0.11 | 1.65 | 0.0 | 15.73 | 0.0 | 0.0 | 0.0 | 15.73 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 10.0 | 0.0 | 111.29 | 17.01 | 0.0 | 0.0 | 94.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 February 2024 | Accrual | 0.8 | 0.0 | 0.8 | 0.0 | 0.0 | 0.0 | false | false | - - | 15 February 2024 | Accrual | 10.02 | 0.0 | 0.02 | 10.0 | 0.0 | 0.0 | false | false | - | 16 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 19 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - - | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 94.28 | 83.57 | 0.71 | 10.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4161 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with charge and repayment - interest bearing loan with equal amortization; outstanding payable interest - UC2.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 February 2024" - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 10 EUR transaction amount - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 15 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 10.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 17.01 | 0.0 | 0.0 | 95.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "16 February 2024" - And Customer makes "AUTOPAY" repayment on "16 February 2024" with 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 10.0 | 0.0 | 27.01 | 10.0 | 10.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 27.01 | 10.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 16 February 2024 | Repayment | 10.0 | 0.0 | 0.0 | 10.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 10.0 | 0.0 | 10.0 | 10.0 | 10.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 10.0 | 0.0 | 111.29 | 27.01 | 10.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 16 February 2024 | Repayment | 10.0 | 0.0 | 0.0 | 10.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 11.27 | 0.0 | 1.27 | 10.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4162 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with repayment and chargeback - interest bearing loan with equal amortization; outstanding payable interest - UC3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.15 | 33.43 | 0.59 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.15 | 0.0 | 0.0 | 119.16 | 17.01 | 0.0 | 0.0 | 102.15 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 83.82 | 16.76 | 0.14 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | - | 5 | 30 | 01 May 2024 | | 67.06 | 16.76 | 0.14 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | - | 6 | 31 | 01 June 2024 | | 50.3 | 16.76 | 0.14 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | - | 7 | 30 | 01 July 2024 | | 33.54 | 16.76 | 0.14 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | - | 8 | 31 | 01 August 2024 | | 16.78 | 16.76 | 0.14 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | - | 9 | 31 | 01 September 2024 | | 0.0 | 16.78 | 0.15 | 0.0 | 0.0 | 16.93 | 0.0 | 0.0 | 0.0 | 16.93 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.43 | 0.0 | 0.0 | 118.44 | 17.01 | 0.0 | 0.0 | 101.43 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | - - | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 19 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 22 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 23 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 25 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 28 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - - | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 07 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 101.43 | 100.58 | 0.85 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4163 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and full chargeback with payment alloc - interest bearing loan with equal amortization; outstanding payable interest - UC3.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.14 | 32.86 | 1.16 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.43 | 2.72 | 0.0 | 0.0 | 119.15 | 17.01 | 0.0 | 0.0 | 102.14 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 83.34 | 16.66 | 0.24 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | - | 5 | 30 | 01 May 2024 | | 66.68 | 16.66 | 0.24 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | - | 6 | 31 | 01 June 2024 | | 50.02 | 16.66 | 0.24 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | - | 7 | 30 | 01 July 2024 | | 33.36 | 16.66 | 0.24 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | - | 8 | 31 | 01 August 2024 | | 16.7 | 16.66 | 0.24 | 0.0 | 0.0 | 16.9 | 0.0 | 0.0 | 0.0 | 16.9 | - | 9 | 31 | 01 September 2024 | | 0.0 | 16.7 | 0.22 | 0.0 | 0.0 | 16.92 | 0.0 | 0.0 | 0.0 | 16.92 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.43 | 2.0 | 0.0 | 0.0 | 118.43 | 17.01 | 0.0 | 0.0 | 101.42 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.4 | 0.0 | 1.4 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 101.42 | 100.0 | 1.42 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4164 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding payable interest - UC3.2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 25.89 | 1.12 | 0.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | - | 3 | 31 | 01 April 2024 | | 50.48 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.95 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 109.42 | 2.68 | 0.0 | 0.0 | 112.1 | 17.01 | 0.0 | 0.0 | 95.09 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 77.5 | 15.49 | 0.23 | 0.0 | 0.0 | 15.72 | 0.0 | 0.0 | 0.0 | 15.72 | - | 5 | 30 | 01 May 2024 | | 62.01 | 15.49 | 0.23 | 0.0 | 0.0 | 15.72 | 0.0 | 0.0 | 0.0 | 15.72 | - | 6 | 31 | 01 June 2024 | | 46.52 | 15.49 | 0.23 | 0.0 | 0.0 | 15.72 | 0.0 | 0.0 | 0.0 | 15.72 | - | 7 | 30 | 01 July 2024 | | 31.03 | 15.49 | 0.23 | 0.0 | 0.0 | 15.72 | 0.0 | 0.0 | 0.0 | 15.72 | - | 8 | 31 | 01 August 2024 | | 15.54 | 15.49 | 0.23 | 0.0 | 0.0 | 15.72 | 0.0 | 0.0 | 0.0 | 15.72 | - | 9 | 31 | 01 September 2024 | | 0.0 | 15.54 | 0.21 | 0.0 | 0.0 | 15.75 | 0.0 | 0.0 | 0.0 | 15.75 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 109.42 | 1.94 | 0.0 | 0.0 | 111.36 | 17.01 | 0.0 | 0.0 | 94.35 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | - | 14 March 2024 | Accrual | 1.35 | 0.0 | 1.35 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 94.35 | 92.99 | 1.36 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4165 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment, charge and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding payable interest - UC3.3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 8 EUR transaction amount - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 8.0 | 0.0 | 25.01 | 17.01 | 0.0 | 0.0 | 8.0 | - | 2 | 29 | 01 March 2024 | | 67.06 | 18.51 | 0.5 | 8.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.72 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.91 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.91 | 0.1 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 102.0 | 2.06 | 16.0 | 0.0 | 120.06 | 17.01 | 0.0 | 0.0 | 103.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 9.01 | 0.0 | 8.0 | 0.0 | 90.99 | false | false | - | 01 February 2024 | Chargeback | 10.0 | 2.0 | 0.0 | 8.0 | 0.0 | 92.99 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 March 2024 | 90.99 | 9.01 | 0.0 | 8.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 77.49 | 15.5 | 0.23 | 1.33 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | - | 5 | 30 | 01 May 2024 | | 61.99 | 15.5 | 0.23 | 1.33 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | - | 6 | 31 | 01 June 2024 | | 46.49 | 15.5 | 0.23 | 1.33 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | - | 7 | 30 | 01 July 2024 | | 30.99 | 15.5 | 0.23 | 1.33 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | - | 8 | 31 | 01 August 2024 | | 15.49 | 15.5 | 0.23 | 1.33 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | - | 9 | 31 | 01 September 2024 | | 0.0 | 15.49 | 0.21 | 1.35 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 102.0 | 1.36 | 16.0 | 0.0 | 119.36 | 17.01 | 0.0 | 0.0 | 102.35 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 9.01 | 0.0 | 8.0 | 0.0 | 90.99 | false | false | - | 01 February 2024 | Chargeback | 10.0 | 2.0 | 0.0 | 8.0 | 0.0 | 92.99 | false | false | - | 14 March 2024 | Accrual | 9.31 | 0.0 | 1.31 | 8.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 102.35 | 92.99 | 1.36 | 8.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4166 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment, charges(penalty and fee) and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding payable interest - UC3.4 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 8 EUR transaction amount - When Admin adds "LOAN_NSF_FEE" due date charge with "01 February 2024" due date and 10 EUR transaction amount - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 34.02 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 8.0 | 10.0 | 35.01 | 34.02 | 0.0 | 0.0 | 0.99 | - | 2 | 29 | 01 March 2024 | | 67.14 | 32.45 | 0.58 | 0.99 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.02 | 2.14 | 8.99 | 10.0 | 137.15 | 34.02 | 0.0 | 0.0 | 103.13 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 34.02 | 16.02 | 0.0 | 8.0 | 10.0 | 83.98 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 16.02 | 0.0 | 0.99 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 March 2024 | 83.98 | 16.02 | 0.0 | 8.0 | 10.0 | 34.02 | 34.02 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 83.33 | 16.67 | 0.24 | 0.16 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | - | 5 | 30 | 01 May 2024 | | 66.66 | 16.67 | 0.24 | 0.16 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | - | 6 | 31 | 01 June 2024 | | 49.99 | 16.67 | 0.24 | 0.16 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | - | 7 | 30 | 01 July 2024 | | 33.32 | 16.67 | 0.24 | 0.16 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | - | 8 | 31 | 01 August 2024 | | 16.65 | 16.67 | 0.24 | 0.16 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | - | 9 | 31 | 01 September 2024 | | 0.0 | 16.65 | 0.22 | 0.19 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.02 | 1.42 | 8.99 | 10.0 | 136.43 | 34.02 | 0.0 | 0.0 | 102.41 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 34.02 | 16.02 | 0.0 | 8.0 | 10.0 | 83.98 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 16.02 | 0.0 | 0.99 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 19.4 | 0.0 | 1.4 | 8.0 | 10.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 102.41 | 100.0 | 1.42 | 0.99 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4167 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and charges(fee and penalty) with due date after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC3.5 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 April 2024" due date and 8 EUR transaction amount - When Admin adds "LOAN_NSF_FEE" due date charge with "01 April 2024" due date and 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 8.0 | 10.0 | 35.01 | 0.0 | 0.0 | 0.0 | 35.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 8.0 | 10.0 | 120.05 | 0.0 | 0.0 | 0.0 | 120.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 83.34 | 16.66 | 0.24 | 1.33 | 1.67 | 19.9 | 0.0 | 0.0 | 0.0 | 19.9 | - | 5 | 30 | 01 May 2024 | | 66.68 | 16.66 | 0.24 | 1.33 | 1.67 | 19.9 | 0.0 | 0.0 | 0.0 | 19.9 | - | 6 | 31 | 01 June 2024 | | 50.02 | 16.66 | 0.24 | 1.33 | 1.67 | 19.9 | 0.0 | 0.0 | 0.0 | 19.9 | - | 7 | 30 | 01 July 2024 | | 33.36 | 16.66 | 0.24 | 1.33 | 1.67 | 19.9 | 0.0 | 0.0 | 0.0 | 19.9 | - | 8 | 31 | 01 August 2024 | | 16.7 | 16.66 | 0.24 | 1.33 | 1.67 | 19.9 | 0.0 | 0.0 | 0.0 | 19.9 | - | 9 | 31 | 01 September 2024 | | 0.0 | 16.7 | 0.22 | 1.35 | 1.65 | 19.92 | 0.0 | 0.0 | 0.0 | 19.92 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.42 | 8.0 | 10.0 | 119.42 | 0.0 | 0.0 | 0.0 | 119.42 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 April 2024" with 19.9 EUR transaction amount - Then Loan has 99.52 outstanding amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | - - When Admin sets the business date to "01 May 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 May 2024" with 19.9 EUR transaction amount - Then Loan has 79.62 outstanding amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | - | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 66.68 | false | false | - - When Admin sets the business date to "01 June 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 June 2024" with 19.9 EUR transaction amount - Then Loan has 59.72 outstanding amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | - | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 66.68 | false | false | - | 01 June 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 50.02 | false | false | - - When Admin sets the business date to "01 July 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 July 2024" with 19.9 EUR transaction amount - Then Loan has 39.82 outstanding amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | - | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 66.68 | false | false | - | 01 June 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 50.02 | false | false | - | 01 July 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 33.36 | false | false | - - When Admin sets the business date to "01 August 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 August 2024" with 19.9 EUR transaction amount - Then Loan has 19.92 outstanding amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | - | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 66.68 | false | false | - | 01 June 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 50.02 | false | false | - | 01 July 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 33.36 | false | false | - | 01 August 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 16.7 | false | false | - - When Admin sets the business date to "01 September 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 September 2024" with 19.92 EUR transaction amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 119.42 | 100.0 | 1.42 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 83.34 | false | false | - | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 66.68 | false | false | - | 01 June 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 50.02 | false | false | - | 01 July 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 33.36 | false | false | - | 01 August 2024 | Repayment | 19.9 | 16.66 | 0.24 | 1.33 | 1.67 | 16.7 | false | false | - | 01 September 2024 | Repayment | 19.92 | 16.7 | 0.22 | 1.35 | 1.65 | 0.0 | false | false | - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4168 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with repayment and charge - interest bearing loan with equal amortization; outstanding payable interest - UC4 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 July 2024" due date and 10 EUR transaction amount - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 15 July 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.65 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 5 | 30 | 01 May 2024 | | 55.73 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 6 | 31 | 01 June 2024 | | 41.81 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 7 | 30 | 01 July 2024 | | 27.89 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 8 | 31 | 01 August 2024 | | 13.97 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.97 | 0.11 | 1.65 | 0.0 | 15.73 | 0.0 | 0.0 | 0.0 | 15.73 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 10.0 | 0.0 | 111.29 | 17.01 | 0.0 | 0.0 | 94.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 94.28 | 83.57 | 0.71 | 10.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4169 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with partially paid installment - interest bearing loan with equal amortization; outstanding payable interest - UC5 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 7.99 | 7.99 | 0.0 | 9.02 | - | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 25.0 | 7.99 | 0.0 | 77.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 75.58 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 75.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 62.99 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | - | 5 | 30 | 01 May 2024 | | 50.4 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | - | 6 | 31 | 01 June 2024 | | 37.81 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | - | 7 | 30 | 01 July 2024 | | 25.22 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | - | 8 | 31 | 01 August 2024 | | 12.63 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | - | 9 | 31 | 01 September 2024 | | 0.0 | 12.63 | 0.09 | 0.0 | 0.0 | 12.72 | 0.0 | 0.0 | 0.0 | 12.72 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.22 | 0.0 | 0.0 | 101.22 | 25.0 | 7.99 | 0.0 | 76.22 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 14 March 2024 | Accrual | 1.2 | 0.0 | 1.2 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 76.22 | 75.58 | 0.64 | 0.0 | 0.0 | 0.0 | false | false | - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4207 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC5.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 75.58 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 62.99 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | - | 5 | 30 | 01 May 2024 | | 50.4 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | - | 6 | 31 | 01 June 2024 | | 37.81 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | - | 7 | 30 | 01 July 2024 | | 25.22 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | - | 8 | 31 | 01 August 2024 | | 12.63 | 12.59 | 0.11 | 0.0 | 0.0 | 12.7 | 0.0 | 0.0 | 0.0 | 12.7 | - | 9 | 31 | 01 September 2024 | | 0.0 | 12.63 | 0.09 | 0.0 | 0.0 | 12.72 | 0.0 | 0.0 | 0.0 | 12.72 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.22 | 0.0 | 0.0 | 101.22 | 25.0 | 7.99 | 0.0 | 76.22 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 14 March 2024 | Accrual | 1.2 | 0.0 | 1.2 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 76.22 | 75.58 | 0.64 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4170 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with chargeback after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 30.94 | 0.12 | 0.0 | 0.0 | 31.06 | 0.0 | 0.0 | 0.0 | 31.06 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.29 | 0.0 | 0.0 | 118.3 | 17.01 | 0.0 | 0.0 | 101.29 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | - - When Admin sets the business date to "02 April 2024" - When Admin runs inline COB job for Loan - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | - - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4171 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with partial chargeback with custom payment alloc after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 23.35 | 0.7 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 109.42 | 1.87 | 0.0 | 0.0 | 111.29 | 17.01 | 0.0 | 0.0 | 94.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 31 March 2024 | Accrual | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4172 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with full chargeback with custom payment alloc after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6.2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 30.36 | 0.7 | 0.0 | 0.0 | 31.06 | 0.0 | 0.0 | 0.0 | 31.06 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.43 | 1.87 | 0.0 | 0.0 | 118.3 | 17.01 | 0.0 | 0.0 | 101.29 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4173 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with MIR after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6.3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 16 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 19 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - - | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 April 2024" with 34.02 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | 01 April 2024 | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 14.05 | 0.0 | 0.0 | 0.0 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 3.99 | 3.99 | 0.0 | 10.06 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 3.99 | 3.99 | 0.0 | 10.06 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 3.99 | 3.99 | 0.0 | 10.06 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 3.99 | 3.99 | 0.0 | 10.06 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 4.01 | 4.01 | 0.0 | 10.02 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 51.03 | 19.97 | 0.0 | 50.26 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 16 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 19 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - - | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Merchant Issued Refund | 34.02 | 33.9 | 0.12 | 0.0 | 0.0 | 49.67 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4174 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with PR and accrual activity after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6.4 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_REFUND_INTEREST_RECALC_ACCRUAL_ACTIVITY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "01 April 2024" with 34.02 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | 01 April 2024 | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 14.05 | 0.0 | 0.0 | 0.0 | - | 5 | 30 | 01 May 2024 | 01 April 2024 | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 14.05 | 14.05 | 0.0 | 0.0 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 6.41 | 6.41 | 0.0 | 7.64 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 51.52 | 20.46 | 0.0 | 49.77 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Payout Refund | 34.02 | 33.78 | 0.24 | 0.0 | 0.0 | 49.79 | false | false | - | 01 April 2024 | Interest Refund | 0.49 | 0.49 | 0.0 | 0.0 | 0.0 | 49.3 | false | false | - - When Admin sets the business date to "02 April 2024" - When Admin runs inline COB job for Loan - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Payout Refund | 34.02 | 33.78 | 0.24 | 0.0 | 0.0 | 49.79 | false | false | - | 01 April 2024 | Interest Refund | 0.49 | 0.49 | 0.0 | 0.0 | 0.0 | 49.3 | false | false | - | 01 April 2024 | Accrual Activity | 0.12 | 0.0 | 0.12 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4175 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with BuyDownFee after re-age - interest bearing loan with equal amortization; outstanding payable interest - UC6.5 - When Admin sets the business date to "01 January 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_PROGRESSIVE_ADVANCED_PAYMENT_ALLOCATION_BUYDOWN_FEES | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin adds buy down fee with "AUTOPAY" payment type to the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Buy Down Fee | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4176 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with downpayment - interest bearing loan with equal amortization; outstanding payable interest - UC7 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE_AUTO_DOWNPAYMENT | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 4 | 31 | 01 April 2024 | | 37.82 | 12.47 | 0.29 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 5 | 30 | 01 May 2024 | | 25.28 | 12.54 | 0.22 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 6 | 31 | 01 June 2024 | | 12.67 | 12.61 | 0.15 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 7 | 30 | 01 July 2024 | | 0.0 | 12.67 | 0.07 | 0.0 | 0.0 | 12.74 | 0.0 | 0.0 | 0.0 | 12.74 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 25.0 | 0.0 | 0.0 | 76.54 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 12.76 EUR transaction amount - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 4 | 31 | 01 April 2024 | | 37.82 | 12.47 | 0.29 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 5 | 30 | 01 May 2024 | | 25.28 | 12.54 | 0.22 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 6 | 31 | 01 June 2024 | | 12.67 | 12.61 | 0.15 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 7 | 30 | 01 July 2024 | | 0.0 | 12.67 | 0.07 | 0.0 | 0.0 | 12.74 | 0.0 | 0.0 | 0.0 | 12.74 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 37.76 | 0.0 | 0.0 | 63.78 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 10 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 15 March 2024 | 62.68 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 14 | 15 March 2024 | 15 March 2024 | 62.68 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 17 | 01 April 2024 | | 52.23 | 10.45 | 0.09 | 0.0 | 0.0 | 10.54 | 0.0 | 0.0 | 0.0 | 10.54 | - | 6 | 30 | 01 May 2024 | | 41.78 | 10.45 | 0.09 | 0.0 | 0.0 | 10.54 | 0.0 | 0.0 | 0.0 | 10.54 | - | 7 | 31 | 01 June 2024 | | 31.33 | 10.45 | 0.09 | 0.0 | 0.0 | 10.54 | 0.0 | 0.0 | 0.0 | 10.54 | - | 8 | 30 | 01 July 2024 | | 20.88 | 10.45 | 0.09 | 0.0 | 0.0 | 10.54 | 0.0 | 0.0 | 0.0 | 10.54 | - | 9 | 31 | 01 August 2024 | | 10.43 | 10.45 | 0.09 | 0.0 | 0.0 | 10.54 | 0.0 | 0.0 | 0.0 | 10.54 | - | 10 | 31 | 01 September 2024 | | 0.0 | 10.43 | 0.09 | 0.0 | 0.0 | 10.52 | 0.0 | 0.0 | 0.0 | 10.52 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.98 | 0.0 | 0.0 | 100.98 | 37.76 | 0.0 | 0.0 | 63.22 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | - | 14 March 2024 | Accrual | 0.96 | 0.0 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 63.22 | 62.68 | 0.54 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4177 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with repayment - interest bearing loan with equal amortization; outstanding FULL interest - UC1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4178 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and 2nd disb before re-age - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC1.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin successfully disburse the loan on "01 February 2024" with "50" EUR transaction amount - When Admin runs inline COB job for Loan - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | | | 01 February 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 2 | 29 | 01 March 2024 | | 107.17 | 26.4 | 0.78 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | - | 3 | 31 | 01 April 2024 | | 80.62 | 26.55 | 0.63 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | - | 4 | 30 | 01 May 2024 | | 53.91 | 26.71 | 0.47 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | - | 5 | 31 | 01 June 2024 | | 27.04 | 26.87 | 0.31 | 0.0 | 0.0 | 27.18 | 0.0 | 0.0 | 0.0 | 27.18 | - | 6 | 30 | 01 July 2024 | | 0.0 | 27.04 | 0.16 | 0.0 | 0.0 | 27.2 | 0.0 | 0.0 | 0.0 | 27.2 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.93 | 0.0 | 0.0 | 152.93 | 17.01 | 0.0 | 0.0 | 135.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | | | 01 February 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.4 | 0.0 | 0.0 | 22.66 | 0.0 | 0.0 | 0.0 | 22.66 | - | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.4 | 0.0 | 0.0 | 22.66 | 0.0 | 0.0 | 0.0 | 22.66 | - | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.4 | 0.0 | 0.0 | 22.66 | 0.0 | 0.0 | 0.0 | 22.66 | - | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.4 | 0.0 | 0.0 | 22.66 | 0.0 | 0.0 | 0.0 | 22.66 | - | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.4 | 0.0 | 0.0 | 22.66 | 0.0 | 0.0 | 0.0 | 22.66 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.41 | 0.0 | 0.0 | 22.68 | 0.0 | 0.0 | 0.0 | 22.68 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.99 | 0.0 | 0.0 | 152.99 | 17.01 | 0.0 | 0.0 | 135.98 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 04 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 05 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 06 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 07 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 08 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 09 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 11 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 12 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 15 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 17 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 18 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 19 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 20 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 21 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 22 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 23 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 24 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 25 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 26 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 27 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 28 February 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - - | 01 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 02 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 03 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 04 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 05 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 07 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 0.03 | 0.0 | 0.03 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 135.98 | 133.57 | 2.41 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @Skip - @TestRailId:C4247 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with 2nd disb before and with chargeback and undo last disb after re-age - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC1.2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "01 March 2024" - When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 31 | 01 April 2024 | | 88.04 | 29.01 | 0.68 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | - | 4 | 30 | 01 May 2024 | | 58.86 | 29.18 | 0.51 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | - | 5 | 31 | 01 June 2024 | | 29.51 | 29.35 | 0.34 | 0.0 | 0.0 | 29.69 | 0.0 | 0.0 | 0.0 | 29.69 | - | 6 | 30 | 01 July 2024 | | 0.0 | 29.51 | 0.17 | 0.0 | 0.0 | 29.68 | 0.0 | 0.0 | 0.0 | 29.68 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.77 | 0.0 | 0.0 | 152.77 | 17.01 | 0.0 | 0.0 | 135.76 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 111.3 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 5 | 30 | 01 May 2024 | | 89.03 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 6 | 31 | 01 June 2024 | | 66.76 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 7 | 30 | 01 July 2024 | | 44.49 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 8 | 31 | 01 August 2024 | | 22.22 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.22 | 0.39 | 0.0 | 0.0 | 22.61 | 0.0 | 0.0 | 0.0 | 22.61 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.82 | 0.0 | 0.0 | 152.82 | 17.01 | 0.0 | 0.0 | 135.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 135.81 | 133.57 | 2.24 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 111.3 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 5 | 30 | 01 May 2024 | | 89.03 | 39.28 | 0.37 | 0.0 | 0.0 | 39.65 | 0.0 | 0.0 | 0.0 | 39.65 | - | 6 | 31 | 01 June 2024 | | 66.76 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 7 | 30 | 01 July 2024 | | 44.49 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 8 | 31 | 01 August 2024 | | 22.22 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.22 | 0.39 | 0.0 | 0.0 | 22.61 | 0.0 | 0.0 | 0.0 | 22.61 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 167.01 | 2.82 | 0.0 | 0.0 | 169.83 | 17.01 | 0.0 | 0.0 | 152.82 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 135.81 | 133.57 | 2.24 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 150.58 | false | false | - -# --- undo last disbursement should be allowed on that point --- # - When Admin successfully undo last disbursal - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 March 2024 | 82.99 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 82.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 69.16 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | - | 4 | 30 | 01 May 2024 | | 55.33 | 30.84 | 0.18 | 0.0 | 0.0 | 31.02 | 0.0 | 0.0 | 0.0 | 31.02 | - | 5 | 31 | 01 June 2024 | | 41.5 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | - | 6 | 30 | 01 July 2024 | | 27.67 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | - | 7 | 31 | 01 August 2024 | | 13.84 | 13.83 | 0.18 | 0.0 | 0.0 | 14.01 | 0.0 | 0.0 | 0.0 | 14.01 | - | 8 | 31 | 01 September 2024 | | 0.0 | 13.84 | 0.16 | 0.0 | 0.0 | 14.0 | 0.0 | 0.0 | 0.0 | 14.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.06 | 0.0 | 0.0 | 118.07 | 17.01 | 0.0 | 0.0 | 101.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 82.99 | false | true | - | 15 March 2024 | Re-age | 84.05 | 82.99 | 1.06 | 0.0 | 0.0 | 0.0 | false | true | - | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4248 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with MIR trn before re-age - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC1.3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "01 March 2024" - When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 March 2024" with 34.02 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | - | 4 | 30 | 01 May 2024 | | 33.54 | 16.79 | 0.22 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | - | 5 | 31 | 01 June 2024 | | 16.68 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 4.25 | 4.25 | 0.0 | 12.76 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.68 | 0.07 | 0.0 | 0.0 | 16.75 | 4.26 | 4.26 | 0.0 | 12.49 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.8 | 0.0 | 0.0 | 101.8 | 51.03 | 17.01 | 0.0 | 50.77 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Merchant Issued Refund | 34.02 | 33.53 | 0.49 | 0.0 | 0.0 | 50.04 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 50.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 41.7 | 8.34 | 0.12 | 0.0 | 0.0 | 8.46 | 0.0 | 0.0 | 0.0 | 8.46 | - | 5 | 30 | 01 May 2024 | | 33.36 | 8.34 | 0.12 | 0.0 | 0.0 | 8.46 | 0.0 | 0.0 | 0.0 | 8.46 | - | 6 | 31 | 01 June 2024 | | 25.02 | 8.34 | 0.12 | 0.0 | 0.0 | 8.46 | 0.0 | 0.0 | 0.0 | 8.46 | - | 7 | 30 | 01 July 2024 | | 16.68 | 8.34 | 0.12 | 0.0 | 0.0 | 8.46 | 0.0 | 0.0 | 0.0 | 8.46 | - | 8 | 31 | 01 August 2024 | | 8.34 | 8.34 | 0.12 | 0.0 | 0.0 | 8.46 | 0.0 | 0.0 | 0.0 | 8.46 | - | 9 | 31 | 01 September 2024 | | 0.0 | 8.34 | 0.13 | 0.0 | 0.0 | 8.47 | 0.0 | 0.0 | 0.0 | 8.47 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.8 | 0.0 | 0.0 | 101.8 | 51.03 | 17.01 | 0.0 | 50.77 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Merchant Issued Refund | 34.02 | 33.53 | 0.49 | 0.0 | 0.0 | 50.04 | false | false | - | 15 March 2024 | Re-age | 50.77 | 50.04 | 0.73 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4179 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with repayment and charge - interest bearing loan with equal amortization; outstanding FULL interest - UC2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 February 2024" - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 10 EUR transaction amount - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 15 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 1.65 | 0.0 | 15.83 | 0.0 | 0.0 | 0.0 | 15.83 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 10.0 | 0.0 | 112.09 | 17.01 | 0.0 | 0.0 | 95.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 11.27 | 0.0 | 1.27 | 10.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 95.08 | 83.57 | 1.51 | 10.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4180 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with charge and repayment - interest bearing loan with equal amortization; outstanding FULL interest - UC2.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 February 2024" - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 February 2024" due date and 10 EUR transaction amount - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 15 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 10.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 17.01 | 0.0 | 0.0 | 95.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "16 February 2024" - And Customer makes "AUTOPAY" repayment on "16 February 2024" with 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 10.0 | 0.0 | 27.01 | 10.0 | 10.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 27.01 | 10.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 16 February 2024 | Repayment | 10.0 | 0.0 | 0.0 | 10.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 10.0 | 0.0 | 10.0 | 10.0 | 10.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 10.0 | 0.0 | 112.09 | 27.01 | 10.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 16 February 2024 | Repayment | 10.0 | 0.0 | 0.0 | 10.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 11.27 | 0.0 | 1.27 | 10.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4181 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with repayment and chargeback - interest bearing loan with equal amortization; outstanding FULL interest - UC3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.15 | 33.43 | 0.59 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.15 | 0.0 | 0.0 | 119.16 | 17.01 | 0.0 | 0.0 | 102.15 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 83.82 | 16.76 | 0.28 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 5 | 30 | 01 May 2024 | | 67.06 | 16.76 | 0.28 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 6 | 31 | 01 June 2024 | | 50.3 | 16.76 | 0.28 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 7 | 30 | 01 July 2024 | | 33.54 | 16.76 | 0.28 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 8 | 31 | 01 August 2024 | | 16.78 | 16.76 | 0.28 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 9 | 31 | 01 September 2024 | | 0.0 | 16.78 | 0.27 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.25 | 0.0 | 0.0 | 119.26 | 17.01 | 0.0 | 0.0 | 102.25 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | - | 14 March 2024 | Accrual | 1.42 | 0.0 | 1.42 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 102.25 | 100.58 | 1.67 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4182 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding FULL interest - UC3.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 25.89 | 1.12 | 0.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | - | 3 | 31 | 01 April 2024 | | 50.48 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.95 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 109.42 | 2.68 | 0.0 | 0.0 | 112.1 | 17.01 | 0.0 | 0.0 | 95.09 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 77.49 | 15.5 | 0.36 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | - | 5 | 30 | 01 May 2024 | | 61.99 | 15.5 | 0.36 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | - | 6 | 31 | 01 June 2024 | | 46.49 | 15.5 | 0.36 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | - | 7 | 30 | 01 July 2024 | | 30.99 | 15.5 | 0.36 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | - | 8 | 31 | 01 August 2024 | | 15.49 | 15.5 | 0.36 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | - | 9 | 31 | 01 September 2024 | | 0.0 | 15.49 | 0.37 | 0.0 | 0.0 | 15.86 | 0.0 | 0.0 | 0.0 | 15.86 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 109.42 | 2.75 | 0.0 | 0.0 | 112.17 | 17.01 | 0.0 | 0.0 | 95.16 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | - | 14 March 2024 | Accrual | 1.35 | 0.0 | 1.35 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 95.16 | 92.99 | 2.17 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4183 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and full chargeback with payment alloc - interest bearing loan with equal amortization; outstanding FULL interest - UC3.2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.14 | 32.86 | 1.16 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.43 | 2.72 | 0.0 | 0.0 | 119.15 | 17.01 | 0.0 | 0.0 | 102.14 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 83.33 | 16.67 | 0.37 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 5 | 30 | 01 May 2024 | | 66.66 | 16.67 | 0.37 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 6 | 31 | 01 June 2024 | | 49.99 | 16.67 | 0.37 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 7 | 30 | 01 July 2024 | | 33.32 | 16.67 | 0.37 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 8 | 31 | 01 August 2024 | | 16.65 | 16.67 | 0.37 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - | 9 | 31 | 01 September 2024 | | 0.0 | 16.65 | 0.39 | 0.0 | 0.0 | 17.04 | 0.0 | 0.0 | 0.0 | 17.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.43 | 2.82 | 0.0 | 0.0 | 119.25 | 17.01 | 0.0 | 0.0 | 102.24 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.4 | 0.0 | 1.4 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 102.24 | 100.0 | 2.24 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4184 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment, charge and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding FULL interest - UC3.3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - When Admin runs inline COB job for Loan - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 8 EUR transaction amount - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 8.0 | 0.0 | 25.01 | 17.01 | 0.0 | 0.0 | 8.0 | - | 2 | 29 | 01 March 2024 | | 67.06 | 18.51 | 0.5 | 8.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.72 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.91 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.91 | 0.1 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 102.0 | 2.06 | 16.0 | 0.0 | 120.06 | 17.01 | 0.0 | 0.0 | 103.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 9.01 | 0.0 | 8.0 | 0.0 | 90.99 | false | false | - | 01 February 2024 | Chargeback | 10.0 | 2.0 | 0.0 | 8.0 | 0.0 | 92.99 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 March 2024 | 90.99 | 9.01 | 0.0 | 8.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 92.99 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 77.49 | 15.5 | 0.36 | 1.33 | 0.0 | 17.19 | 0.0 | 0.0 | 0.0 | 17.19 | - | 5 | 30 | 01 May 2024 | | 61.99 | 15.5 | 0.36 | 1.33 | 0.0 | 17.19 | 0.0 | 0.0 | 0.0 | 17.19 | - | 6 | 31 | 01 June 2024 | | 46.49 | 15.5 | 0.36 | 1.33 | 0.0 | 17.19 | 0.0 | 0.0 | 0.0 | 17.19 | - | 7 | 30 | 01 July 2024 | | 30.99 | 15.5 | 0.36 | 1.33 | 0.0 | 17.19 | 0.0 | 0.0 | 0.0 | 17.19 | - | 8 | 31 | 01 August 2024 | | 15.49 | 15.5 | 0.36 | 1.33 | 0.0 | 17.19 | 0.0 | 0.0 | 0.0 | 17.19 | - | 9 | 31 | 01 September 2024 | | 0.0 | 15.49 | 0.37 | 1.35 | 0.0 | 17.21 | 0.0 | 0.0 | 0.0 | 17.21 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 102.0 | 2.17 | 16.0 | 0.0 | 120.17 | 17.01 | 0.0 | 0.0 | 103.16 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 9.01 | 0.0 | 8.0 | 0.0 | 90.99 | false | false | - | 01 February 2024 | Chargeback | 10.0 | 2.0 | 0.0 | 8.0 | 0.0 | 92.99 | false | false | - - | 01 February 2024 | Accrual | 8.02 | 0.0 | 0.02 | 8.0 | 0.0 | 0.0 | false | false | - | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 06 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 13 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 16 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 19 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 21 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 22 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 25 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 28 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 29 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - - | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 12 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 103.16 | 92.99 | 2.17 | 8.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4185 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment, charges(penalty and fee) and partial chargeback with payment alloc - interest bearing loan with equal amortization; outstanding FULL interest - UC3.4 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 February 2024" due date and 8 EUR transaction amount - When Admin adds "LOAN_NSF_FEE" due date charge with "01 February 2024" due date and 10 EUR transaction amount - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 34.02 EUR transaction amount - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 8.0 | 10.0 | 35.01 | 34.02 | 0.0 | 0.0 | 0.99 | - | 2 | 29 | 01 March 2024 | | 67.14 | 32.45 | 0.58 | 0.99 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.52 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.8 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.99 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.99 | 0.1 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.02 | 2.14 | 8.99 | 10.0 | 137.15 | 34.02 | 0.0 | 0.0 | 103.13 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 34.02 | 16.02 | 0.0 | 8.0 | 10.0 | 83.98 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 16.02 | 0.0 | 0.99 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 March 2024 | 83.98 | 16.02 | 0.0 | 8.0 | 10.0 | 34.02 | 34.02 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 83.33 | 16.67 | 0.37 | 0.16 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | - | 5 | 30 | 01 May 2024 | | 66.66 | 16.67 | 0.37 | 0.16 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | - | 6 | 31 | 01 June 2024 | | 49.99 | 16.67 | 0.37 | 0.16 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | - | 7 | 30 | 01 July 2024 | | 33.32 | 16.67 | 0.37 | 0.16 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | - | 8 | 31 | 01 August 2024 | | 16.65 | 16.67 | 0.37 | 0.16 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | - | 9 | 31 | 01 September 2024 | | 0.0 | 16.65 | 0.39 | 0.19 | 0.0 | 17.23 | 0.0 | 0.0 | 0.0 | 17.23 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.02 | 2.24 | 8.99 | 10.0 | 137.25 | 34.02 | 0.0 | 0.0 | 103.23 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 34.02 | 16.02 | 0.0 | 8.0 | 10.0 | 83.98 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 16.02 | 0.0 | 0.99 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 19.4 | 0.0 | 1.4 | 8.0 | 10.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 103.23 | 100.0 | 2.24 | 0.99 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4186 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and charges(fee and penalty) with due date after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC3.5 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 April 2024" due date and 8 EUR transaction amount - When Admin adds "LOAN_NSF_FEE" due date charge with "01 April 2024" due date and 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 8.0 | 10.0 | 35.01 | 0.0 | 0.0 | 0.0 | 35.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 8.0 | 10.0 | 120.05 | 0.0 | 0.0 | 0.0 | 120.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 83.33 | 16.67 | 0.37 | 1.33 | 1.67 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | - | 5 | 30 | 01 May 2024 | | 66.66 | 16.67 | 0.37 | 1.33 | 1.67 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | - | 6 | 31 | 01 June 2024 | | 49.99 | 16.67 | 0.37 | 1.33 | 1.67 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | - | 7 | 30 | 01 July 2024 | | 33.32 | 16.67 | 0.37 | 1.33 | 1.67 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | - | 8 | 31 | 01 August 2024 | | 16.65 | 16.67 | 0.37 | 1.33 | 1.67 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | - | 9 | 31 | 01 September 2024 | | 0.0 | 16.65 | 0.39 | 1.35 | 1.65 | 20.04 | 0.0 | 0.0 | 0.0 | 20.04 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.24 | 8.0 | 10.0 | 120.24 | 0.0 | 0.0 | 0.0 | 120.24 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 April 2024" with 20.04 EUR transaction amount - Then Loan has 100.2 outstanding amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | - - When Admin sets the business date to "01 May 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 May 2024" with 20.04 EUR transaction amount - Then Loan has 80.16 outstanding amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | - | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 66.66 | false | false | - - When Admin sets the business date to "01 June 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 June 2024" with 20.04 EUR transaction amount - Then Loan has 60.12 outstanding amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | - | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 66.66 | false | false | - | 01 June 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 49.99 | false | false | - - When Admin sets the business date to "01 July 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 July 2024" with 20.04 EUR transaction amount - Then Loan has 40.08 outstanding amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | - | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 66.66 | false | false | - | 01 June 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 49.99 | false | false | - | 01 July 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 33.32 | false | false | - - When Admin sets the business date to "01 August 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 August 2024" with 20.04 EUR transaction amount - Then Loan has 20.04 outstanding amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | - | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 66.66 | false | false | - | 01 June 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 49.99 | false | false | - | 01 July 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 33.32 | false | false | - | 01 August 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 16.65 | false | false | - - When Admin sets the business date to "01 September 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 September 2024" with 20.04 EUR transaction amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 March 2024 | Accrual | 1.31 | 0.0 | 1.31 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 120.24 | 100.0 | 2.24 | 8.0 | 10.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 83.33 | false | false | - | 01 April 2024 | Accrual | 18.0 | 0.0 | 0.0 | 8.0 | 10.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 66.66 | false | false | - | 01 June 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 49.99 | false | false | - | 01 July 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 33.32 | false | false | - | 01 August 2024 | Repayment | 20.04 | 16.67 | 0.37 | 1.33 | 1.67 | 16.65 | false | false | - | 01 September 2024 | Repayment | 20.04 | 16.65 | 0.39 | 1.35 | 1.65 | 0.0 | false | false | - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4187 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with repayment and charge - interest bearing loan with equal amortization; outstanding FULL interest - UC4 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - When Admin runs inline COB job for Loan - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 July 2024" due date and 10 EUR transaction amount - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 15 July 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 1.67 | 0.0 | 15.85 | 0.0 | 0.0 | 0.0 | 15.85 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 1.65 | 0.0 | 15.83 | 0.0 | 0.0 | 0.0 | 15.83 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 10.0 | 0.0 | 112.09 | 17.01 | 0.0 | 0.0 | 95.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 31 January 2024 | Accrual | 0.56 | 0.0 | 0.56 | 0.0 | 0.0 | 0.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - | 01 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 04 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 06 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 07 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 08 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 10 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 11 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 13 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 15 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 16 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 17 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 18 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 19 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 20 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 21 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 22 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 23 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 24 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 25 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 26 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 27 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 28 February 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 29 February 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - - | 01 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 02 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 03 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 04 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 05 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 06 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 07 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 08 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 09 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 10 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 11 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 12 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 13 March 2024 | Accrual | 0.02 | 0.0 | 0.02 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 0.01 | 0.0 | 0.01 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 95.08 | 83.57 | 1.51 | 10.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4188 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with partially paid installment - interest bearing loan with equal amortization; outstanding FULL interest - UC5 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 7.99 | 7.99 | 0.0 | 9.02 | - | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 25.0 | 7.99 | 0.0 | 77.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 75.58 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 75.58 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 62.98 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 5 | 30 | 01 May 2024 | | 50.38 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 6 | 31 | 01 June 2024 | | 37.78 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 7 | 30 | 01 July 2024 | | 25.18 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 8 | 31 | 01 August 2024 | | 12.58 | 12.6 | 0.24 | 0.0 | 0.0 | 12.84 | 0.0 | 0.0 | 0.0 | 12.84 | - | 9 | 31 | 01 September 2024 | | 0.0 | 12.58 | 0.24 | 0.0 | 0.0 | 12.82 | 0.0 | 0.0 | 0.0 | 12.82 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.02 | 0.0 | 0.0 | 102.02 | 25.0 | 7.99 | 0.0 | 77.02 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 14 March 2024 | Accrual | 1.2 | 0.0 | 1.2 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 77.02 | 75.58 | 1.44 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4208 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding full interest - UC5.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 75.58 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 62.98 | 12.6 | 0.21 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | - | 5 | 30 | 01 May 2024 | | 50.38 | 12.6 | 0.21 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | - | 6 | 31 | 01 June 2024 | | 37.78 | 12.6 | 0.21 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | - | 7 | 30 | 01 July 2024 | | 25.18 | 12.6 | 0.21 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | - | 8 | 31 | 01 August 2024 | | 12.58 | 12.6 | 0.21 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | - | 9 | 31 | 01 September 2024 | | 0.0 | 12.58 | 0.23 | 0.0 | 0.0 | 12.81 | 0.0 | 0.0 | 0.0 | 12.81 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.86 | 0.0 | 0.0 | 101.86 | 25.0 | 7.99 | 0.0 | 76.86 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 14 March 2024 | Accrual | 1.2 | 0.0 | 1.2 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 76.86 | 75.58 | 1.28 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4189 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with chargeback after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 100.58 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4190 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with full chargeback with custom payment alloc after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 30.36 | 0.83 | 0.0 | 0.0 | 31.19 | 0.0 | 0.0 | 0.0 | 31.19 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.43 | 2.67 | 0.0 | 0.0 | 119.1 | 17.01 | 0.0 | 0.0 | 102.09 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4191 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with partial chargeback with custom payment alloc after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6.2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 23.35 | 0.83 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 109.42 | 2.67 | 0.0 | 0.0 | 112.09 | 17.01 | 0.0 | 0.0 | 95.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4331 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with partial chargeback with custom payment alloc on re-age transaction date - interest bearing loan with equal amortization; outstanding FULL interest - UC6.2.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_PENALTY_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 10 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 23.35 | 0.83 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 109.42 | 2.67 | 0.0 | 0.0 | 112.09 | 17.01 | 0.0 | 0.0 | 95.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Chargeback | 10.0 | 9.42 | 0.58 | 0.0 | 0.0 | 92.99 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4192 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with PR after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6.3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALCULATION_DAILY_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin makes "PAYOUT_REFUND" transaction with "AUTOPAY" payment type on "01 April 2024" with 34.02 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | 01 April 2024 | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 14.18 | 0.0 | 0.0 | 0.0 | - | 5 | 30 | 01 May 2024 | 01 April 2024 | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 14.18 | 14.18 | 0.0 | 0.0 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 5.66 | 5.66 | 0.0 | 8.52 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 51.03 | 19.84 | 0.0 | 51.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Payout Refund | 34.02 | 33.52 | 0.5 | 0.0 | 0.0 | 50.05 | false | false | - - When Admin sets the business date to "02 April 2024" - When Admin runs inline COB job for Loan - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Payout Refund | 34.02 | 33.52 | 0.5 | 0.0 | 0.0 | 50.05 | false | false | - - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4193 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with MIR and accrual activity after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6.4 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_REFUND_INTEREST_RECALC_ACCRUAL_ACTIVITY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 April 2024" with 34.02 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | 01 April 2024 | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 14.18 | 0.0 | 0.0 | 0.0 | - | 5 | 30 | 01 May 2024 | 01 April 2024 | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 14.18 | 14.18 | 0.0 | 0.0 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 6.21 | 6.21 | 0.0 | 7.97 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 51.58 | 20.39 | 0.0 | 50.51 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Merchant Issued Refund | 34.02 | 33.52 | 0.5 | 0.0 | 0.0 | 50.05 | false | false | - | 01 April 2024 | Interest Refund | 0.55 | 0.55 | 0.0 | 0.0 | 0.0 | 49.5 | false | false | - - When Admin sets the business date to "02 April 2024" - When Admin runs inline COB job for Loan - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 February 2024 | Accrual Activity | 0.58 | 0.0 | 0.58 | 0.0 | 0.0 | 0.0 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Merchant Issued Refund | 34.02 | 33.52 | 0.5 | 0.0 | 0.0 | 50.05 | false | false | - | 01 April 2024 | Interest Refund | 0.55 | 0.55 | 0.0 | 0.0 | 0.0 | 49.5 | false | false | - | 01 April 2024 | Accrual Activity | 0.25 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4194 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with BuyDownFee after re-age - interest bearing loan with equal amortization; outstanding FULL interest - UC6.5 - When Admin sets the business date to "01 January 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_PROGRESSIVE_ADVANCED_PAYMENT_ALLOCATION_BUYDOWN_FEES | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin runs inline COB job for Loan - When Admin adds buy down fee with "AUTOPAY" payment type to the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Buy Down Fee | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "02 April 2024" - When Admin runs inline COB job for Loan - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 14 March 2024 | Accrual | 1.27 | 0.0 | 1.27 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Buy Down Fee | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Buy Down Fee Amortization | 0.33 | 0.0 | 0.33 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4195 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging transaction with downpayment - interest bearing loan with equal amortization; outstanding FULL interest - UC7 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE_AUTO_DOWNPAYMENT | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 4 | 31 | 01 April 2024 | | 37.82 | 12.47 | 0.29 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 5 | 30 | 01 May 2024 | | 25.28 | 12.54 | 0.22 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 6 | 31 | 01 June 2024 | | 12.67 | 12.61 | 0.15 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 7 | 30 | 01 July 2024 | | 0.0 | 12.67 | 0.07 | 0.0 | 0.0 | 12.74 | 0.0 | 0.0 | 0.0 | 12.74 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 25.0 | 0.0 | 0.0 | 76.54 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 12.76 EUR transaction amount - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 4 | 31 | 01 April 2024 | | 37.82 | 12.47 | 0.29 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 5 | 30 | 01 May 2024 | | 25.28 | 12.54 | 0.22 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 6 | 31 | 01 June 2024 | | 12.67 | 12.61 | 0.15 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 7 | 30 | 01 July 2024 | | 0.0 | 12.67 | 0.07 | 0.0 | 0.0 | 12.74 | 0.0 | 0.0 | 0.0 | 12.74 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 37.76 | 0.0 | 0.0 | 63.78 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin runs inline COB job for Loan - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 10 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 15 March 2024 | 62.68 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 14 | 15 March 2024 | 15 March 2024 | 62.68 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 17 | 01 April 2024 | | 52.23 | 10.45 | 0.19 | 0.0 | 0.0 | 10.64 | 0.0 | 0.0 | 0.0 | 10.64 | - | 6 | 30 | 01 May 2024 | | 41.78 | 10.45 | 0.19 | 0.0 | 0.0 | 10.64 | 0.0 | 0.0 | 0.0 | 10.64 | - | 7 | 31 | 01 June 2024 | | 31.33 | 10.45 | 0.19 | 0.0 | 0.0 | 10.64 | 0.0 | 0.0 | 0.0 | 10.64 | - | 8 | 30 | 01 July 2024 | | 20.88 | 10.45 | 0.19 | 0.0 | 0.0 | 10.64 | 0.0 | 0.0 | 0.0 | 10.64 | - | 9 | 31 | 01 August 2024 | | 10.43 | 10.45 | 0.19 | 0.0 | 0.0 | 10.64 | 0.0 | 0.0 | 0.0 | 10.64 | - | 10 | 31 | 01 September 2024 | | 0.0 | 10.43 | 0.19 | 0.0 | 0.0 | 10.62 | 0.0 | 0.0 | 0.0 | 10.62 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.58 | 0.0 | 0.0 | 101.58 | 37.76 | 0.0 | 0.0 | 63.82 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | - | 14 March 2024 | Accrual | 0.96 | 0.0 | 0.96 | 0.0 | 0.0 | 0.0 | false | false | - | 15 March 2024 | Re-age | 63.82 | 62.68 | 1.14 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4239 - Scenario: Verify Re-aging reversal on interest bearing loan - UC3.1: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST, re-aging is NOT the latest transaction on loan - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Transaction after re-aging --- - When Admin sets the business date to "16 March 2024" - And Customer makes "AUTOPAY" repayment on "16 March 2024" with 14.05 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | 16 March 2024 | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 14.05 | 14.05 | 0.0 | 0.0 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 31.06 | 14.05 | 0.0 | 70.23 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 16 March 2024 | Repayment | 14.05 | 13.93 | 0.12 | 0.0 | 0.0 | 69.64 | false | false | -# --- Reversal of re-age transaction --- - When Admin sets the business date to "01 April 2024" - And Admin successfully undo Loan re-aging transaction - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 14.05 | 0.0 | 14.05 | 2.96 | - | 3 | 31 | 01 April 2024 | | 50.49 | 16.56 | 0.45 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.77 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.1 | 0.0 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.11 | 0.0 | 0.0 | 102.11 | 31.06 | 0.0 | 14.05 | 71.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | true | false | - | 16 March 2024 | Repayment | 14.05 | 13.56 | 0.49 | 0.0 | 0.0 | 70.01 | false | true | - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4240 - Scenario: Verify Re-aging reversal on interest bearing loan - UC4.1: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST, re-aging is NOT the latest transaction on loan - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false |false | - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false |false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false |false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false |false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false |false | -# --- Transaction after re-aging --- - When Admin sets the business date to "16 March 2024" - And Customer makes "AUTOPAY" repayment on "16 March 2024" with 14.18 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | 16 March 2024 | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 14.18 | 14.18 | 0.0 | 0.0 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 31.19 | 14.18 | 0.0 | 70.9 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 16 March 2024 | Repayment | 14.18 | 13.93 | 0.25 | 0.0 | 0.0 | 69.64 | false | false | -# --- Reversal of re-age transaction --- - When Admin sets the business date to "01 April 2024" - And Admin successfully undo Loan re-aging transaction - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 14.18 | 0.0 | 14.18 | 2.83 | - | 3 | 31 | 01 April 2024 | | 50.49 | 16.56 | 0.45 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.77 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.1 | 0.0 | 0.0 | 17.06 | 0.0 | 0.0 | 0.0 | 17.06 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.11 | 0.0 | 0.0 | 102.11 | 31.19 | 0.0 | 14.18 | 70.92 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | true | false | - | 16 March 2024 | Repayment | 14.18 | 13.69 | 0.49 | 0.0 | 0.0 | 69.88 | false | true | - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4235 @AdvancedPaymentAllocation - Scenario: Verify Re-aging on charged-off loan with Equal amortization payable interest - zero interest charge-off - UC10 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does charge-off the loan on "01 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "15 March 2024" - Then Admin fails to create a Loan re-aging transaction with the following data because loan was charged-off: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4236 @AdvancedPaymentAllocation - Scenario: Verify Re-aging on charged-off loan with Equal amortization payable interest - accelerate maturity charge-off - UC11 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does charge-off the loan on "01 March 2024" - 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "15 March 2024" - Then Admin fails to create a Loan re-aging transaction with the following data because loan was charged-off: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4387 @AdvancedPaymentAllocation - Scenario: Verify that Re-aging with equal amortization + outstanding full interest handling is forbidden on written-off loan - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does write-off the loan on "01 March 2024" - Then Loan status will be "CLOSED_WRITTEN_OFF" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 March 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 March 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 March 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | 01 March 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 0.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 0.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Close (as written-off) | 85.04 | 83.57 | 1.47 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "15 March 2024" - Then Admin fails to create a Loan re-aging transaction with the following data because loan was closed: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - - Then Admin fails to create a Loan re-aging preview with the following data because loan was closed: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - - @TestRailId:C4388 @AdvancedPaymentAllocation - Scenario: Verify that Re-aging with equal amortization + outstanding payable interest handling is forbidden on written-off loan - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does write-off the loan on "01 March 2024" - Then Loan status will be "CLOSED_WRITTEN_OFF" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 March 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 March 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 March 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | 01 March 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 0.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 0.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Close (as written-off) | 85.04 | 83.57 | 1.47 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "15 March 2024" - Then Admin fails to create a Loan re-aging transaction with the following data because loan was closed: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - - Then Admin fails to create a Loan re-aging preview with the following data because loan was closed: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - - @TestRailId:C4237 @AdvancedPaymentAllocation - Scenario: Verify Re-aging with Equal amortization payable interest - Fees and Interest Split after re-aging - UC12 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "15 February 2024" - When Admin adds "LOAN_SNOOZE_FEE" due date charge with "15 May 2024" due date and 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 10.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 17.01 | 0.0 | 0.0 | 95.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 15 May 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.65 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 5 | 30 | 01 May 2024 | | 55.73 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 6 | 31 | 01 June 2024 | | 41.81 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 7 | 30 | 01 July 2024 | | 27.89 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 8 | 31 | 01 August 2024 | | 13.97 | 13.92 | 0.12 | 1.67 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.97 | 0.11 | 1.65 | 0.0 | 15.73 | 0.0 | 0.0 | 0.0 | 15.73 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 10.0 | 0.0 | 111.29 | 17.01 | 0.0 | 0.0 | 94.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 94.28 | 83.57 | 0.71 | 10.0 | 0.0 | 0.0 | false | false | - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 15 May 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4238 @AdvancedPaymentAllocation - Scenario: Verify Re-aging with Equal amortization payable interest on contract terminated loan - UC13 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_CONTRACT_TERMINATION | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin successfully terminates loan contract - 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Contract Termination | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "15 March 2024" - Then Admin fails to create a Loan re-aging transaction with the following data because loan was contract terminated: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - When Loan Pay-off is made on "01 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4241 @AdvancedPaymentAllocation - Scenario: Verify Re-aging on interest bearing loan - equal amortization + payable outstanding interest - reverse-repay, backdated repayment - UC8 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024| | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "01 April 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 67.05 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 55.88 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | - | 5 | 30 | 01 May 2024 | | 44.71 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | - | 6 | 31 | 01 June 2024 | | 33.54 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | - | 7 | 30 | 01 July 2024 | | 22.37 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | - | 8 | 31 | 01 August 2024 | | 11.2 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | - | 9 | 31 | 01 September 2024| | 0.0 | 11.2 | 0.03 | 0.0 | 0.0 | 11.23 | 0.0 | 0.0 | 0.0 | 11.23 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.25 | 0.0 | 0.0 | 101.25 | 34.02 | 0.0 | 0.0 | 67.23 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 15 March 2024 | Re-age | 67.23 | 67.05 | 0.18 | 0.0 | 0.0 | 0.0 | false | true | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4242 @AdvancedPaymentAllocation - Scenario: Verify Re-aging on interest bearing loan - equal amortization + payable outstanding interest - reverse-repay, reversal of backdated repayment - UC8.1 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - - When Admin sets the business date to "01 March 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 34.02 | 0.0 | 0.0 | 68.03 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 67.05 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 55.88 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | - | 5 | 30 | 01 May 2024 | | 44.71 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | - | 6 | 31 | 01 June 2024 | | 33.54 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | - | 7 | 30 | 01 July 2024 | | 22.37 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | - | 8 | 31 | 01 August 2024 | | 11.2 | 11.17 | 0.03 | 0.0 | 0.0 | 11.2 | 0.0 | 0.0 | 0.0 | 11.2 | - | 9 | 31 | 01 September 2024| | 0.0 | 11.2 | 0.03 | 0.0 | 0.0 | 11.23 | 0.0 | 0.0 | 0.0 | 11.23 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.25 | 0.0 | 0.0 | 101.25 | 34.02 | 0.0 | 0.0 | 67.23 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 15 March 2024 | Re-age | 67.23 | 67.05 | 0.18 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Customer undo "1"th transaction made on "01 March 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024| | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | true | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | true | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4243 @AdvancedPaymentAllocation - Scenario: Verify Re-aging on interest bearing loan - equal amortization + full outstanding interest - reverse-repay, backdated repayment - UC8 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024| | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "01 April 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 67.05 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 55.87 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | - | 5 | 30 | 01 May 2024 | | 44.69 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | - | 6 | 31 | 01 June 2024 | | 33.51 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | - | 7 | 30 | 01 July 2024 | | 22.33 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | - | 8 | 31 | 01 August 2024 | | 11.15 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | - | 9 | 31 | 01 September 2024| | 0.0 | 11.15 | 0.18 | 0.0 | 0.0 | 11.33 | 0.0 | 0.0 | 0.0 | 11.33 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 34.02 | 0.0 | 0.0 | 68.03 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 15 March 2024 | Re-age | 68.03 | 67.05 | 0.98 | 0.0 | 0.0 | 0.0 | false | true | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4244 @AdvancedPaymentAllocation - Scenario: Verify Re-aging on interest bearing loan - equal amortization + full outstanding interest - reverse-repay, reversal of backdated repayment - UC8.1 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024| | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "01 April 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 67.05 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 55.87 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | - | 5 | 30 | 01 May 2024 | | 44.69 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | - | 6 | 31 | 01 June 2024 | | 33.51 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | - | 7 | 30 | 01 July 2024 | | 22.33 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | - | 8 | 31 | 01 August 2024 | | 11.15 | 11.18 | 0.16 | 0.0 | 0.0 | 11.34 | 0.0 | 0.0 | 0.0 | 11.34 | - | 9 | 31 | 01 September 2024| | 0.0 | 11.15 | 0.18 | 0.0 | 0.0 | 11.33 | 0.0 | 0.0 | 0.0 | 11.33 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 34.02 | 0.0 | 0.0 | 68.03 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - | 15 March 2024 | Re-age | 68.03 | 67.05 | 0.98 | 0.0 | 0.0 | 0.0 | false | true | - When Customer undo "1"th transaction made on "01 March 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024| | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | true | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | true | - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4250 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with 2nd disb and partial chargeback(with custom pmnt alloc) after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.11 | 0.0 | 0.0 | 24.03 | 0.0 | 0.0 | 0.0 | 24.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 1.29 | 0.0 | 0.0 | 151.29 | 17.01 | 0.0 | 0.0 | 134.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 95.71 | 40.36 | 0.7 | 0.0 | 0.0 | 41.06 | 0.0 | 0.0 | 0.0 | 41.06 | - | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.11 | 0.0 | 0.0 | 24.03 | 0.0 | 0.0 | 0.0 | 24.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 166.43 | 1.87 | 0.0 | 0.0 | 168.3 | 17.01 | 0.0 | 0.0 | 151.29 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 150.0 | false | false | - -# --- undo re-age --- # - When Admin successfully undo Loan re-aging transaction - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 4 | 30 | 01 May 2024 | | 67.34 | 49.62 | 1.26 | 0.0 | 0.0 | 50.88 | 0.0 | 0.0 | 0.0 | 50.88 | - | 5 | 31 | 01 June 2024 | | 33.86 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 6 | 30 | 01 July 2024 | | 0.0 | 33.86 | 0.2 | 0.0 | 0.0 | 34.06 | 0.0 | 0.0 | 0.0 | 34.06 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 166.43 | 3.41 | 0.0 | 0.0 | 169.84 | 17.01 | 0.0 | 0.0 | 152.83 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | true | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 150.0 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4251 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with 2nd disb and charge after re-age and undo re-age - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.26 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.09 | 0.0 | 0.0 | 152.09 | 17.01 | 0.0 | 0.0 | 135.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Admin adds "LOAN_NSF_FEE" due date charge with "05 October 2024" due date and 10 EUR transaction amount - Then Loan Repayment schedule has 10 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.26 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 10 | 34 | 05 October 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.09 | 0.0 | 10.0 | 162.09 | 17.01 | 0.0 | 0.0 | 145.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - 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 | 05 October 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4253 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with backdated re-aging before 2nd disb - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC5 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - -# --- backdated re-aging ---# - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 15 March 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 0 | 15 March 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 31 | 15 April 2024 | | 95.71 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 6 | 30 | 15 May 2024 | | 71.78 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 7 | 31 | 15 June 2024 | | 47.85 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 8 | 30 | 15 July 2024 | | 23.92 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 9 | 31 | 15 August 2024 | | 0.0 | 23.92 | 0.11 | 0.0 | 0.0 | 24.03 | 0.0 | 0.0 | 0.0 | 24.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 1.29 | 0.0 | 0.0 | 151.29 | 17.01 | 0.0 | 0.0 | 134.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4254 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with backdated re-aging before 2nd disb - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC6 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - -# --- backdated re-aging ---# - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 15 March 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 0 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 31 | 15 April 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 6 | 30 | 15 May 2024 | | 71.78 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 7 | 31 | 15 June 2024 | | 47.85 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 8 | 30 | 15 July 2024 | | 23.92 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 9 | 31 | 15 August 2024 | | 0.0 | 23.92 | 0.26 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.09 | 0.0 | 0.0 | 152.09 | 17.01 | 0.0 | 0.0 | 135.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - -# --- undo last disbursement --- # - When Admin successfully undo last disbursal - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 0 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 31 | 15 April 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 30 | 15 May 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 31 | 15 June 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 30 | 15 July 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 15 August 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4256 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with backdated 2nd disb and charge after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC8 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 1.42 | 0.0 | 0.0 | 151.42 | 17.01 | 0.0 | 0.0 | 134.41 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | - - When Admin adds "LOAN_NSF_FEE" due date charge with "05 May 2024" due date and 10 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 10.0 | 32.4 | 0.0 | 0.0 | 0.0 | 32.4 | - | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 1.42 | 0.0 | 10.0 | 161.42 | 17.01 | 0.0 | 0.0 | 144.41 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | - - # --- undo last disbursement --- # - # When Admin successfully undo last disbursal - # Then Loan Repayment schedule has 8 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 | - # | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - # | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - # | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - # | 3 | 14 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # | 4 | 31 | 15 April 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # | 5 | 30 | 15 May 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # | 6 | 31 | 15 June 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # | 7 | 30 | 15 July 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # | 8 | 31 | 15 August 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - # Then Loan Repayment schedule has the following data in Total row: - # | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - # | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - # Then Loan Transactions tab has the following data: - # | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - # | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - # | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - # | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4257 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with backdated 2nd disb after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC9 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 111.3 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 5 | 30 | 01 May 2024 | | 89.03 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 6 | 31 | 01 June 2024 | | 66.76 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 7 | 30 | 01 July 2024 | | 44.49 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 8 | 31 | 01 August 2024 | | 22.22 | 22.27 | 0.37 | 0.0 | 0.0 | 22.64 | 0.0 | 0.0 | 0.0 | 22.64 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.22 | 0.39 | 0.0 | 0.0 | 22.61 | 0.0 | 0.0 | 0.0 | 22.61 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.82 | 0.0 | 0.0 | 152.82 | 17.01 | 0.0 | 0.0 | 135.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 135.81 | 133.57 | 2.24 | 0.0 | 0.0 | 0.0 | false | true | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4259 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with CI after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC11 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.11 | 0.0 | 0.0 | 24.03 | 0.0 | 0.0 | 0.0 | 24.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 1.29 | 0.0 | 0.0 | 151.29 | 17.01 | 0.0 | 0.0 | 134.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Admin successfully undo Loan re-aging transaction - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | true | false | - | 01 April 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4260 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with CI after re-age - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC12 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.26 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.09 | 0.0 | 0.0 | 152.09 | 17.01 | 0.0 | 0.0 | 135.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4262 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with 2nd disb and CI after re-age - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC14 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "30" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | | | 01 April 2024 | | 30.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 79.71 | 19.93 | 0.12 | 0.0 | 0.0 | 20.05 | 0.0 | 0.0 | 0.0 | 20.05 | - | 6 | 31 | 01 June 2024 | | 59.78 | 19.93 | 0.12 | 0.0 | 0.0 | 20.05 | 0.0 | 0.0 | 0.0 | 20.05 | - | 7 | 30 | 01 July 2024 | | 39.85 | 19.93 | 0.12 | 0.0 | 0.0 | 20.05 | 0.0 | 0.0 | 0.0 | 20.05 | - | 8 | 31 | 01 August 2024 | | 19.92 | 19.93 | 0.12 | 0.0 | 0.0 | 20.05 | 0.0 | 0.0 | 0.0 | 20.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 19.92 | 0.11 | 0.0 | 0.0 | 20.03 | 0.0 | 0.0 | 0.0 | 20.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 130.0 | 1.29 | 0.0 | 0.0 | 131.29 | 17.01 | 0.0 | 0.0 | 114.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 30.0 | 0.0 | 0.0 | 0.0 | 0.0 | 113.57 | false | false | - - And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 April 2024" with "20" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | | | 01 April 2024 | | 30.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | | | 01 April 2024 | | 20.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 30 | 01 May 2024 | | 95.71 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 6 | 31 | 01 June 2024 | | 71.78 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 7 | 30 | 01 July 2024 | | 47.85 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 8 | 31 | 01 August 2024 | | 23.92 | 23.93 | 0.12 | 0.0 | 0.0 | 24.05 | 0.0 | 0.0 | 0.0 | 24.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 23.92 | 0.11 | 0.0 | 0.0 | 24.03 | 0.0 | 0.0 | 0.0 | 24.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 1.29 | 0.0 | 0.0 | 151.29 | 17.01 | 0.0 | 0.0 | 134.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 30.0 | 0.0 | 0.0 | 0.0 | 0.0 | 113.57 | false | false | - | 01 April 2024 | Capitalized Income | 20.0 | 20.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4263 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with backdated re-aging after CI with CI undo afterwards - interest bearing multidisb loan with equal amortization; outstanding FULL interest - UC15 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_RECALC_EMI_360_30_MULTIDISB_APPROVED_OVER_APPLIED_CAPITALIZED_INCOME | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "01 May 2024" - And Admin adds capitalized income with "AUTOPAY" payment type to the loan on "01 May 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 34.01 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 May 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 31 | 01 June 2024 | | 42.28 | 41.73 | 0.49 | 0.0 | 0.0 | 42.22 | 0.0 | 0.0 | 0.0 | 42.22 | - | 6 | 30 | 01 July 2024 | | 0.0 | 42.28 | 0.25 | 0.0 | 0.0 | 42.53 | 0.0 | 0.0 | 0.0 | 42.53 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.79 | 0.0 | 0.0 | 152.79 | 17.01 | 0.0 | 0.0 | 135.78 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 May 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 April 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 0 | 01 April 2024 | | 69.64 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | | | 01 May 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 6 | 31 | 01 June 2024 | | 79.28 | 26.43 | 0.26 | 0.0 | 0.0 | 26.69 | 0.0 | 0.0 | 0.0 | 26.69 | - | 7 | 30 | 01 July 2024 | | 52.85 | 26.43 | 0.26 | 0.0 | 0.0 | 26.69 | 0.0 | 0.0 | 0.0 | 26.69 | - | 8 | 31 | 01 August 2024 | | 26.42 | 26.43 | 0.26 | 0.0 | 0.0 | 26.69 | 0.0 | 0.0 | 0.0 | 26.69 | - | 9 | 31 | 01 September 2024 | | 0.0 | 26.42 | 0.27 | 0.0 | 0.0 | 26.69 | 0.0 | 0.0 | 0.0 | 26.69 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.15 | 0.0 | 0.0 | 152.15 | 17.01 | 0.0 | 0.0 | 135.14 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 April 2024 | Re-age | 85.14 | 83.57 | 1.57 | 0.0 | 0.0 | 0.0 | false | false | - | 01 May 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Admin sets the business date to "02 May 2024" - When Customer undo "1"th "Capitalized Income" transaction made on "01 May 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 April 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 0 | 01 April 2024 | | 69.64 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.26 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.27 | 0.0 | 0.0 | 14.19 | 0.0 | 0.0 | 0.0 | 14.19 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 17.01 | 0.0 | 0.0 | 85.14 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 April 2024 | Re-age | 85.14 | 83.57 | 1.57 | 0.0 | 0.0 | 0.0 | false | false | - | 01 May 2024 | Capitalized Income | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 133.57 | true | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4265 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with backdated 2nd disb and charge after re-age - interest bearing multidisb loan that expects tranches with equal amortization; outstanding payable interest - UC17 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin creates a fully customized loan with disbursements details and 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 | 1st_tranche_disb_expected_date | 1st_tranche_disb_principal | 2nd_tranche_disb_expected_date | 2nd_tranche_disb_principal | - | LP2_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_EXPECT_TRANCHE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 01 January 2024 | 100.0 | 01 March 2024 | 50.0 | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 3 | 31 | 01 April 2024 | | 100.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - Then Loan Tranche Details tab has the following data: - | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | - | 01 January 2024 | 01 January 2024 | 100.0 | | - | 01 March 2024 | | 50.0 | | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 3 | 31 | 01 April 2024 | | 100.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin adds "LOAN_NSF_FEE" due date charge with "05 October 2024" due date and 10 EUR transaction amount - Then Loan Repayment schedule has 10 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - | 10 | 34 | 05 October 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 10.0 | 111.29 | 17.01 | 0.0 | 0.0 | 94.28 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - And 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 | 05 October 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - - When Admin successfully disburse the loan on "01 March 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 10 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | - | 10 | 34 | 05 October 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 1.42 | 0.0 | 10.0 | 161.42 | 17.01 | 0.0 | 0.0 | 144.41 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | - Then Loan Tranche Details tab has the following data: - | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | - | 01 January 2024 | 01 January 2024 | 100.0 | | - | 01 March 2024 | 01 March 2024 | 50.0 | | - - And Customer makes "AUTOPAY" repayment on "01 April 2024" with 22.4 EUR transaction amount - Then Loan Repayment schedule has 10 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 01 March 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 133.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | 01 April 2024 | 111.31 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 22.4 | 0.0 | 0.0 | 0.0 | - | 5 | 30 | 01 May 2024 | | 89.05 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 6 | 31 | 01 June 2024 | | 66.79 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 7 | 30 | 01 July 2024 | | 44.53 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 8 | 31 | 01 August 2024 | | 22.27 | 22.26 | 0.14 | 0.0 | 0.0 | 22.4 | 0.0 | 0.0 | 0.0 | 22.4 | - | 9 | 31 | 01 September 2024 | | 0.0 | 22.27 | 0.14 | 0.0 | 0.0 | 22.41 | 0.0 | 0.0 | 0.0 | 22.41 | - | 10 | 34 | 05 October 2024 | | 0.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 1.42 | 0.0 | 10.0 | 161.42 | 39.41 | 0.0 | 0.0 | 122.01 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 March 2024 | Re-age | 134.41 | 133.57 | 0.84 | 0.0 | 0.0 | 0.0 | false | true | - | 01 April 2024 | Repayment | 22.4 | 22.26 | 0.14 | 0.0 | 0.0 | 111.31 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4266 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with backdated 2nd disb after re-age - interest bearing multidisb loan that expects tranches with equal amortization; outstanding full interest - UC18 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin creates a fully customized loan with disbursements details and 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 | 1st_tranche_disb_expected_date | 1st_tranche_disb_principal | 2nd_tranche_disb_expected_date | 2nd_tranche_disb_principal | - | LP2_ADV_PYMNT_INT_DAILY_EMI_360_30_INT_RECALC_DAILY_MULTIDISB_EXPECT_TRANCHE_APPROVED_OVER_APPLIED | 01 January 2024 | 200 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | 01 January 2024 | 100.0 | 01 April 2024 | 50.0 | - And Admin successfully approves the loan on "01 January 2024" with "200" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - Then Loan Tranche Details tab has the following data: - | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | - | 01 January 2024 | 01 January 2024 | 100.0 | | - | 01 April 2024 | | 50.0 | | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | | | | 0.0 | - | 4 | 30 | 01 May 2024 | | 83.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 66.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 50.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - -# --- 2nd disbursement ---# - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - -# --- backdated re-aging on March, 15 2024 --- # - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 15 March 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 0 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 31 | 15 April 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 6 | 30 | 15 May 2024 | | 71.78 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 7 | 31 | 15 June 2024 | | 47.85 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 8 | 30 | 15 July 2024 | | 23.92 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | 9 | 31 | 15 August 2024 | | 0.0 | 23.92 | 0.26 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.09 | 0.0 | 0.0 | 152.09 | 17.01 | 0.0 | 0.0 | 135.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - -# --- add 2nd expected disbursement details with expected disbursement date - 15 Apr, 2024 --- # - And Admin successfully add disbursement detail to the loan on "15 April 2024" with 50 EUR transaction amount - Then Loan Tranche Details tab has the following data: - | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | - | 01 January 2024 | 01 January 2024 | 100.0 | | - | 01 April 2024 | 01 April 2024 | 50.0 | | - | 15 April 2024 | | 50.0 | 50.0 | - - When Admin sets the business date to "15 April 2024" - When Admin successfully disburse the loan on "15 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 0 | 15 March 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 31 | 15 April 2024 | | 95.71 | 23.93 | 0.25 | 0.0 | 0.0 | 24.18 | 0.0 | 0.0 | 0.0 | 24.18 | - | | | 15 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 6 | 30 | 15 May 2024 | | 109.28 | 36.43 | 0.25 | 0.0 | 0.0 | 36.68 | 0.0 | 0.0 | 0.0 | 36.68 | - | 7 | 31 | 15 June 2024 | | 72.85 | 36.43 | 0.25 | 0.0 | 0.0 | 36.68 | 0.0 | 0.0 | 0.0 | 36.68 | - | 8 | 30 | 15 July 2024 | | 36.42 | 36.43 | 0.25 | 0.0 | 0.0 | 36.68 | 0.0 | 0.0 | 0.0 | 36.68 | - | 9 | 31 | 15 August 2024 | | 0.0 | 36.42 | 0.26 | 0.0 | 0.0 | 36.68 | 0.0 | 0.0 | 0.0 | 36.68 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 200.0 | 2.09 | 0.0 | 0.0 | 202.09 | 17.01 | 0.0 | 0.0 | 185.08 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - | 15 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 183.57 | false | false | - Then Loan Tranche Details tab has the following data: - | Expected Disbursement On | Disbursed On | Principal | Net Disbursal Amount | - | 01 January 2024 | 01 January 2024 | 100.0 | | - | 01 April 2024 | 01 April 2024 | 50.0 | | - | 15 April 2024 | 15 April 2024 | 50.0 | 50.0 | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4273 - Scenario: Verify Re-aging with interest pause: UC1: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST, interest pause before re-aging - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Interest pause --- - When Admin sets the business date to "02 February 2024" - And Create an interest pause period with start date "10 February 2024" and end date "10 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.96 | 16.73 | 0.28 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.24 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.42 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.42 | 0.1 | 0.0 | 0.0 | 16.52 | 0.0 | 0.0 | 0.0 | 16.52 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.57 | 0.0 | 0.0 | 101.57 | 17.01 | 0.0 | 0.0 | 84.56 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.17 | 0.0 | 0.0 | 14.1 | 0.0 | 0.0 | 0.0 | 14.1 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.17 | 0.0 | 0.0 | 14.1 | 0.0 | 0.0 | 0.0 | 14.1 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.17 | 0.0 | 0.0 | 14.1 | 0.0 | 0.0 | 0.0 | 14.1 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.17 | 0.0 | 0.0 | 14.1 | 0.0 | 0.0 | 0.0 | 14.1 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.17 | 0.0 | 0.0 | 14.1 | 0.0 | 0.0 | 0.0 | 14.1 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.15 | 0.0 | 0.0 | 14.07 | 0.0 | 0.0 | 0.0 | 14.07 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.58 | 0.0 | 0.0 | 101.58 | 17.01 | 0.0 | 0.0 | 84.57 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.57 | 83.57 | 1.0 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4278 - Scenario: Verify Re-aging with interest pause: UC4.2: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST, interest pause after re-aging - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "02 April 2024" - And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4279 - Scenario: Verify Re-aging with interest pause: UC4.3: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST, interest pause after re-aging - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "02 April 2024" - And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4282 - Scenario: Verify Re-aging with interest pause: UC7: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST, multiple pauses, early repayment, mid-pause repayment - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid - early repayment--- - When Admin sets the business date to "14 January 2024" - And Customer makes "AUTOPAY" repayment on "14 January 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.23 | 0.78 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 17.01 | 17.01 | 0.0 | 84.99 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | - # --- Interest pause --- - And Create an interest pause period with start date "15 January 2024" and end date "10 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.22 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.48 | 16.74 | 0.27 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 32.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 15.94 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 15.94 | 0.09 | 0.0 | 0.0 | 16.03 | 0.0 | 0.0 | 0.0 | 16.03 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.08 | 0.0 | 0.0 | 101.08 | 17.01 | 17.01 | 0.0 | 84.07 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.22 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.48 | 16.74 | 0.27 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 32.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 15.94 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 15.94 | 0.09 | 0.0 | 0.0 | 16.03 | 0.0 | 0.0 | 0.0 | 16.03 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.08 | 0.0 | 0.0 | 101.08 | 17.01 | 17.01 | 0.0 | 84.07 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.36 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 5 | 30 | 01 May 2024 | | 55.49 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 6 | 31 | 01 June 2024 | | 41.62 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 7 | 30 | 01 July 2024 | | 27.75 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 8 | 31 | 01 August 2024 | | 13.88 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.88 | 0.03 | 0.0 | 0.0 | 13.91 | 0.0 | 0.0 | 0.0 | 13.91 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.32 | 0.0 | 0.0 | 100.32 | 17.01 | 17.01 | 0.0 | 83.31 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | - | 15 March 2024 | Re-age | 83.31 | 83.23 | 0.08 | 0.0 | 0.0 | 0.0 | false | false | - # --- 2nd Interest pause --- - When Admin sets the business date to "02 April 2024" - And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.36 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 5 | 30 | 01 May 2024 | | 55.49 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 6 | 31 | 01 June 2024 | | 41.62 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 7 | 30 | 01 July 2024 | | 27.75 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 8 | 31 | 01 August 2024 | | 13.88 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.88 | 0.03 | 0.0 | 0.0 | 13.91 | 0.0 | 0.0 | 0.0 | 13.91 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.32 | 0.0 | 0.0 | 100.32 | 17.01 | 17.01 | 0.0 | 83.31 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | - | 15 March 2024 | Re-age | 83.31 | 83.23 | 0.08 | 0.0 | 0.0 | 0.0 | false | false | -# --- Mid-pause repayment --- - When Admin sets the business date to "01 May 2024" - And Customer makes "AUTOPAY" repayment on "01 May 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 14 January 2024 | 83.23 | 16.77 | 0.24 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.23 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | 01 May 2024 | 69.36 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 13.88 | 0.0 | 13.88| 0.0 | - | 5 | 30 | 01 May 2024 | | 55.49 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 3.13 | 0.0 | 0.0 | 10.75 | - | 6 | 31 | 01 June 2024 | | 41.62 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 7 | 30 | 01 July 2024 | | 27.75 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 8 | 31 | 01 August 2024 | | 13.88 | 13.87 | 0.01 | 0.0 | 0.0 | 13.88 | 0.0 | 0.0 | 0.0 | 13.88 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.88 | 0.03 | 0.0 | 0.0 | 13.91 | 0.0 | 0.0 | 0.0 | 13.91 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.32 | 0.0 | 0.0 | 100.32 | 34.02 | 17.01 | 13.88 | 66.3 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 14 January 2024 | Repayment | 17.01 | 16.77 | 0.24 | 0.0 | 0.0 | 83.23 | false | false | - | 15 March 2024 | Re-age | 83.31 | 83.23 | 0.08 | 0.0 | 0.0 | 0.0 | false | false | - | 01 May 2024 | Repayment | 17.01 | 16.99 | 0.02 | 0.0 | 0.0 | 66.24 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "01 May 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4370 - Scenario: Verify Re-aging with interest pause: UC3: Interest handling: equal amortization + outstanding payable interest, interest pause overlapping re-aging - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Interest pause --- - When Admin sets the business date to "02 February 2024" - And Create an interest pause period with start date "10 February 2024" and end date "10 May 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.68 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 32.67 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 15.8 | 16.87 | 0.14 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 15.8 | 0.09 | 0.0 | 0.0 | 15.89 | 0.0 | 0.0 | 0.0 | 15.89 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.94 | 0.0 | 0.0 | 100.94 | 17.01 | 0.0 | 0.0 | 83.93 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.69 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 49.68 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 32.67 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 15.8 | 16.87 | 0.14 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 15.8 | 0.09 | 0.0 | 0.0 | 15.89 | 0.0 | 0.0 | 0.0 | 15.89 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.94 | 0.0 | 0.0 | 100.94 | 17.01 | 0.0 | 0.0 | 83.93 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.02 | 0.0 | 0.0 | 13.95 | 0.0 | 0.0 | 0.0 | 13.95 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.02 | 0.0 | 0.0 | 13.95 | 0.0 | 0.0 | 0.0 | 13.95 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.02 | 0.0 | 0.0 | 13.95 | 0.0 | 0.0 | 0.0 | 13.95 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.02 | 0.0 | 0.0 | 13.95 | 0.0 | 0.0 | 0.0 | 13.95 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.02 | 0.0 | 0.0 | 13.95 | 0.0 | 0.0 | 0.0 | 13.95 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.03 | 0.0 | 0.0 | 13.95 | 0.0 | 0.0 | 0.0 | 13.95 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.71 | 0.0 | 0.0 | 100.71 | 17.01 | 0.0 | 0.0 | 83.7 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.7 | 83.57 | 0.13 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4371 - Scenario: Verify Re-aging with interest pause: UC5: Interest handling: equal amortization + outstanding full interest, backdated interest pause to re-aging, starts after re-aging - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "01 July 2024" - And Create an interest pause period with start date "10 April 2024" and end date "10 June 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "01 July 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4372 - Scenario: Verify Re-aging with interest pause: UC6: Interest handling: equal amortization + outstanding payable interest, backdated additional interest pause before re-aging, overlapping re-age completely - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Interest pause --- - And Create an interest pause period with start date "10 March 2024" and end date "10 June 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.17 | 16.88 | 0.13 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.16 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.15 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.15 | 0.07 | 0.0 | 0.0 | 16.22 | 0.0 | 0.0 | 0.0 | 16.22 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.27 | 0.0 | 0.0 | 101.27 | 17.01 | 0.0 | 0.0 | 84.26 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.1 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.1 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.1 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.1 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.1 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.12 | 0.0 | 0.0 | 14.04 | 0.0 | 0.0 | 0.0 | 14.04 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.2 | 0.0 | 0.0 | 101.2 | 17.01 | 0.0 | 0.0 | 84.19 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.19 | 83.57 | 0.62 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "01 July 2024" - And Create an interest pause period with start date "01 February 2024" and end date "09 March 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.55 | 16.45 | 0.56 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.55 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.55 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.63 | 13.92 | 0.0 | 0.0 | 0.0 | 13.92 | 0.0 | 0.0 | 0.0 | 13.92 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.92 | 0.0 | 0.0 | 0.0 | 13.92 | 0.0 | 0.0 | 0.0 | 13.92 | - | 6 | 31 | 01 June 2024 | | 41.79 | 13.92 | 0.0 | 0.0 | 0.0 | 13.92 | 0.0 | 0.0 | 0.0 | 13.92 | - | 7 | 30 | 01 July 2024 | | 27.87 | 13.92 | 0.0 | 0.0 | 0.0 | 13.92 | 0.0 | 0.0 | 0.0 | 13.92 | - | 8 | 31 | 01 August 2024 | | 13.95 | 13.92 | 0.0 | 0.0 | 0.0 | 13.92 | 0.0 | 0.0 | 0.0 | 13.92 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.95 | 0.0 | 0.0 | 0.0 | 13.95 | 0.0 | 0.0 | 0.0 | 13.95 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.56 | 0.0 | 0.0 | 100.56 | 17.01 | 0.0 | 0.0 | 83.55 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.45 | 0.56 | 0.0 | 0.0 | 83.55 | false | true | - | 15 March 2024 | Re-age | 83.55 | 83.55 | 0.0 | 0.0 | 0.0 | 0.0 | false | true | -# --- Close loan --- - When Loan Pay-off is made on "01 July 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4373 - Scenario: Verify Re-aging with interest pause: UC6: Interest handling: equal amortization + outstanding full interest, backdated interest pause after re-aging, overlapping re-aging partially - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.25 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.26 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.09 | 0.0 | 0.0 | 102.09 | 17.01 | 0.0 | 0.0 | 85.08 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.08 | 83.57 | 1.51 | 0.0 | 0.0 | 0.0 | false | false | - # --- Interest pause --- - When Admin sets the business date to "01 July 2024" - And Create an interest pause period with start date "10 February 2024" and end date "10 June 2024" - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.03 | 0.0 | 0.0 | 13.96 | 0.0 | 0.0 | 0.0 | 13.96 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.03 | 0.0 | 0.0 | 13.96 | 0.0 | 0.0 | 0.0 | 13.96 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.03 | 0.0 | 0.0 | 13.96 | 0.0 | 0.0 | 0.0 | 13.96 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.03 | 0.0 | 0.0 | 13.96 | 0.0 | 0.0 | 0.0 | 13.96 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.03 | 0.0 | 0.0 | 13.96 | 0.0 | 0.0 | 0.0 | 13.96 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.04 | 0.0 | 0.0 | 13.96 | 0.0 | 0.0 | 0.0 | 13.96 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.77 | 0.0 | 0.0 | 100.77 | 17.01 | 0.0 | 0.0 | 83.76 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 83.76 | 83.57 | 0.19 | 0.0 | 0.0 | 0.0 | false | true | -# --- Close loan --- - When Loan Pay-off is made on "01 July 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4288 - Scenario: Verify Re-aging with loan reschedule: UC1.3: Interest handling: equal amortization + outstanding payable interest, reschedule - extra terms - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | | | | 2 | | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.11 | 0.0 | 0.0 | 14.03 | 0.0 | 0.0 | 0.0 | 14.03 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Reschedule after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 July 2024 | 02 April 2024 | | | | 2 | | - Then Loan Repayment schedule has 11 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.12 | 0.0 | 0.0 | 14.05 | 0.0 | 0.0 | 0.0 | 14.05 | - | 7 | 30 | 01 July 2024 | | 33.47 | 8.31 | 0.12 | 0.0 | 0.0 | 8.43 | 0.0 | 0.0 | 0.0 | 8.43 | - | 8 | 31 | 01 August 2024 | | 25.16 | 8.31 | 0.12 | 0.0 | 0.0 | 8.43 | 0.0 | 0.0 | 0.0 | 8.43 | - | 9 | 31 | 01 September 2024 | | 16.84 | 8.32 | 0.11 | 0.0 | 0.0 | 8.43 | 0.0 | 0.0 | 0.0 | 8.43 | - | 10 | 30 | 01 October 2024 | | 8.41 | 8.43 | 0.0 | 0.0 | 0.0 | 8.43 | 0.0 | 0.0 | 0.0 | 8.43 | - | 11 | 31 | 01 November 2024 | | 0.0 | 8.41 | 0.0 | 0.0 | 0.0 | 8.41 | 0.0 | 0.0 | 0.0 | 8.41 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.29 | 0.0 | 0.0 | 101.29 | 17.01 | 0.0 | 0.0 | 84.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4289 - Scenario: Verify Re-aging with loan reschedule: UC1.4: Interest handling: equal amortization + outstanding full interest, reschedule - extra terms - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | | | | 2 | | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.34 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.57 | 0.0 | 0.0 | 102.57 | 17.01 | 0.0 | 0.0 | 85.56 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.56 | 83.57 | 1.99 | 0.0 | 0.0 | 0.0 | false | false | -# --- Reschedule after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 July 2024 | 02 April 2024 | | | | 2 | | - Then Loan Repayment schedule has 11 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.33 | 0.0 | 0.0 | 14.26 | 0.0 | 0.0 | 0.0 | 14.26 | - | 7 | 30 | 01 July 2024 | | 33.55 | 8.23 | 0.33 | 0.0 | 0.0 | 8.56 | 0.0 | 0.0 | 0.0 | 8.56 | - | 8 | 31 | 01 August 2024 | | 25.32 | 8.23 | 0.33 | 0.0 | 0.0 | 8.56 | 0.0 | 0.0 | 0.0 | 8.56 | - | 9 | 31 | 01 September 2024 | | 17.1 | 8.22 | 0.34 | 0.0 | 0.0 | 8.56 | 0.0 | 0.0 | 0.0 | 8.56 | - | 10 | 30 | 01 October 2024 | | 8.54 | 8.56 | 0.0 | 0.0 | 0.0 | 8.56 | 0.0 | 0.0 | 0.0 | 8.56 | - | 11 | 31 | 01 November 2024 | | 0.0 | 8.54 | 0.0 | 0.0 | 0.0 | 8.54 | 0.0 | 0.0 | 0.0 | 8.54 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.57 | 0.0 | 0.0 | 102.57 | 17.01 | 0.0 | 0.0 | 85.56 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 85.56 | 83.57 | 1.99 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - # TODO check and unSkip when PS-2938 is done - @Skip @TestRailId:C4292 - Scenario: Verify Re-aging with loan reschedule: UC2.3: Interest handling: EQUAL_AMORTIZATION_PAYABLE_INTEREST, reschedule - adjustedDueDate - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule before re-age --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | 15 April 2024 | | | | | - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 4 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.27 | 83.57 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | - # --- Reschedule after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 May 2024 | 02 April 2024 | 15 June 2024 | | | | | -# TODO check numbers - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 4 | 31 | 15 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 15 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 15 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 31 | 15 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - | 8 | 31 | 15 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - # TODO check and unSkip when PS-2938 is done - @Skip @TestRailId:C4293 - Scenario: Verify Re-aging with loan reschedule: UC2.4: Interest handling: EQUAL_AMORTIZATION_FULL_INTEREST, reschedule - adjustedDueDate - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule before re-age --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | 15 April 2024 | | | | | - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 74 | 15 April 2024 | | 67.76 | 15.81 | 1.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 30 | 15 May 2024 | | 51.15 | 16.61 | 0.4 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 31 | 15 June 2024 | | 34.44 | 16.71 | 0.3 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 30 | 15 July 2024 | | 17.63 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 31 | 15 August 2024 | | 0.0 | 17.63 | 0.1 | 0.0 | 0.0 | 17.73 | 0.0 | 0.0 | 0.0 | 17.73 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.78 | 0.0 | 0.0 | 102.78 | 17.01 | 0.0 | 0.0 | 85.77 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 4 | 30 | 01 May 2024 | | 56.36 | 13.89 | 0.41 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 31 | 01 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 30 | 01 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 31 | 01 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 8 | 31 | 01 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.27 | 83.57 | 0.7 | 0.0 | 0.0 | 0.0 | false | false | - # --- Reschedule after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 May 2024 | 02 April 2024 | 15 June 2024 | | | | | -# TODO check numbers - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 43 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 17 | 01 April 2024 | | 70.25 | 13.32 | 0.98 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 4 | 31 | 15 June 2024 | | 42.39 | 13.97 | 0.33 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 5 | 30 | 15 July 2024 | | 28.34 | 14.05 | 0.25 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 6 | 31 | 15 August 2024 | | 14.21 | 14.13 | 0.17 | 0.0 | 0.0 | 14.3 | 0.0 | 0.0 | 0.0 | 14.3 | - | 7 | 31 | 15 September 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - | 8 | 31 | 15 October 2024 | | 0.0 | 14.21 | 0.08 | 0.0 | 0.0 | 14.29 | 0.0 | 0.0 | 0.0 | 14.29 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.8 | 0.0 | 0.0 | 102.8 | 17.01 | 0.0 | 0.0 | 85.79 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-age | 84.28 | 83.57 | 0.71 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4382 - Scenario: Verify Re-aging with loan reschedule: UC3.1: Interest handling: equal amortization + outstanding payable interest, reschedule - newInterestRate - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule before re-age --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | | | | | 10 | - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.97 | 16.6 | 0.49 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.53 | 0.56 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 4 | 30 | 01 May 2024 | | 33.77 | 16.67 | 0.42 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.28 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.14 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.47 | 0.0 | 0.0 | 102.47 | 17.01 | 0.0 | 0.0 | 85.46 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.97 | 16.6 | 0.49 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.53 | 0.56 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 4 | 30 | 01 May 2024 | | 33.77 | 16.67 | 0.42 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.28 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.14 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.47 | 0.0 | 0.0 | 102.47 | 17.01 | 0.0 | 0.0 | 85.46 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.13 | 0.0 | 0.0 | 14.06 | 0.0 | 0.0 | 0.0 | 14.06 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.13 | 0.0 | 0.0 | 14.06 | 0.0 | 0.0 | 0.0 | 14.06 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.13 | 0.0 | 0.0 | 14.06 | 0.0 | 0.0 | 0.0 | 14.06 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.13 | 0.0 | 0.0 | 14.06 | 0.0 | 0.0 | 0.0 | 14.06 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.13 | 0.0 | 0.0 | 14.06 | 0.0 | 0.0 | 0.0 | 14.06 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.15 | 0.0 | 0.0 | 14.07 | 0.0 | 0.0 | 0.0 | 14.07 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - | 15 March 2024 | Re-age | 84.37 | 83.57 | 0.8 | 0.0 | 0.0 | 0.0 | false | - # --- Reschedule after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 May 2024 | 02 April 2024 | | | | | 12 | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.13 | 0.0 | 0.0 | 14.06 | 0.0 | 0.0 | 0.0 | 14.06 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.13 | 0.0 | 0.0 | 14.06 | 0.0 | 0.0 | 0.0 | 14.06 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.13 | 0.0 | 0.0 | 14.06 | 0.0 | 0.0 | 0.0 | 14.06 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.13 | 0.0 | 0.0 | 14.06 | 0.0 | 0.0 | 0.0 | 14.06 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.13 | 0.0 | 0.0 | 14.06 | 0.0 | 0.0 | 0.0 | 14.06 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.15 | 0.0 | 0.0 | 14.07 | 0.0 | 0.0 | 0.0 | 14.07 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.38 | 0.0 | 0.0 | 101.38 | 17.01 | 0.0 | 0.0 | 84.37 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - | 15 March 2024 | Re-age | 84.37 | 83.57 | 0.8 | 0.0 | 0.0 | 0.0 | false | - - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4383 - Scenario: Verify Re-aging with loan reschedule: UC3.2: Interest handling: equal amortization + outstanding full interest, reschedule - newInterestRate - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule before re-age --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | | | | | 10 | - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.97 | 16.6 | 0.49 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.53 | 0.56 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 4 | 30 | 01 May 2024 | | 33.77 | 16.67 | 0.42 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.28 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.14 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.47 | 0.0 | 0.0 | 102.47 | 17.01 | 0.0 | 0.0 | 85.46 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.97 | 16.6 | 0.49 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 3 | 31 | 01 April 2024 | | 50.44 | 16.53 | 0.56 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 4 | 30 | 01 May 2024 | | 33.77 | 16.67 | 0.42 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 5 | 31 | 01 June 2024 | | 16.96 | 16.81 | 0.28 | 0.0 | 0.0 | 17.09 | 0.0 | 0.0 | 0.0 | 17.09 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.96 | 0.14 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.47 | 0.0 | 0.0 | 102.47 | 17.01 | 0.0 | 0.0 | 85.46 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.32 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.32 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.32 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.32 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.32 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.35 | 0.0 | 0.0 | 14.27 | 0.0 | 0.0 | 0.0 | 14.27 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.53 | 0.0 | 0.0 | 102.53 | 17.01 | 0.0 | 0.0 | 85.52 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - | 15 March 2024 | Re-age | 85.52 | 83.57 | 1.95 | 0.0 | 0.0 | 0.0 | false | - # --- Reschedule after re-age --- - When Admin sets the business date to "02 April 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 May 2024 | 02 April 2024 | | | | | 12 | - Then Loan Repayment schedule has 9 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 14 | 15 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 17 | 01 April 2024 | | 69.64 | 13.93 | 0.32 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | 5 | 30 | 01 May 2024 | | 55.71 | 13.93 | 0.32 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | 6 | 31 | 01 June 2024 | | 41.78 | 13.93 | 0.32 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | 7 | 30 | 01 July 2024 | | 27.85 | 13.93 | 0.32 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | 8 | 31 | 01 August 2024 | | 13.92 | 13.93 | 0.32 | 0.0 | 0.0 | 14.25 | 0.0 | 0.0 | 0.0 | 14.25 | - | 9 | 31 | 01 September 2024 | | 0.0 | 13.92 | 0.35 | 0.0 | 0.0 | 14.27 | 0.0 | 0.0 | 0.0 | 14.27 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.53 | 0.0 | 0.0 | 102.53 | 17.01 | 0.0 | 0.0 | 85.52 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - | 15 March 2024 | Re-age | 85.52 | 83.57 | 1.95 | 0.0 | 0.0 | 0.0 | false | - When Loan Pay-off is made on "02 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4384 - Scenario: Verify backdated Re-aging with loan reschedule: UC1.4: Interest handling: equal amortization + outstanding payable interest, reschedule - extra terms - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule --- - When Admin sets the business date to "02 February 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 March 2024 | 02 February 2024 | | | | 2 | | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Check before re-age --- - When Admin sets the business date to "15 March 2024" - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 71.84 | 11.73 | 0.49 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 3 | 31 | 01 April 2024 | | 60.04 | 11.8 | 0.42 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 4 | 30 | 01 May 2024 | | 48.17 | 11.87 | 0.35 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 5 | 31 | 01 June 2024 | | 36.23 | 11.94 | 0.28 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 6 | 30 | 01 July 2024 | | 24.22 | 12.01 | 0.21 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 7 | 31 | 01 August 2024 | | 12.14 | 12.08 | 0.14 | 0.0 | 0.0 | 12.22 | 0.0 | 0.0 | 0.0 | 12.22 | - | 8 | 31 | 01 September 2024 | | 0.0 | 12.14 | 0.07 | 0.0 | 0.0 | 12.21 | 0.0 | 0.0 | 0.0 | 12.21 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.54 | 0.0 | 0.0 | 102.54 | 17.01 | 0.0 | 0.0 | 85.53 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- backdated Re-age transaction --- - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 15 February 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 10 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 15 February 2024 | 15 February 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 0 | 15 February 2024 | | 69.64 | 13.93 | 0.04 | 0.0 | 0.0 | 13.97 | 0.0 | 0.0 | 0.0 | 13.97 | - | 4 | 29 | 15 March 2024 | | 59.7 | 9.94 | 0.04 | 0.0 | 0.0 | 9.98 | 0.0 | 0.0 | 0.0 | 9.98 | - | 5 | 31 | 15 April 2024 | | 49.76 | 9.94 | 0.04 | 0.0 | 0.0 | 9.98 | 0.0 | 0.0 | 0.0 | 9.98 | - | 6 | 30 | 15 May 2024 | | 39.82 | 9.94 | 0.04 | 0.0 | 0.0 | 9.98 | 0.0 | 0.0 | 0.0 | 9.98 | - | 7 | 31 | 15 June 2024 | | 29.88 | 9.94 | 0.04 | 0.0 | 0.0 | 9.98 | 0.0 | 0.0 | 0.0 | 9.98 | - | 8 | 30 | 15 July 2024 | | 19.94 | 9.94 | 0.04 | 0.0 | 0.0 | 9.98 | 0.0 | 0.0 | 0.0 | 9.98 | - | 9 | 31 | 15 August 2024 | | 9.96 | 9.98 | 0.0 | 0.0 | 0.0 | 9.98 | 0.0 | 0.0 | 0.0 | 9.98 | - | 10 | 31 | 15 September 2024 | | 0.0 | 9.96 | 0.0 | 0.0 | 0.0 | 9.96 | 0.0 | 0.0 | 0.0 | 9.96 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.82 | 0.0 | 0.0 | 100.82 | 17.01 | 0.0 | 0.0 | 83.81 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 February 2024 | Re-age | 83.81 | 83.57 | 0.24 | 0.0 | 0.0 | 0.0 | false | false | -# --- Close loan --- - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4385 - Scenario: Verify backdated Re-aging with loan reschedule: UC3.3: Interest handling: equal amortization + outstanding full interest, reschedule - newInterestRate - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_INSTALLMENT" future installment allocation rule - And 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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- First installment paid --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Reschedule before re-age --- - When Admin sets the business date to "15 March 2024" - When Admin creates and approves Loan reschedule with the following data: - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 April 2024 | 15 March 2024 | | | | | 10 | - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.47 | 16.58 | 0.49 | 0.0 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | - | 4 | 30 | 01 May 2024 | | 33.82 | 16.65 | 0.42 | 0.0 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | - | 5 | 31 | 01 June 2024 | | 17.03 | 16.79 | 0.28 | 0.0 | 0.0 | 17.07 | 0.0 | 0.0 | 0.0 | 17.07 | - | 6 | 30 | 01 July 2024 | | 0.0 | 17.03 | 0.14 | 0.0 | 0.0 | 17.17 | 0.0 | 0.0 | 0.0 | 17.17 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.4 | 0.0 | 0.0 | 102.4 | 17.01 | 0.0 | 0.0 | 85.39 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- backdated Re-age transaction --- - When Admin sets the business date to "01 April 2024" - When Admin creates a Loan re-aging transaction with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 15 February 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 15 February 2024 | 15 February 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 0 | 15 February 2024 | | 69.64 | 13.93 | 0.24 | 0.0 | 0.0 | 14.17 | 0.0 | 0.0 | 0.0 | 14.17 | - | 4 | 29 | 15 March 2024 | | 55.71 | 13.93 | 0.24 | 0.0 | 0.0 | 14.17 | 0.0 | 0.0 | 0.0 | 14.17 | - | 5 | 31 | 15 April 2024 | | 41.77 | 13.94 | 0.24 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 6 | 30 | 15 May 2024 | | 27.83 | 13.94 | 0.24 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 7 | 31 | 15 June 2024 | | 13.89 | 13.94 | 0.24 | 0.0 | 0.0 | 14.18 | 0.0 | 0.0 | 0.0 | 14.18 | - | 8 | 30 | 15 July 2024 | | 0.0 | 13.89 | 0.27 | 0.0 | 0.0 | 14.16 | 0.0 | 0.0 | 0.0 | 14.16 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - | 15 February 2024 | Re-age | 85.04 | 83.57 | 1.47 | 0.0 | 0.0 | 0.0 | false | - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - # january 1: disburse 100 - # february 1: repay 25 - # february 1: chargeback 17.01 - # april 1st: reage start date : february 15 PAYABLE - @TestRailId:C4325 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging during 2nd installment after chargeback on reage start date on a closed period transaction with partially paid installment; adjust to last - interest bearing loan with equal amortization; payable interest - UC1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin sets the business date to "1 February 2024" - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "1 April 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 15 February 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 15 February 2024 | 15 February 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 0 | 15 February 2024 | | 77.15 | 15.44 | 0.04 | 0.0 | 0.0 | 15.48 | 0.0 | 0.0 | 0.0 | 15.48 | - | 4 | 29 | 15 March 2024 | | 61.71 | 15.44 | 0.04 | 0.0 | 0.0 | 15.48 | 0.0 | 0.0 | 0.0 | 15.48 | - | 5 | 31 | 15 April 2024 | | 46.27 | 15.44 | 0.04 | 0.0 | 0.0 | 15.48 | 0.0 | 0.0 | 0.0 | 15.48 | - | 6 | 30 | 15 May 2024 | | 30.83 | 15.44 | 0.04 | 0.0 | 0.0 | 15.48 | 0.0 | 0.0 | 0.0 | 15.48 | - | 7 | 31 | 15 June 2024 | | 15.39 | 15.44 | 0.04 | 0.0 | 0.0 | 15.48 | 0.0 | 0.0 | 0.0 | 15.48 | - | 8 | 30 | 15 July 2024 | | 0.0 | 15.39 | 0.06 | 0.0 | 0.0 | 15.45 | 0.0 | 0.0 | 0.0 | 15.45 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 0.84 | 0.0 | 0.0 | 117.85 | 25.0 | 7.99 | 0.0 | 92.85 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 15 February 2024 | Re-age | 92.85 | 92.59 | 0.26 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - # january 1: disburse 100 - # february 1: repay 25 - # february 1: chargeback 17.01 - # april 1st: reage start date : february 15 FULL - @TestRailId:C4326 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging during 2nd installment after chargeback on reage start date on a closed period transaction with partially paid installment; adjust to last - interest bearing loan with equal amortization; full interest - UC1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin sets the business date to "1 February 2024" - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "1 April 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 15 February 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 14 | 15 February 2024 | 15 February 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 0 | 15 February 2024 | | 77.16 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 4 | 29 | 15 March 2024 | | 61.73 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 5 | 31 | 15 April 2024 | | 46.3 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 6 | 30 | 15 May 2024 | | 30.87 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 7 | 31 | 15 June 2024 | | 15.44 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 8 | 30 | 15 July 2024 | | 0.0 | 15.44 | 0.23 | 0.0 | 0.0 | 15.67 | 0.0 | 0.0 | 0.0 | 15.67 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 15 February 2024 | Re-age | 93.92 | 92.59 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - # january 1: disburse 100 - # february 1: repay 25 - # february 1: chargeback 17.01 - # april 1st: reage start date : March 1 PAYABLE - @TestRailId:C4327 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging on 2nd due after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "1 April 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 1 March 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 0 | 01 March 2024 | | 77.16 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.09 | 0.0 | 0.0 | 15.53 | 0.0 | 0.0 | 0.0 | 15.53 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.12 | 0.0 | 0.0 | 118.13 | 25.0 | 7.99 | 0.0 | 93.13 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 01 March 2024 | Re-age | 93.13 | 92.59 | 0.54 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - # january 1: disburse 100 - # february 1: repay 25 - # february 1: chargeback 17.01 - # april 1st: reage start date : March 1 FULL - @TestRailId:C4328 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging on 2nd due after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; full interest - UC2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "1 April 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 1 March 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 0 | 01 March 2024 | | 77.16 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.23 | 0.0 | 0.0 | 15.67 | 0.0 | 0.0 | 0.0 | 15.67 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 01 March 2024 | Re-age | 93.92 | 92.59 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - # january 1: disburse 100 - # february 1: repay 25 - # february 1: chargeback 17.01 - # april 1st: reage start date : February 1 PAYABLE - @TestRailId:C4329 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "1 April 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 February 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 92.59 | 24.42 | 0.58 | 0.0 | 0.0 | 25.0 | 25.0 | 7.99 | 0.0 | 0.0 | - | 2 | 0 | 01 February 2024 | | 77.16 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | - | 3 | 29 | 01 March 2024 | | 61.73 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | - | 4 | 31 | 01 April 2024 | | 46.3 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | - | 5 | 30 | 01 May 2024 | | 30.87 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | - | 6 | 31 | 01 June 2024 | | 15.44 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | 0.0 | 0.0 | 0.0 | 15.43 | - | 7 | 30 | 01 July 2024 | | 0.0 | 15.44 | 0.0 | 0.0 | 0.0 | 15.44 | 0.0 | 0.0 | 0.0 | 15.44 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 0.58 | 0.0 | 0.0 | 117.59 | 25.0 | 7.99 | 0.0 | 92.59 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 01 February 2024 | Re-age | 92.59 | 92.59 | 0.0 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - # january 1: disburse 100 - # february 1: repay 25 - # february 1: chargeback 17.01 - # april 1st: reage start date : February 1 FULL - @TestRailId:C4330 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; full interest - UC3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "1 April 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 February 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 92.59 | 24.42 | 0.58 | 0.0 | 0.0 | 25.0 | 25.0 | 7.99 | 0.0 | 0.0 | - | 2 | 0 | 01 February 2024 | | 77.16 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 3 | 29 | 01 March 2024 | | 61.73 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 4 | 31 | 01 April 2024 | | 46.3 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 5 | 30 | 01 May 2024 | | 30.87 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 6 | 31 | 01 June 2024 | | 15.44 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 7 | 30 | 01 July 2024 | | 0.0 | 15.44 | 0.23 | 0.0 | 0.0 | 15.67 | 0.0 | 0.0 | 0.0 | 15.67 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 01 February 2024 | Re-age | 93.92 | 92.59 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4332 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and 2nd disb before re-age at the same date - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "03 January 2024" - When Admin successfully disburse the loan on "03 January 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | | | 03 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 125.35 | 24.65 | 0.86 | 0.0 | 0.0 | 25.51 | 0.0 | 0.0 | 0.0 | 25.51 | - | 2 | 29 | 01 March 2024 | | 100.57 | 24.78 | 0.73 | 0.0 | 0.0 | 25.51 | 0.0 | 0.0 | 0.0 | 25.51 | - | 3 | 31 | 01 April 2024 | | 75.65 | 24.92 | 0.59 | 0.0 | 0.0 | 25.51 | 0.0 | 0.0 | 0.0 | 25.51 | - | 4 | 30 | 01 May 2024 | | 50.58 | 25.07 | 0.44 | 0.0 | 0.0 | 25.51 | 0.0 | 0.0 | 0.0 | 25.51 | - | 5 | 31 | 01 June 2024 | | 25.37 | 25.21 | 0.3 | 0.0 | 0.0 | 25.51 | 0.0 | 0.0 | 0.0 | 25.51 | - | 6 | 30 | 01 July 2024 | | 0.0 | 25.37 | 0.15 | 0.0 | 0.0 | 25.52 | 0.0 | 0.0 | 0.0 | 25.52 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 3.07 | 0.0 | 0.0 | 153.07 | 0.0 | 0.0 | 0.0 | 153.07 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 03 January 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false | - - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 04 January 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 2 | 03 January 2024 | 03 January 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 03 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 2 | 1 | 04 January 2024 | | 125.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | - | 3 | 31 | 04 February 2024 | | 100.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | - | 4 | 29 | 04 March 2024 | | 75.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | - | 5 | 31 | 04 April 2024 | | 50.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | - | 6 | 30 | 04 May 2024 | | 24.99 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | - | 7 | 31 | 04 June 2024 | | 0.0 | 24.99 | 0.0 | 0.0 | 0.0 | 24.99 | 0.0 | 0.0 | 0.0 | 24.99 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 0.04 | 0.0 | 0.0 | 150.04 | 0.0 | 0.0 | 0.0 | 150.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 03 January 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false | - | 03 January 2024 | Re-age | 150.04 | 150.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "03 January 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4333 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging trn with repayment and 2nd disb after re-age at the same date - interest bearing multidisb loan with equal amortization; outstanding payable interest - UC2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "03 January 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 04 January 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 2 | 03 January 2024 | 03 January 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 2 | 1 | 04 January 2024 | | 83.34 | 16.66 | 0.01 | 0.0 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | - | 3 | 31 | 04 February 2024 | | 66.68 | 16.66 | 0.01 | 0.0 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | - | 4 | 29 | 04 March 2024 | | 50.02 | 16.66 | 0.01 | 0.0 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | - | 5 | 31 | 04 April 2024 | | 33.36 | 16.66 | 0.01 | 0.0 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | - | 6 | 30 | 04 May 2024 | | 16.69 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | 0.0 | 0.0 | 0.0 | 16.67 | - | 7 | 31 | 04 June 2024 | | 0.0 | 16.69 | 0.0 | 0.0 | 0.0 | 16.69 | 0.0 | 0.0 | 0.0 | 16.69 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.04 | 0.0 | 0.0 | 100.04 | 0.0 | 0.0 | 0.0 | 100.04 | - - When Admin successfully disburse the loan on "03 January 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 2 | 03 January 2024 | 03 January 2024 | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | | | 03 January 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 2 | 1 | 04 January 2024 | | 125.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | - | 3 | 31 | 04 February 2024 | | 100.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | - | 4 | 29 | 04 March 2024 | | 75.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | - | 5 | 31 | 04 April 2024 | | 50.0 | 25.0 | 0.01 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | - | 6 | 30 | 04 May 2024 | | 24.99 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | 0.0 | 0.0 | 0.0 | 25.01 | - | 7 | 31 | 04 June 2024 | | 0.0 | 24.99 | 0.0 | 0.0 | 0.0 | 24.99 | 0.0 | 0.0 | 0.0 | 24.99 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 0.04 | 0.0 | 0.0 | 150.04 | 0.0 | 0.0 | 0.0 | 150.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 03 January 2024 | Re-age | 100.04 | 100.0 | 0.04 | 0.0 | 0.0 | 0.0 | false | false | - | 03 January 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 150.0 | false | false | - - When Loan Pay-off is made on "03 January 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4334 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC4.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 7.99 | 7.99 | 0.0 | 9.02 | - | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 25.0 | 7.99 | 0.0 | 77.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 7.99 | 7.99 | 0.0 | 26.03 | - | 3 | 31 | 01 April 2024 | | 50.48 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.95 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.1 | 0.0 | 0.0 | 119.11 | 25.0 | 7.99 | 0.0 | 94.11 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "21 February 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 March 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 20 | 21 February 2024 | 21 February 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 9 | 01 March 2024 | | 77.16 | 15.43 | 0.06 | 0.0 | 0.0 | 15.49 | 0.0 | 0.0 | 0.0 | 15.49 | - | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.06 | 0.0 | 0.0 | 15.49 | 0.0 | 0.0 | 0.0 | 15.49 | - | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.06 | 0.0 | 0.0 | 15.49 | 0.0 | 0.0 | 0.0 | 15.49 | - | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.06 | 0.0 | 0.0 | 15.49 | 0.0 | 0.0 | 0.0 | 15.49 | - | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.06 | 0.0 | 0.0 | 15.49 | 0.0 | 0.0 | 0.0 | 15.49 | - | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.07 | 0.0 | 0.0 | 15.51 | 0.0 | 0.0 | 0.0 | 15.51 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 0.95 | 0.0 | 0.0 | 117.96 | 25.0 | 7.99 | 0.0 | 92.96 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 21 February 2024 | Re-age | 92.96 | 92.59 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "21 February 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4335 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging on 1st installment after repay and charge on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC4.2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - And Admin adds "LOAN_NSF_FEE" due date charge with "01 February 2024" due date and 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 10.0 | 27.01 | 17.01 | 0.0 | 0.0 | 10.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 10.0 | 111.81 | 25.0 | 7.99 | 0.0 | 86.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - 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 | 01 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - - When Admin sets the business date to "21 February 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 21 February 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 21 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 20 | 21 February 2024 | 21 February 2024 | 75.58 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 0 | 21 February 2024 | | 62.99 | 12.59 | 0.05 | 0.0 | 1.67 | 14.31 | 0.0 | 0.0 | 0.0 | 14.31 | - | 4 | 29 | 21 March 2024 | | 50.4 | 12.59 | 0.05 | 0.0 | 1.67 | 14.31 | 0.0 | 0.0 | 0.0 | 14.31 | - | 5 | 31 | 21 April 2024 | | 37.81 | 12.59 | 0.05 | 0.0 | 1.67 | 14.31 | 0.0 | 0.0 | 0.0 | 14.31 | - | 6 | 30 | 21 May 2024 | | 25.22 | 12.59 | 0.05 | 0.0 | 1.67 | 14.31 | 0.0 | 0.0 | 0.0 | 14.31 | - | 7 | 31 | 21 June 2024 | | 12.63 | 12.59 | 0.05 | 0.0 | 1.67 | 14.31 | 0.0 | 0.0 | 0.0 | 14.31 | - | 8 | 30 | 21 July 2024 | | 0.0 | 12.63 | 0.05 | 0.0 | 1.65 | 14.33 | 0.0 | 0.0 | 0.0 | 14.33 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 0.88 | 0.0 | 10.0 | 110.88 | 25.0 | 7.99 | 0.0 | 85.88 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 21 February 2024 | Re-age | 85.88 | 75.58 | 0.3 | 0.0 | 10.0 | 0.0 | false | false | - - When Loan Pay-off is made on "21 February 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4336 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging on date after maturity date after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding payable interest - UC4.3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "01 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 August 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 153 | 01 August 2024 | | 77.16 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 4 | 31 | 01 September 2024 | | 61.73 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 5 | 30 | 01 October 2024 | | 46.3 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 6 | 31 | 01 November 2024 | | 30.87 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 7 | 30 | 01 December 2024 | | 15.44 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 8 | 31 | 01 January 2025 | | 0.0 | 15.44 | 0.09 | 0.0 | 0.0 | 15.53 | 0.0 | 0.0 | 0.0 | 15.53 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.12 | 0.0 | 0.0 | 118.13 | 25.0 | 7.99 | 0.0 | 93.13 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 01 March 2024 | Re-age | 93.13 | 92.59 | 0.54 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "01 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4337 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to next - interest bearing loan with equal amortization; outstanding payable interest - UC4.4 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "01 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 March 2024 | 6 | EQUAL_AMORTIZATION_PAYABLE_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 0 | 01 March 2024 | | 77.16 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.09 | 0.0 | 0.0 | 15.52 | 0.0 | 0.0 | 0.0 | 15.52 | - | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.09 | 0.0 | 0.0 | 15.53 | 0.0 | 0.0 | 0.0 | 15.53 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.12 | 0.0 | 0.0 | 118.13 | 25.0 | 7.99 | 0.0 | 93.13 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 01 March 2024 | Re-age | 93.13 | 92.59 | 0.54 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "1 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4338 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding full interest - UC4.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALC_EMI_360_30_CHARGEBACK_PRINCIPAL_INTEREST_FEE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 7.99 | 7.99 | 0.0 | 9.02 | - | 3 | 31 | 01 April 2024 | | 50.38 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.66 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.85 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.85 | 0.1 | 0.0 | 0.0 | 16.95 | 0.0 | 0.0 | 0.0 | 16.95 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.0 | 0.0 | 0.0 | 102.0 | 25.0 | 7.99 | 0.0 | 77.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 7.99 | 7.99 | 0.0 | 26.03 | - | 3 | 31 | 01 April 2024 | | 50.48 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.76 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.95 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.95 | 0.1 | 0.0 | 0.0 | 17.05 | 0.0 | 0.0 | 0.0 | 17.05 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.1 | 0.0 | 0.0 | 119.11 | 25.0 | 7.99 | 0.0 | 94.11 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "21 February 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 March 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 20 | 21 February 2024 | 21 February 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 9 | 01 March 2024 | | 77.16 | 15.43 | 0.25 | 0.0 | 0.0 | 15.68 | 0.0 | 0.0 | 0.0 | 15.68 | - | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.25 | 0.0 | 0.0 | 15.68 | 0.0 | 0.0 | 0.0 | 15.68 | - | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.25 | 0.0 | 0.0 | 15.68 | 0.0 | 0.0 | 0.0 | 15.68 | - | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.25 | 0.0 | 0.0 | 15.68 | 0.0 | 0.0 | 0.0 | 15.68 | - | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.25 | 0.0 | 0.0 | 15.68 | 0.0 | 0.0 | 0.0 | 15.68 | - | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.27 | 0.0 | 0.0 | 15.71 | 0.0 | 0.0 | 0.0 | 15.71 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 2.1 | 0.0 | 0.0 | 119.11 | 25.0 | 7.99 | 0.0 | 94.11 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 21 February 2024 | Re-age | 94.11 | 92.59 | 1.52 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "21 February 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4339 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging on 1st installment after repay and charge on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding full interest - UC4.2 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 34.02 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 66.95 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.23 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.41 | 16.82 | 0.19 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 17.01 | 16.4 | 0.1 | 0.0 | 0.0 | 16.5 | 0.0 | 0.0 | 0.0 | 16.5 | - | 6 | 30 | 01 July 2024 | 01 February 2024 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.55 | 0.0 | 0.0 | 101.55 | 34.02 | 17.01 | 0.0 | 67.53 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 34.02 | 33.44 | 0.58 | 0.0 | 0.0 | 66.56 | false | false | - - When Admin sets the business date to "21 February 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 April 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 20 | 21 February 2024 | 21 February 2024 | 66.56 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 17.01 | 17.01 | 0.0 | 0.0 | - | 3 | 40 | 01 April 2024 | | 55.46 | 11.1 | 0.16 | 0.0 | 0.0 | 11.26 | 0.0 | 0.0 | 0.0 | 11.26 | - | 4 | 30 | 01 May 2024 | | 44.36 | 11.1 | 0.16 | 0.0 | 0.0 | 11.26 | 0.0 | 0.0 | 0.0 | 11.26 | - | 5 | 31 | 01 June 2024 | | 33.26 | 11.1 | 0.16 | 0.0 | 0.0 | 11.26 | 0.0 | 0.0 | 0.0 | 11.26 | - | 6 | 30 | 01 July 2024 | | 22.16 | 11.1 | 0.16 | 0.0 | 0.0 | 11.26 | 0.0 | 0.0 | 0.0 | 11.26 | - | 7 | 31 | 01 August 2024 | | 11.06 | 11.1 | 0.16 | 0.0 | 0.0 | 11.26 | 0.0 | 0.0 | 0.0 | 11.26 | - | 8 | 31 | 01 September 2024 | | 0.0 | 11.06 | 0.17 | 0.0 | 0.0 | 11.23 | 0.0 | 0.0 | 0.0 | 11.23 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.55 | 0.0 | 0.0 | 101.55 | 34.02 | 17.01 | 0.0 | 67.53 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 34.02 | 33.44 | 0.58 | 0.0 | 0.0 | 66.56 | false | false | - | 21 February 2024 | Re-age | 67.53 | 66.56 | 0.97 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "21 February 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4340 @AdvancedPaymentAllocation - Scenario: Verify Loan re-aging on date after maturity date after repay and chargeback on 1st due with partially paid installment; adjust to last - interest bearing loan with equal amortization; outstanding full interest - UC4.3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "01 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 August 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 153 | 01 August 2024 | | 77.16 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 4 | 31 | 01 September 2024 | | 61.73 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 5 | 30 | 01 October 2024 | | 46.3 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 6 | 31 | 01 November 2024 | | 30.87 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 7 | 30 | 01 December 2024 | | 15.44 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 8 | 31 | 01 January 2025 | | 0.0 | 15.44 | 0.23 | 0.0 | 0.0 | 15.67 | 0.0 | 0.0 | 0.0 | 15.67 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 01 March 2024 | Re-age | 93.92 | 92.59 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "01 MArch 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4341 @AdvancedPaymentAllocation - Scenario: Verify Loan backdated re-aging on 1st installment after repay and chargeback on 1st due with partially paid installment; adjust to next - interest bearing loan with equal amortization; outstanding full interest - UC4.4 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_IR_DAILY_TILL_PRECLOSE_LAST_INSTALLMENT_STRATEGY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 25 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.0 | 16.57 | 0.44 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.33 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.57 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.71 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.71 | 0.05 | 0.0 | 0.0 | 16.76 | 7.99 | 7.99 | 0.0 | 8.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.81 | 0.0 | 0.0 | 101.81 | 25.0 | 7.99 | 0.0 | 76.81 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.1 | 33.48 | 0.54 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.67 | 0.34 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.67 | 16.76 | 0.25 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.81 | 16.86 | 0.15 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.81 | 0.05 | 0.0 | 0.0 | 16.86 | 7.99 | 7.99 | 0.0 | 8.87 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - - When Admin sets the business date to "01 March 2024" - When Admin creates a Loan re-aging transaction by Loan external ID with the following data: - | frequencyNumber | frequencyType | startDate | numberOfInstallments | reAgeInterestHandling | - | 1 | MONTHS | 01 March 2024 | 6 | EQUAL_AMORTIZATION_FULL_INTEREST | - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 92.59 | 7.99 | 0.0 | 0.0 | 0.0 | 7.99 | 7.99 | 7.99 | 0.0 | 0.0 | - | 3 | 0 | 01 March 2024 | | 77.16 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 4 | 31 | 01 April 2024 | | 61.73 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 5 | 30 | 01 May 2024 | | 46.3 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 6 | 31 | 01 June 2024 | | 30.87 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 7 | 30 | 01 July 2024 | | 15.44 | 15.43 | 0.22 | 0.0 | 0.0 | 15.65 | 0.0 | 0.0 | 0.0 | 15.65 | - | 8 | 31 | 01 August 2024 | | 0.0 | 15.44 | 0.23 | 0.0 | 0.0 | 15.67 | 0.0 | 0.0 | 0.0 | 15.67 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 117.01 | 1.91 | 0.0 | 0.0 | 118.92 | 25.0 | 7.99 | 0.0 | 93.92 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 25.0 | 24.42 | 0.58 | 0.0 | 0.0 | 75.58 | false | false | - | 01 February 2024 | Chargeback | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | 92.59 | false | false | - | 01 March 2024 | Re-age | 93.92 | 92.59 | 1.33 | 0.0 | 0.0 | 0.0 | false | false | - - When Loan Pay-off is made on "1 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingPreview.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingPreview.feature index 0e7215425e3..5cda8a56e30 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingPreview.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAgingPreview.feature @@ -471,7 +471,7 @@ Feature: LoanReAgingPreview | 1 | 0 | 01 January 2025 | 01 April 2025 | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | | | 16 January 2025 | | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | | | | 2 | 0 | 16 January 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 16 | 01 February 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | + | 3 | 31 | 01 February 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 4 | 28 | 01 March 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 5 | 31 | 01 April 2025 | 01 April 2025 | 600.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | | 6 | 0 | 01 April 2025 | | 0.0 | 600.0 | 0.0 | 0.0 | 0.0 | 600.0 | 0.0 | 0.0 | 0.0 | 600.0 | diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortization.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortization.feature index 4e9effcbac6..d7715c2cb05 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortization.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanReAmortization.feature @@ -26,7 +26,7 @@ Feature: LoanReAmortization | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | | 01 January 2024 | Down Payment | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 375.0 | - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 4 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 | | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -68,7 +68,7 @@ Feature: LoanReAmortization | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | | 01 January 2024 | Disbursement | 500.0 | 0.0 | 0.0 | 0.0 | 0.0 | 500.0 | | 01 January 2024 | Down Payment | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 375.0 | - When Admin creates a Loan re-amortization transaction on current business date by loan external ID + When When Admin creates a Loan re-amortization transaction on current business date by loan external ID Then Loan Repayment schedule has 4 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 | | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -96,7 +96,7 @@ Feature: LoanReAmortization And Admin successfully approves the loan on "01 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount When Admin sets the business date to "25 January 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 4 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 | | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -113,7 +113,7 @@ Feature: LoanReAmortization | 01 January 2024 | Down Payment | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 375.0 | false | | 25 January 2024 | Re-amortize | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 0.0 | false | When Admin sets the business date to "26 January 2024" - When Admin undo Loan re-amortization transaction on current business date + When When Admin undo Loan re-amortization transaction on current business date Then Loan Repayment schedule has 4 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 | | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -145,7 +145,7 @@ Feature: LoanReAmortization When Admin runs inline COB job for Loan Then Admin checks that delinquency range is: "RANGE_3" and has delinquentDate "2024-01-19" When Admin sets the business date to "25 January 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Admin checks that delinquency range is: "NO_DELINQUENCY" and has delinquentDate "" @TestRailId:C3073 @AdvancedPaymentAllocation @@ -161,7 +161,7 @@ Feature: LoanReAmortization When Admin sets the business date to "16 January 2024" When Admin adds "LOAN_NSF_FEE" due date charge with "16 January 2024" due date and 10 EUR transaction amount When Admin sets the business date to "25 January 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 4 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 | | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -189,7 +189,7 @@ Feature: LoanReAmortization And Admin successfully approves the loan on "01 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount When Admin sets the business date to "01 February 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 4 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 | | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -217,7 +217,7 @@ Feature: LoanReAmortization And Admin successfully approves the loan on "01 January 2024" with "500" amount and expected disbursement date on "01 January 2024" When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount When Admin sets the business date to "01 February 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 4 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 | | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -264,7 +264,7 @@ Feature: LoanReAmortization When Admin successfully disburse the loan on "01 January 2024" with "500" EUR transaction amount When Admin sets the business date to "01 February 2024" When Admin adds "LOAN_NSF_FEE" due date charge with "27 February 2024" due date and 10 EUR transaction amount - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 5 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 | | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -295,7 +295,7 @@ Feature: LoanReAmortization When Admin sets the business date to "16 January 2024" When Admin adds "LOAN_NSF_FEE" due date charge with "16 January 2024" due date and 10 EUR transaction amount When Admin sets the business date to "31 January 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 4 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 | | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -340,7 +340,7 @@ Feature: LoanReAmortization | 01 January 2024 | Down Payment | 125.0 | 125.0 | 0.0 | 0.0 | 0.0 | 375.0 | | 17 January 2024 | Repayment | 50.0 | 50.0 | 0.0 | 0.0 | 0.0 | 325.0 | When Admin sets the business date to "30 January 2024" - When Admin creates a Loan re-amortization transaction on current business date by loan external ID + When When Admin creates a Loan re-amortization transaction on current business date by loan external ID Then Loan Repayment schedule has 4 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 | | | | 01 January 2024 | | 500.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -372,7 +372,7 @@ Feature: LoanReAmortization When Admin runs inline COB job for Loan Then LoanDelinquencyRangeChangeBusinessEvent is created When Admin sets the business date to "01 February 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then LoanDelinquencyRangeChangeBusinessEvent is created Then LoanReAmortizeBusinessEvent is created @@ -390,7 +390,7 @@ Feature: LoanReAmortization And Customer makes "AUTOPAY" repayment on "16 January 2024" with 120 EUR transaction amount # --- Re-amortization transaction --- When Admin sets the business date to "20 February 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -443,7 +443,7 @@ Feature: LoanReAmortization When Admin successfully disburse the loan on "01 January 2024" with "800" EUR transaction amount # --- Re-amortization transaction --- When Admin sets the business date to "20 February 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -495,7 +495,7 @@ Feature: LoanReAmortization When Admin successfully disburse the loan on "01 January 2024" with "800" EUR transaction amount # --- Re-amortization transaction --- When Admin sets the business date to "20 February 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -552,7 +552,7 @@ Feature: LoanReAmortization And Customer makes "AUTOPAY" repayment on "16 January 2024" with 140 EUR transaction amount # --- Re-amortization transaction --- When Admin sets the business date to "20 February 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -605,7 +605,7 @@ Feature: LoanReAmortization When Admin successfully disburse the loan on "01 January 2024" with "800" EUR transaction amount # --- Re-amortization transaction after 1st installment date --- When Admin sets the business date to "20 February 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -673,7 +673,7 @@ Feature: LoanReAmortization | 21 February 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 675.0 | true | false | # --- Undo re-amortization --- When Admin sets the business date to "23 February 2024" - And Admin undo Loan re-amortization transaction on current business date + And When Admin undo Loan re-amortization transaction on current business date Then Loan Repayment schedule has 7 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 | | | | 01 January 2024 | | 800.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -739,7 +739,7 @@ Feature: LoanReAmortization | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -809,7 +809,7 @@ Feature: LoanReAmortization | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | | Snooze fee | false | Specified due date | 15 February 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -880,7 +880,7 @@ Feature: LoanReAmortization | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 7 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -948,7 +948,7 @@ Feature: LoanReAmortization | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | | 01 February 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -1015,7 +1015,7 @@ Feature: LoanReAmortization | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | | 01 February 2024 | Repayment | 20.0 | 19.42 | 0.58 | 0.0 | 0.0 | 80.58 | false | When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -1085,7 +1085,7 @@ Feature: LoanReAmortization | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 7 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -1510,297 +1510,6 @@ Feature: LoanReAmortization | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | | 15 March 2024 | Re-amortize | 12.76 | 12.39 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | - @TestRailId:C4374 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization trn reversed by backdated repayment - Interest calculation: Default Behavior - UC7 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - -# --- Re-amortization transaction --- - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 63.23 | 20.34 | 0.98 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.28 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.21 | 21.07 | 0.25 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.21 | 0.12 | 0.0 | 0.0 | 21.33 | 0.0 | 0.0 | 0.0 | 21.33 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.3 | 0.0 | 0.0 | 102.3 | 17.01 | 0.0 | 0.0 | 85.29 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 34.02 | 0.0 | 0.0 | 68.03 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4375 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization trn reverse-replayed by backdated repayment - Interest calculation: equal amortization interest split - UC7 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - # --- Re-amortization transaction --- - When Admin sets the business date to "15 March 2024" - And Admin creates a Loan re-amortization transaction on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 62.86 | 20.71 | 0.61 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.03 | 20.83 | 0.49 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.08 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.08 | 0.24 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 34.02 | 0.0 | 0.0 | 68.03 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 67.05 | false | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4376 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization trn reverse-replayed by backdated repayment - Interest calculation: Default Behavior - UC7.1 - When Admin sets the business date to "01 January 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_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_PRINCIPAL_FIRST | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - # --- Re-amortization transaction --- - When Admin sets the business date to "15 March 2024" - And Admin creates a Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 63.23 | 20.34 | 0.98 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.28 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.21 | 21.07 | 0.25 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.21 | 0.12 | 0.0 | 0.0 | 21.33 | 0.0 | 0.0 | 0.0 | 21.33 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.3 | 0.0 | 0.0 | 102.3 | 17.01 | 0.0 | 0.0 | 85.29 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 73.57 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 55.7 | 17.87 | 0.92 | 0.0 | 0.0 | 18.79 | 0.0 | 0.0 | 0.0 | 18.79 | - | 4 | 30 | 01 May 2024 | | 37.23 | 18.47 | 0.32 | 0.0 | 0.0 | 18.79 | 0.0 | 0.0 | 0.0 | 18.79 | - | 5 | 31 | 01 June 2024 | | 18.66 | 18.57 | 0.22 | 0.0 | 0.0 | 18.79 | 0.0 | 0.0 | 0.0 | 18.79 | - | 6 | 30 | 01 July 2024 | | 0.0 | 18.66 | 0.11 | 0.0 | 0.0 | 18.77 | 0.0 | 0.0 | 0.0 | 18.77 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 27.01 | 0.0 | 0.0 | 75.14 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 73.57 | false | false | - | 15 March 2024 | Re-amortize | 7.01 | 6.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | true | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4377 - Scenario: Verify Re-amortization trn reversed by backdated repayment - Interest calculation: equal amortization interest split - UC7.1 - When Admin sets the business date to "01 January 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_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL_PRINCIPAL_FIRST | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - -# --- Re-amortization transaction --- - When Admin sets the business date to "15 March 2024" - And Admin creates a Loan re-amortization transaction on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 62.86 | 20.71 | 0.61 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.03 | 20.83 | 0.49 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.08 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.08 | 0.24 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - And Customer makes "AUTOPAY" repayment on "01 March 2024" with 10 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 73.57 | 10.0 | 0.0 | 0.0 | 0.0 | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 55.34 | 18.23 | 0.55 | 0.0 | 0.0 | 18.78 | 0.0 | 0.0 | 0.0 | 18.78 | - | 4 | 30 | 01 May 2024 | | 37.0 | 18.34 | 0.44 | 0.0 | 0.0 | 18.78 | 0.0 | 0.0 | 0.0 | 18.78 | - | 5 | 31 | 01 June 2024 | | 18.56 | 18.44 | 0.34 | 0.0 | 0.0 | 18.78 | 0.0 | 0.0 | 0.0 | 18.78 | - | 6 | 30 | 01 July 2024 | | 0.0 | 18.56 | 0.23 | 0.0 | 0.0 | 18.79 | 0.0 | 0.0 | 0.0 | 18.79 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.14 | 0.0 | 0.0 | 102.14 | 27.01 | 0.0 | 0.0 | 75.13 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Repayment | 10.0 | 10.0 | 0.0 | 0.0 | 0.0 | 73.57 | false | false | - | 15 March 2024 | Re-amortize | 7.01 | 6.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | true | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - #will be handled in separate story @Skip @TestRailId:C4310 @AdvancedPaymentAllocation @@ -1815,7 +1524,7 @@ Feature: LoanReAmortization When Admin sets the business date to "01 February 2024" And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -1836,7 +1545,7 @@ Feature: LoanReAmortization When Admin sets the business date to "01 April 2024" And Customer makes "AUTOPAY" repayment on "01 April 2024" with 21.32 EUR transaction amount When Admin sets the business date to "15 May 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -1888,7 +1597,7 @@ Feature: LoanReAmortization | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.08 | 5.0 | 10.0 | 117.08 | 17.01 | 0.0 | 0.0 | 100.07 | When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -1932,7 +1641,7 @@ Feature: LoanReAmortization | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | When Admin sets the business date to "15 April 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -1982,7 +1691,7 @@ Feature: LoanReAmortization | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | | 01 February 2024 | Repayment | 30.0 | 29.42 | 0.58 | 0.0 | 0.0 | 70.58 | false | false | When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date + When When Admin creates a Loan re-amortization transaction on current business date Then Loan Repayment schedule has 6 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 | | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | @@ -2002,1506 +1711,4 @@ Feature: LoanReAmortization | 15 March 2024 | Re-amortize | 4.02 | 3.61 | 0.41 | 0.0 | 0.0 | 0.0 | false | false | When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4389 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization reversal on interest bearing loan - Interest calculation: Default Behavior - UC8 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_NO_CALC_ON_PAST_DUE_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "15 March 2024" - And Admin creates a Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 63.23 | 20.34 | 0.98 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.28 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.21 | 21.07 | 0.25 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.21 | 0.12 | 0.0 | 0.0 | 21.33 | 0.0 | 0.0 | 0.0 | 21.33 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.3 | 0.0 | 0.0 | 102.3 | 17.01 | 0.0 | 0.0 | 85.29 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "1 April 2024" - When Admin undo Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | true | false | - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4390 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization reversal on interest bearing loan - Interest handling: EQUAL_AMORTIZATION_INTEREST_SPLIT - UC8 - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And 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_360_30_INTEREST_RECALC_DAILY_NO_CALC_ON_PAST_DUE_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- Repayment on due date --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-amortization transaction --- - When Admin sets the business date to "15 March 2024" - And Admin creates a Loan re-amortization transaction on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 62.86 | 20.71 | 0.61 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.03 | 20.83 | 0.49 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.08 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.08 | 0.24 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "1 April 2024" - When Admin undo Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | true | false | - - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4396 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization reversal after repayment on interest bearing loan - Interest calculation: Default Behavior - UC8.1 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_NO_CALC_ON_PAST_DUE_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 63.23 | 20.34 | 0.98 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.28 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.21 | 21.07 | 0.25 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.21 | 0.12 | 0.0 | 0.0 | 21.33 | 0.0 | 0.0 | 0.0 | 21.33 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.3 | 0.0 | 0.0 | 102.3 | 17.01 | 0.0 | 0.0 | 85.29 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "1 April 2024" - And Customer makes "AUTOPAY" repayment on "01 April 2024" with 21.32 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 63.23 | 20.34 | 0.98 | 0.0 | 0.0 | 21.32 | 21.32 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | | 42.28 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.21 | 21.07 | 0.25 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.21 | 0.12 | 0.0 | 0.0 | 21.33 | 0.0 | 0.0 | 0.0 | 21.33 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.3 | 0.0 | 0.0 | 102.3 | 38.33 | 0.0 | 0.0 | 63.97 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Repayment | 21.32 | 20.34 | 0.98 | 0.0 | 0.0 | 63.23 | false | false | - - When Admin undo Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 April 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 17.01 | 0.0 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 4.31 | 0.0 | 0.0 | 12.7 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 38.33 | 0.0 | 17.01 | 63.72 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | true | false | - | 01 April 2024 | Repayment | 21.32 | 20.83 | 0.49 | 0.0 | 0.0 | 62.74 | false | true | - - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4397 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization reversal after chargeback on interest bearing loan - Interest handling: EQUAL_AMORTIZATION_INTEREST_SPLIT - UC8.2 - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And 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_INTEREST_RECALC_EMI_360_30_CHARGEBACK_INTEREST_FEE_PRINCIPAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- Repayment on due date --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-amortization transaction --- - When Admin sets the business date to "15 March 2024" - And Admin creates a Loan re-amortization transaction on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 62.86 | 20.71 | 0.61 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.03 | 20.83 | 0.49 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.08 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.08 | 0.24 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "1 April 2024" - When Admin makes "REPAYMENT_ADJUSTMENT_CHARGEBACK" chargeback with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 62.86 | 20.71 | 0.61 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.12 | 37.17 | 1.16 | 0.0 | 0.0 | 38.33 | 0.0 | 0.0 | 0.0 | 38.33 | - | 5 | 31 | 01 June 2024 | | 21.17 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.17 | 0.24 | 0.0 | 0.0 | 21.41 | 0.0 | 0.0 | 0.0 | 21.41 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.43 | 2.96 | 0.0 | 0.0 | 119.39 | 17.01 | 0.0 | 0.0 | 102.38 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin undo Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.91 | 33.05 | 0.97 | 0.0 | 0.0 | 34.02 | 0.0 | 0.0 | 0.0 | 34.02 | - | 5 | 31 | 01 June 2024 | | 17.1 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 17.1 | 0.1 | 0.0 | 0.0 | 17.2 | 0.0 | 0.0 | 0.0 | 17.2 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 116.43 | 2.83 | 0.0 | 0.0 | 119.26 | 17.01 | 0.0 | 0.0 | 102.25 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | true | false | - | 01 April 2024 | Chargeback | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 100.0 | false | false | - - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4398 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization reversal after charge on interest bearing loan - Interest calculation: Default Behavior - UC8.3 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_NO_CALC_ON_PAST_DUE_TILL_PRECLOSE | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 63.23 | 20.34 | 0.98 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.28 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.21 | 21.07 | 0.25 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.21 | 0.12 | 0.0 | 0.0 | 21.33 | 0.0 | 0.0 | 0.0 | 21.33 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.3 | 0.0 | 0.0 | 102.3 | 17.01 | 0.0 | 0.0 | 85.29 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "1 April 2024" - And Admin adds "LOAN_SNOOZE_FEE" due date charge with "01 April 2024" due date and 10 EUR transaction amount - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 01 April 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 63.23 | 20.34 | 0.98 | 10.0 | 0.0 | 31.32 | 0.0 | 0.0 | 0.0 | 31.32 | - | 4 | 30 | 01 May 2024 | | 42.28 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.21 | 21.07 | 0.25 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.21 | 0.12 | 0.0 | 0.0 | 21.33 | 0.0 | 0.0 | 0.0 | 21.33 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.3 | 10.0 | 0.0 | 112.3 | 17.01 | 0.0 | 0.0 | 95.29 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin undo Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 10.0 | 0.0 | 27.01 | 0.0 | 0.0 | 0.0 | 27.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 10.0 | 0.0 | 112.05 | 17.01 | 0.0 | 0.0 | 95.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | true | false | - Then Loan Charges tab has the following data: - | Name | isPenalty | Payment due at | Due as of | Calculation type | Due | Paid | Waived | Outstanding | - | Snooze fee | false | Specified due date | 01 April 2024 | Flat | 10.0 | 0.0 | 0.0 | 10.0 | - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4399 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization reversal after MIR on interest bearing loan - Interest handling: EQUAL_AMORTIZATION_INTEREST_SPLIT - UC8.4 - When Admin sets the business date to "01 January 2024" - And Admin creates a client with random data - And 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_360_30_INTEREST_REFUND_INTEREST_RECALC_ACCRUAL_ACTIVITY | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | -# --- Repayment on due date --- - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | -# --- Re-amortization transaction --- - When Admin sets the business date to "15 March 2024" - And Admin creates a Loan re-amortization transaction on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 62.86 | 20.71 | 0.61 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.03 | 20.83 | 0.49 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.08 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.08 | 0.24 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.29 | 0.0 | 0.0 | 102.29 | 17.01 | 0.0 | 0.0 | 85.28 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "1 April 2024" - When Admin makes "MERCHANT_ISSUED_REFUND" transaction with "AUTOPAY" payment type on "01 April 2024" with 34.02 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 62.86 | 20.71 | 0.61 | 0.0 | 0.0 | 21.32 | 21.32 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | | 41.95 | 20.91 | 0.41 | 0.0 | 0.0 | 21.32 | 13.29 | 13.29 | 0.0 | 8.03 | - | 5 | 31 | 01 June 2024 | | 20.99 | 20.96 | 0.36 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 20.99 | 0.24 | 0.0 | 0.0 | 21.23 | 0.0 | 0.0 | 0.0 | 21.23 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.2 | 0.0 | 0.0 | 102.2 | 51.62 | 13.29 | 0.0 | 50.58 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Merchant Issued Refund | 34.02 | 33.41 | 0.61 | 0.0 | 0.0 | 50.16 | false | false | - | 01 April 2024 | Interest Refund | 0.59 | 0.59 | 0.0 | 0.0 | 0.0 | 49.57 | false | false | - - When Admin undo Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 April 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 17.01| 0.0 | - | 3 | 31 | 01 April 2024 | 01 April 2024 | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | | 33.81 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.6 | 0.6 | 0.0 | 16.41 | - | 5 | 31 | 01 June 2024 | | 17.0 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 17.0 | 0.1 | 0.0 | 0.0 | 17.1 | 0.0 | 0.0 | 0.0 | 17.1 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.15 | 0.0 | 0.0 | 102.15 | 51.63 | 0.6 | 17.01 | 50.52 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | true | false | - | 01 April 2024 | Merchant Issued Refund | 34.02 | 33.04 | 0.98 | 0.0 | 0.0 | 50.53 | false | true | - | 01 April 2024 | Interest Refund | 0.6 | 0.6 | 0.0 | 0.0 | 0.0 | 49.93 | false | true | - - When Loan Pay-off is made on "1 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4400 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization reversal after 2nd disb on interest bearing loan - Interest calculation: Default Behavior - UC8.5 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_DAILY_EMI_360_30_INTEREST_RECALC_DAILY_MULTIDISBURSE_CHARGEBACK | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - - When Admin sets the business date to "15 March 2024" - And Admin creates a Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 63.23 | 20.34 | 0.98 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 4 | 30 | 01 May 2024 | | 42.28 | 20.95 | 0.37 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 5 | 31 | 01 June 2024 | | 21.21 | 21.07 | 0.25 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | 6 | 30 | 01 July 2024 | | 0.0 | 21.21 | 0.12 | 0.0 | 0.0 | 21.33 | 0.0 | 0.0 | 0.0 | 21.33 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.3 | 0.0 | 0.0 | 102.3 | 17.01 | 0.0 | 0.0 | 85.29 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 15 March 2024 | 83.57 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | | 63.23 | 20.34 | 0.98 | 0.0 | 0.0 | 21.32 | 0.0 | 0.0 | 0.0 | 21.32 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 4 | 30 | 01 May 2024 | | 75.61 | 37.62 | 0.37 | 0.0 | 0.0 | 37.99 | 0.0 | 0.0 | 0.0 | 37.99 | - | 5 | 31 | 01 June 2024 | | 37.87 | 37.74 | 0.25 | 0.0 | 0.0 | 37.99 | 0.0 | 0.0 | 0.0 | 37.99 | - | 6 | 30 | 01 July 2024 | | 0.0 | 37.87 | 0.12 | 0.0 | 0.0 | 37.99 | 0.0 | 0.0 | 0.0 | 37.99 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.3 | 0.0 | 0.0 | 152.3 | 17.01 | 0.0 | 0.0 | 135.29 | - And Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Admin undo Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.53 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 4 | 30 | 01 May 2024 | | 67.25 | 33.28 | 0.59 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 5 | 31 | 01 June 2024 | | 33.77 | 33.48 | 0.39 | 0.0 | 0.0 | 33.87 | 0.0 | 0.0 | 0.0 | 33.87 | - | 6 | 30 | 01 July 2024 | | 0.0 | 33.77 | 0.2 | 0.0 | 0.0 | 33.97 | 0.0 | 0.0 | 0.0 | 33.97 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.74 | 0.0 | 0.0 | 152.74 | 17.01 | 0.0 | 0.0 | 135.73 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 15 March 2024 | Re-amortize | 17.01 | 16.52 | 0.49 | 0.0 | 0.0 | 0.0 | true | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 133.57 | false | false | - - When Loan Pay-off is made on "01 April 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4401 @AdvancedPaymentAllocation - Scenario: Verify Re-amortization reversal after 2nd disb with downpayment on interest bearing loan - Interest handling: EQUAL_AMORTIZATION_INTEREST_SPLIT - UC8.6 - When Admin sets the business date to "01 January 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_ADV_PYMNT_INTEREST_RECALCULATION_DAILY_EMI_360_30_MULTIDISBURSE_AUTO_DOWNPAYMENT | 01 January 2024 | 150 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "150" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 4 | 31 | 01 April 2024 | | 37.82 | 12.47 | 0.29 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 5 | 30 | 01 May 2024 | | 25.28 | 12.54 | 0.22 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 6 | 31 | 01 June 2024 | | 12.67 | 12.61 | 0.15 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 7 | 30 | 01 July 2024 | | 0.0 | 12.67 | 0.07 | 0.0 | 0.0 | 12.74 | 0.0 | 0.0 | 0.0 | 12.74 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 25.0 | 0.0 | 0.0 | 76.54 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 12.76 EUR transaction amount - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 4 | 31 | 01 April 2024 | | 37.82 | 12.47 | 0.29 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 5 | 30 | 01 May 2024 | | 25.28 | 12.54 | 0.22 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 6 | 31 | 01 June 2024 | | 12.67 | 12.61 | 0.15 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | 7 | 30 | 01 July 2024 | | 0.0 | 12.67 | 0.07 | 0.0 | 0.0 | 12.74 | 0.0 | 0.0 | 0.0 | 12.74 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.54 | 0.0 | 0.0 | 101.54 | 37.76 | 0.0 | 0.0 | 63.78 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | - - When Admin sets the business date to "15 March 2024" - And Admin creates a Loan re-amortization transaction on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" - Then Loan Repayment schedule has 7 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 15 March 2024 | 62.68 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | | 47.15 | 15.53 | 0.46 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | - | 5 | 30 | 01 May 2024 | | 31.53 | 15.62 | 0.37 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | - | 6 | 31 | 01 June 2024 | | 15.81 | 15.72 | 0.27 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | - | 7 | 30 | 01 July 2024 | | 0.0 | 15.81 | 0.18 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.72 | 0.0 | 0.0 | 101.72 | 37.76 | 0.0 | 0.0 | 63.96 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | - | 15 March 2024 | Re-amortize | 12.76 | 12.39 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "01 April 2024" - When Admin successfully disburse the loan on "01 April 2024" with "50" EUR transaction amount - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | 15 March 2024 | 62.68 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 31 | 01 April 2024 | | 47.15 | 15.53 | 0.46 | 0.0 | 0.0 | 15.99 | 12.5 | 0.0 | 0.0 | 3.49 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 0 | 01 April 2024 | | 84.65 | 12.5 | 0.0 | 0.0 | 0.0 | 12.5 | 0.0 | 0.0 | 0.0 | 12.5 | - | 6 | 30 | 01 May 2024 | | 69.03 | 15.62 | 0.37 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | - | 7 | 31 | 01 June 2024 | | 53.31 | 15.72 | 0.27 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | - | 8 | 30 | 01 July 2024 | | 37.5 | 15.81 | 0.18 | 0.0 | 0.0 | 15.99 | 0.0 | 0.0 | 0.0 | 15.99 | - And Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 112.5 | 1.72 | 0.0 | 0.0 | 114.22 | 50.26 | 0.0 | 0.0 | 63.96 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | - | 15 March 2024 | Re-amortize | 12.76 | 12.39 | 0.37 | 0.0 | 0.0 | 0.0 | false | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 112.68 | false | false | - | 01 April 2024 | Down Payment | 12.5 | 12.5 | 0.0 | 0.0 | 0.0 | 100.18 | false | false | - - When Admin undo Loan re-amortization transaction on current business date - Then Loan Repayment schedule has 8 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 0 | 01 January 2024 | 01 January 2024 | 75.0 | 25.0 | 0.0 | 0.0 | 0.0 | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | - | 2 | 31 | 01 February 2024 | 01 February 2024 | 62.68 | 12.32 | 0.44 | 0.0 | 0.0 | 12.76 | 12.76 | 0.0 | 0.0 | 0.0 | - | 3 | 29 | 01 March 2024 | | 50.29 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 12.5 | 0.0 | 12.5 | 0.26 | - | 4 | 31 | 01 April 2024 | | 37.9 | 12.39 | 0.37 | 0.0 | 0.0 | 12.76 | 0.0 | 0.0 | 0.0 | 12.76 | - | | | 01 April 2024 | | 50.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 5 | 0 | 01 April 2024 | | 75.4 | 12.5 | 0.0 | 0.0 | 0.0 | 12.5 | 0.0 | 0.0 | 0.0 | 12.5 | - | 6 | 30 | 01 May 2024 | | 50.44 | 24.96 | 0.44 | 0.0 | 0.0 | 25.4 | 0.0 | 0.0 | 0.0 | 25.4 | - | 7 | 31 | 01 June 2024 | | 25.33 | 25.11 | 0.29 | 0.0 | 0.0 | 25.4 | 0.0 | 0.0 | 0.0 | 25.4 | - | 8 | 30 | 01 July 2024 | | 0.0 | 25.33 | 0.15 | 0.0 | 0.0 | 25.48 | 0.0 | 0.0 | 0.0 | 25.48 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 150.0 | 2.06 | 0.0 | 0.0 | 152.06 | 50.26 | 0.0 | 12.5 | 101.8 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 January 2024 | Down Payment | 25.0 | 25.0 | 0.0 | 0.0 | 0.0 | 75.0 | false | false | - | 01 February 2024 | Repayment | 12.76 | 12.32 | 0.44 | 0.0 | 0.0 | 62.68 | false | false | - | 15 March 2024 | Re-amortize | 12.76 | 12.39 | 0.37 | 0.0 | 0.0 | 0.0 | true | false | - | 01 April 2024 | Disbursement | 50.0 | 0.0 | 0.0 | 0.0 | 0.0 | 112.68 | false | false | - | 01 April 2024 | Down Payment | 12.5 | 12.39 | 0.11 | 0.0 | 0.0 | 100.29 | false | true | - - #When Loan Pay-off is made on "01 April 2024" - And Customer makes "AUTOPAY" repayment on "01 April 2024" with 100.92 EUR transaction amount - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - - @TestRailId:C4402 @AdvancedPaymentAllocation - Scenario: Verify that Re-amortization is forbidden on charged-off loan, interest bearing loan, Interest calculation: Default Behavior, Charge-off scenario (zero interest) - UC1 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does charge-off the loan on "01 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date is forbidden as loan was charged-off - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4403 @AdvancedPaymentAllocation - Scenario: Verify that Re-amortization is forbidden on charged-off loan, interest bearing loan, Interest calculation: Default Behavior, Charge-off scenario (regular) - UC2 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does charge-off the loan on "01 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Charge-off | 85.04 | 83.57 | 1.47 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date is forbidden as loan was charged-off - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4404 @AdvancedPaymentAllocation - Scenario: Verify that Re-amortization is forbidden on charged-off loan, interest bearing loan, Interest calculation: Default Behavior, Charge-off scenario (accelerate maturity) - UC3 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does charge-off the loan on "01 March 2024" - 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin creates a Loan re-amortization transaction on current business date is forbidden as loan was charged-off - - When Loan Pay-off is made on "01 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4405 @AdvancedPaymentAllocation - Scenario: Verify that Re-amortization is forbidden on charged-off loan (zero interest), interest bearing loan, Interest handling: equal amortization + interest split - UC4 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does charge-off the loan on "01 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.04 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.03 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.02 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | 0.0 | 0.0 | 0.0 | 16.02 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "15 March 2024" - And Admin creates re-amortization trn on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" is forbidden as loan was charged-off - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4406 @AdvancedPaymentAllocation - Scenario: Verify that Re-amortization is forbidden on charged-off loan (regular), interest bearing loan, Interest handling: equal amortization + interest split - UC5 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does charge-off the loan on "01 March 2024" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Charge-off | 85.04 | 83.57 | 1.47 | 0.0 | 0.0 | 0.0 | false | false | - When Admin sets the business date to "15 March 2024" - And Admin creates re-amortization trn on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" is forbidden as loan was charged-off - - When Loan Pay-off is made on "15 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4407 @AdvancedPaymentAllocation - Scenario: Verify that Re-amortization is forbidden on charged-off loan (accelerate maturity), interest bearing loan, Interest handling: equal amortization + interest split - UC6 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_INTEREST_RECALCULATION_ACCELERATE_MATURITY_CHARGE_OFF_BEHAVIOUR | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does charge-off the loan on "01 March 2024" - 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Charge-off | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - And Admin creates re-amortization trn on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" is forbidden as loan was charged-off - - When Loan Pay-off is made on "01 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4408 @AdvancedPaymentAllocation - Scenario: Verify that Re-amortization is forbidden on contract terminated loan, interest bearing loan, Interest handling: default behaviour - UC7 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin successfully terminates loan contract - 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Contract Termination | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - When Admin creates a Loan re-amortization transaction on current business date is forbidden as loan was contract terminated - - When Loan Pay-off is made on "01 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4409 @AdvancedPaymentAllocation - Scenario: Verify that Re-amortization is forbidden on contract terminated loan, interest bearing loan, Interest handling: equal amortization + interest split - UC8 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin successfully terminates loan contract - 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 0.0 | 83.57 | 0.49 | 0.0 | 0.0 | 84.06 | 0.0 | 0.0 | 0.0 | 84.06 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 1.07 | 0.0 | 0.0 | 101.07 | 17.01 | 0.0 | 0.0 | 84.06 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Accrual | 1.07 | 0.0 | 1.07 | 0.0 | 0.0 | 0.0 | false | false | - | 01 March 2024 | Contract Termination | 84.06 | 83.57 | 0.49 | 0.0 | 0.0 | 0.0 | false | false | - And Admin creates re-amortization trn on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" is forbidden as loan was contract terminated - - When Loan Pay-off is made on "01 March 2024" - Then Loan is closed with zero outstanding balance and it's all installments have obligations met - - @TestRailId:C4410 @AdvancedPaymentAllocation - Scenario: Verify that Re-amortization is forbidden on con closed as written-off loan, interest bearing loan, Interest handling: default behaviour - UC9 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does write-off the loan on "01 March 2024" - Then Loan status will be "CLOSED_WRITTEN_OFF" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 March 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 March 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 March 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | 01 March 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 0.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 0.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Close (as written-off) | 85.04 | 83.57 | 1.47 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "15 March 2024" - When Admin creates a Loan re-amortization transaction on current business date is forbidden as loan was closed - - @TestRailId:C4411 @AdvancedPaymentAllocation - Scenario: Verify that Re-amortization is forbidden on closed as written-off loan, interest bearing loan, Interest handling: equal amortization + interest split - UC10 - When Admin sets the business date to "01 January 2024" - When Admin creates a client with random data - When Admin set "LP2_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL" loan product "DEFAULT" transaction type to "NEXT_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_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - When Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 0.0 | 0.0 | 0.0 | 102.05 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - When Admin sets the business date to "01 February 2024" - And Customer makes "AUTOPAY" repayment on "01 February 2024" with 17.01 EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024| 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 85.04 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | - When Admin sets the business date to "01 March 2024" - And Admin does write-off the loan on "01 March 2024" - Then Loan status will be "CLOSED_WRITTEN_OFF" - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | 01 February 2024 | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 17.01 | 0.0 | 0.0 | 0.0 | - | 2 | 29 | 01 March 2024 | 01 March 2024 | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 3 | 31 | 01 April 2024 | 01 March 2024 | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 4 | 30 | 01 May 2024 | 01 March 2024 | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 5 | 31 | 01 June 2024 | 01 March 2024 | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 0.0 | - | 6 | 30 | 01 July 2024 | 01 March 2024 | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 0.0 | - Then Loan Repayment schedule has the following data in Total row: - | Principal due | Interest | Fees | Penalties | Due | Paid | In advance | Late | Outstanding | - | 100.0 | 2.05 | 0.0 | 0.0 | 102.05 | 17.01 | 0.0 | 0.0 | 0.0 | - Then Loan Transactions tab has the following data: - | Transaction date | Transaction Type | Amount | Principal | Interest | Fees | Penalties | Loan Balance | Reverted | Replayed | - | 01 January 2024 | Disbursement | 100.0 | 0.0 | 0.0 | 0.0 | 0.0 | 100.0 | false | false | - | 01 February 2024 | Repayment | 17.01 | 16.43 | 0.58 | 0.0 | 0.0 | 83.57 | false | false | - | 01 March 2024 | Close (as written-off) | 85.04 | 83.57 | 1.47 | 0.0 | 0.0 | 0.0 | false | false | - - When Admin sets the business date to "15 March 2024" - And Admin creates re-amortization trn on current business date with reAmortizationInterestHandling "EQUAL_AMORTIZATION_INTEREST_SPLIT" is forbidden as loan was closed + Then Loan is closed with zero outstanding balance and it's all installments have obligations met \ No newline at end of file diff --git a/fineract-e2e-tests-runner/src/test/resources/features/LoanReschedule.feature b/fineract-e2e-tests-runner/src/test/resources/features/LoanReschedule.feature index 2428579648f..eb8a5e45fa6 100644 --- a/fineract-e2e-tests-runner/src/test/resources/features/LoanReschedule.feature +++ b/fineract-e2e-tests-runner/src/test/resources/features/LoanReschedule.feature @@ -1172,7 +1172,6 @@ Feature: LoanReschedule And Customer makes "AUTOPAY" repayment on "29 June 2025" with 60 EUR transaction amount Then In Loan Transactions the "1"th Transaction of "Accrual Activity" on "31 October 2025" has "1" relationship with type="REPLAYED" - @TestRailId:C4391 Scenario: Verify progressive loan due date reschedule maintains EMI When Admin sets the business date to "05 September 2025" And Admin creates a client with random data @@ -1265,7 +1264,6 @@ Feature: LoanReschedule | 23 | 31 | 31 January 2027 | | 96.08 | 56.03 | 3.23 | 0.0 | 0.0 | 59.26 | 0.0 | 0.0 | 0.0 | 59.26 | | 24 | 28 | 28 February 2027 | | 0.0 | 96.08 | 1.84 | 0.0 | 0.0 | 97.92 | 0.0 | 0.0 | 0.0 | 97.92 | - @TestRailId:C4392 Scenario: Verify basic loan rescheduling When Admin sets the business date to "1 January 2024" When Admin creates a client with random data @@ -1321,7 +1319,6 @@ Feature: LoanReschedule | 5 | 31 | 15 June 2024 | | 17.3 | 16.86 | 0.27 | 0.0 | 0.0 | 17.13 | 0.0 | 0.0 | 0.0 | 17.13 | | 6 | 30 | 15 July 2024 | | 0.0 | 17.3 | 0.14 | 0.0 | 0.0 | 17.44 | 0.0 | 0.0 | 0.0 | 17.44 | - @TestRailId:C4393 Scenario: Verify loan rescheduling with N+1 period When Admin sets the business date to "1 January 2024" When Admin creates a client with random data @@ -1380,7 +1377,6 @@ Feature: LoanReschedule | 5 | 31 | 30 June 2024 | | 17.63 | 16.86 | 0.27 | 0.0 | 0.0 | 17.13 | 0.0 | 0.0 | 0.0 | 17.13 | | 6 | 30 | 30 July 2024 | | 0.0 | 17.63 | 0.14 | 10.0 | 0.0 | 27.77 | 0.0 | 0.0 | 0.0 | 27.77 | - @TestRailId:C4394 Scenario: Verify loan rescheduling with automatic down payment When Admin sets the business date to "1 January 2024" When Admin creates a client with random data @@ -1436,27 +1432,4 @@ Feature: LoanReschedule | 3 | 43 | 15 March 2024 | | 45.56 | 14.67 | 0.69 | 0.0 | 0.0 | 15.36 | 0.0 | 0.0 | 0.0 | 15.36 | | 4 | 31 | 15 April 2024 | | 30.56 | 15.0 | 0.36 | 0.0 | 0.0 | 15.36 | 0.0 | 0.0 | 0.0 | 15.36 | | 5 | 30 | 15 May 2024 | | 15.44 | 15.12 | 0.24 | 0.0 | 0.0 | 15.36 | 0.0 | 0.0 | 0.0 | 15.36 | - | 6 | 31 | 15 June 2024 | | 0.0 | 15.44 | 0.12 | 0.0 | 0.0 | 15.56 | 0.0 | 0.0 | 0.0 | 15.56 | - - @TestRailId:C4395 - Scenario: Verify Progressive Loan reschedule with non-existing installment due date results in validation error - When Admin sets the business date to "01 January 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_ADV_CUSTOM_PMT_ALLOC_PROGRESSIVE_LOAN_SCHEDULE_HORIZONTAL | 01 January 2024 | 100 | 7 | DECLINING_BALANCE | DAILY | EQUAL_INSTALLMENTS | 6 | MONTHS | 1 | MONTHS | 6 | 0 | 0 | 0 | ADVANCED_PAYMENT_ALLOCATION | - And Admin successfully approves the loan on "01 January 2024" with "100" amount and expected disbursement date on "01 January 2024" - And Admin successfully disburse the loan on "01 January 2024" with "100" EUR transaction amount - Then Loan Repayment schedule has 6 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 | - | | | 01 January 2024 | | 100.0 | | | 0.0 | | 0.0 | 0.0 | | | | - | 1 | 31 | 01 February 2024 | | 83.57 | 16.43 | 0.58 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 2 | 29 | 01 March 2024 | | 67.05 | 16.52 | 0.49 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 3 | 31 | 01 April 2024 | | 50.43 | 16.62 | 0.39 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 4 | 30 | 01 May 2024 | | 33.71 | 16.72 | 0.29 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 5 | 31 | 01 June 2024 | | 16.9 | 16.81 | 0.2 | 0.0 | 0.0 | 17.01 | 0.0 | 0.0 | 0.0 | 17.01 | - | 6 | 30 | 01 July 2024 | | 0.0 | 16.9 | 0.1 | 0.0 | 0.0 | 17.0 | 0.0 | 0.0 | 0.0 | 17.0 | - When Admin sets the business date to "02 April 2024" - Then Loan reschedule with the following data results a 400 error and "LOAN_RESCHEDULE_FROM_DATE_INSTALLMENT_NOT_FOUND" error message - | rescheduleFromDate | submittedOnDate | adjustedDueDate | graceOnPrincipal | graceOnInterest | extraTerms | newInterestRate | - | 01 August 2024 | 02 April 2024 | | | | 2 | | \ No newline at end of file + | 6 | 31 | 15 June 2024 | | 0.0 | 15.44 | 0.12 | 0.0 | 0.0 | 15.56 | 0.0 | 0.0 | 0.0 | 15.56 | \ No newline at end of file diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java index f1a02f95ea8..3dbebba00db 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java @@ -29,6 +29,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; @@ -92,8 +93,9 @@ public class ExternalAssetOwnersApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ExternalAssetOwnerRequest.class))) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ExternalAssetOwnersApiResourceSwagger.PostInitiateTransferResponse.class))) - @ApiResponse(responseCode = "403", description = "Transfer cannot be initiated") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ExternalAssetOwnersApiResourceSwagger.PostInitiateTransferResponse.class))), + @ApiResponse(responseCode = "403", description = "Transfer cannot be initiated") }) public CommandProcessingResult transferRequestWithLoanId(@PathParam("loanId") final Long loanId, @Parameter ExternalAssetOwnerRequest assetOwnerReq, @QueryParam(COMMAND_PARAM) @Parameter(description = COMMAND_PARAM) final String commandParam) { @@ -109,8 +111,9 @@ public CommandProcessingResult transferRequestWithLoanId(@PathParam("loanId") fi @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ExternalAssetOwnerRequest.class))) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ExternalAssetOwnersApiResourceSwagger.PostInitiateTransferResponse.class))) - @ApiResponse(responseCode = "403", description = "Transfer cannot be initiated") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ExternalAssetOwnersApiResourceSwagger.PostInitiateTransferResponse.class))), + @ApiResponse(responseCode = "403", description = "Transfer cannot be initiated") }) public CommandProcessingResult transferRequestWithLoanExternalId(@PathParam("loanExternalId") final String externalLoanId, @Parameter ExternalAssetOwnerRequest assetOwnerReq, @QueryParam(COMMAND_PARAM) @Parameter(description = COMMAND_PARAM) final String commandParam) { @@ -127,8 +130,9 @@ public CommandProcessingResult transferRequestWithLoanExternalId(@PathParam("loa @Path("/transfers/{id}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ExternalAssetOwnersApiResourceSwagger.PostInitiateTransferResponse.class))) - @ApiResponse(responseCode = "403", description = "Transfer cannot be initiated") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ExternalAssetOwnersApiResourceSwagger.PostInitiateTransferResponse.class))), + @ApiResponse(responseCode = "403", description = "Transfer cannot be initiated") }) public CommandProcessingResult transferRequestWithId(@PathParam("id") final Long id, @QueryParam(COMMAND_PARAM) @Parameter(description = COMMAND_PARAM) final String commandParam) { platformUserRightsContext.isAuthenticated(); @@ -141,8 +145,9 @@ public CommandProcessingResult transferRequestWithId(@PathParam("id") final Long @Path("/transfers/external-id/{externalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ExternalAssetOwnersApiResourceSwagger.PostInitiateTransferResponse.class))) - @ApiResponse(responseCode = "403", description = "Transfer cannot be initiated") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ExternalAssetOwnersApiResourceSwagger.PostInitiateTransferResponse.class))), + @ApiResponse(responseCode = "403", description = "Transfer cannot be initiated") }) public CommandProcessingResult transferRequestWithId(@PathParam("externalId") final String externalId, @QueryParam(COMMAND_PARAM) @Parameter(description = COMMAND_PARAM) final String commandParam) { platformUserRightsContext.isAuthenticated(); diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceImpl.java index bb8477b239b..56755787adf 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceImpl.java @@ -223,7 +223,7 @@ private ExternalAssetOwnerTransfer fetchAndValidateEffectiveTransferForBuyback( List effectiveTransfers = externalAssetOwnerTransferRepository .findEffectiveTransfersOrderByIdDesc(loanDataForExternalTransfer.getId(), DateUtils.getBusinessLocalDate()); - if (effectiveTransfers.isEmpty()) { + if (effectiveTransfers.size() == 0) { throw new ExternalAssetOwnerInitiateTransferException( "This loan cannot be bought back, it is not owned by an external asset owner"); } else if (effectiveTransfers.size() == 2) { diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanTransferabilityServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanTransferabilityServiceImpl.java index 681c33cb3d7..0f73c404560 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanTransferabilityServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanTransferabilityServiceImpl.java @@ -55,9 +55,12 @@ private boolean shouldValidateTransferable(final Loan loan, final ExternalAssetO return true; } - // When delayed settlement is enabled and asset is sold to intermediate. Need to validate. - return ExternalTransferStatus.PENDING_INTERMEDIATE == externalAssetOwnerTransfer.getStatus(); + if (ExternalTransferStatus.PENDING_INTERMEDIATE == externalAssetOwnerTransfer.getStatus()) { + // When delayed settlement is enabled and asset is sold to intermediate. Need to validate. + return true; + } // When delayed settlement is enabled and asset is sold from intermediate to investor. No need to validate. + return false; } } diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/serialization/serializer/investor/InvestorBusinessEventSerializer.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/serialization/serializer/investor/InvestorBusinessEventSerializer.java index 2d3378f9579..db6836e1bbf 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/serialization/serializer/investor/InvestorBusinessEventSerializer.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/serialization/serializer/investor/InvestorBusinessEventSerializer.java @@ -63,8 +63,9 @@ public class InvestorBusinessEventSerializer extends AbstractBusinessEventWithCu private static CurrencyDataV1 getCurrencyFromEvent(InvestorBusinessEvent event) { MonetaryCurrency loanCurrency = event.getLoan().getCurrency(); - return CurrencyDataV1.newBuilder().setCode(loanCurrency.getCode()).setDecimalPlaces(loanCurrency.getDigitsAfterDecimal()) - .setInMultiplesOf(loanCurrency.getInMultiplesOf()).build(); + CurrencyDataV1 currency = CurrencyDataV1.newBuilder().setCode(loanCurrency.getCode()) + .setDecimalPlaces(loanCurrency.getDigitsAfterDecimal()).setInMultiplesOf(loanCurrency.getInMultiplesOf()).build(); + return currency; } @Override diff --git a/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteServiceImplTest.java b/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteServiceImplTest.java index 32020227548..4a9a800523b 100644 --- a/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteServiceImplTest.java +++ b/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteServiceImplTest.java @@ -21,6 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -28,9 +29,9 @@ import com.google.gson.JsonElement; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Optional; -import java.util.concurrent.ThreadLocalRandom; import java.util.stream.Stream; import lombok.Setter; +import org.apache.commons.lang3.RandomStringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; @@ -106,7 +107,7 @@ public void testUpdateExternalAssetOwnerLoanProductAttributeHappyPath() { // then verify(testContext.loanProductRepository).existsById(testContext.loanProductId); - verify(testContext.externalAssetOwnerLoanProductAttributesRepository).findById(command.entityId()); + verify(testContext.externalAssetOwnerLoanProductAttributesRepository).findById(eq(command.entityId())); verify(testContext.externalAssetOwnerLoanProductAttributesRepository).saveAndFlush(loanProductAttributeArgumentCaptor.capture()); } @@ -133,7 +134,7 @@ public void testUpdateExternalAssetOwnerLoanProductAttributeUpdateNotRequired() // then verify(testContext.loanProductRepository).existsById(testContext.loanProductId); - verify(testContext.externalAssetOwnerLoanProductAttributesRepository).findById(command.entityId()); + verify(testContext.externalAssetOwnerLoanProductAttributesRepository).findById(eq(command.entityId())); verify(testContext.externalAssetOwnerLoanProductAttributesRepository, times(0)) .saveAndFlush(loanProductAttributeArgumentCaptor.capture()); } @@ -156,7 +157,7 @@ public void testUpdateExternalAssetOwnerLoanProductAttributeOnAttributeThatDoesN // then verify(testContext.loanProductRepository).existsById(testContext.loanProductId); - verify(testContext.externalAssetOwnerLoanProductAttributesRepository).findById(1L); + verify(testContext.externalAssetOwnerLoanProductAttributesRepository).findById(eq(1L)); verify(testContext.externalAssetOwnerLoanProductAttributesRepository, times(0)) .saveAndFlush(loanProductAttributeArgumentCaptor.capture()); Assertions.assertEquals(thrownException.getMessage(), "Loan product attribute with id " + 1L + " was not found"); @@ -187,7 +188,7 @@ public void testUpdateExternalAssetOwnerLoanProductAttributeOnAttributeWithDiffe // then verify(testContext.loanProductRepository).existsById(testContext.loanProductId); - verify(testContext.externalAssetOwnerLoanProductAttributesRepository).findById(command.entityId()); + verify(testContext.externalAssetOwnerLoanProductAttributesRepository).findById(eq(command.entityId())); verify(testContext.externalAssetOwnerLoanProductAttributesRepository, times(0)) .saveAndFlush(loanProductAttributeArgumentCaptor.capture()); Assertions.assertEquals(thrownException.getMessage(), @@ -364,7 +365,7 @@ static class TestContext { private ExternalAssetOwnerLoanProductAttributesWriteServiceImpl externalAssetOwnerLoanProductAttributesWriteService; private final FromJsonHelper fromJsonHelper = new FromJsonHelper(); - private final Long loanProductId = ThreadLocalRandom.current().nextLong(10, 100); + private final Long loanProductId = Long.valueOf(RandomStringUtils.randomNumeric(2)); @Setter private String attributeKey = "SETTLEMENT_MODEL"; @Setter diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java index 7507129d8ac..78181d3a11b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java @@ -128,7 +128,7 @@ public class LoanAccountData { private Integer recurringMoratoriumOnPrincipalPeriods; private Integer graceOnInterestPayment; private Integer graceOnInterestCharged; - private Integer graceOnArrearsAgeing; + private Integer graceOnArrearsAging; private LocalDate interestChargedFromDate; private LocalDate expectedFirstRepaymentOnDate; private Boolean syncDisbursementWithMeeting; @@ -431,7 +431,7 @@ public LoanAccountData withProductData(final LoanProductData product, final Inte .setGraceOnInterestCharged(product.getGraceOnInterestCharged()).setCharges(charges) .setMultiDisburseLoan(product.getMultiDisburseLoan()).setCanDefineInstallmentAmount(product.isCanDefineInstallmentAmount()) .setMaxOutstandingLoanBalance(product.getOutstandingLoanBalance()).setProduct(product) - .setGraceOnArrearsAgeing(product.getGraceOnArrearsAgeing()).setOverdueCharges(product.overdueFeeCharges()) + .setGraceOnArrearsAging(product.getGraceOnArrearsAging()).setOverdueCharges(product.overdueFeeCharges()) .setDaysInMonthType(product.getDaysInMonthType()).setDaysInYearType(product.getDaysInYearType()) .setInterestRecalculationEnabled(product.isInterestRecalculationEnabled()) .setInterestRecalculationData(product.toLoanInterestRecalculationData()) @@ -463,14 +463,14 @@ public static LoanAccountData basicLoanDetails(final Long id, final String accou final EnumOptionData amortizationType, final BigDecimal interestRatePerPeriod, final EnumOptionData interestRateFrequencyType, final BigDecimal annualInterestRate, final EnumOptionData interestType, final boolean isFloatingInterestRate, final BigDecimal interestRateDifferential, final EnumOptionData interestCalculationPeriodType, - Boolean allowPartialPeriodInterestCalculation, final LocalDate expectedFirstRepaymentOnDate, + Boolean allowPartialPeriodInterestCalcualtion, final LocalDate expectedFirstRepaymentOnDate, final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final LocalDate interestChargedFromDate, final LoanApplicationTimelineData timeline, final LoanSummaryData loanSummary, final BigDecimal feeChargesDueAtDisbursementCharged, final Boolean syncDisbursementWithMeeting, final Integer loanCounter, final Integer loanProductCounter, final Boolean multiDisburseLoan, Boolean canDefineInstallmentAmount, final BigDecimal fixedEmiAmont, final BigDecimal outstandingLoanBalance, final Boolean inArrears, - final Integer graceOnArrearsAgeing, final Boolean isNPA, final EnumOptionData daysInMonthType, + final Integer graceOnArrearsAging, final Boolean isNPA, final EnumOptionData daysInMonthType, final EnumOptionData daysInYearType, final boolean isInterestRecalculationEnabled, final LoanInterestRecalculationData interestRecalculationData, final Boolean createStandingInstructionAtDisbursement, final Boolean isVariableInstallmentsAllowed, Integer minimumGap, Integer maximumGap, final EnumOptionData subStatus, @@ -508,7 +508,7 @@ public static LoanAccountData basicLoanDetails(final Long id, final String accou .setInterestRateFrequencyType(interestRateFrequencyType).setAnnualInterestRate(annualInterestRate) .setInterestType(interestType).setFloatingInterestRate(isFloatingInterestRate) .setInterestRateDifferential(interestRateDifferential).setInterestCalculationPeriodType(interestCalculationPeriodType) - .setAllowPartialPeriodInterestCalculation(allowPartialPeriodInterestCalculation) + .setAllowPartialPeriodInterestCalculation(allowPartialPeriodInterestCalcualtion) .setExpectedFirstRepaymentOnDate(expectedFirstRepaymentOnDate).setGraceOnPrincipalPayment(graceOnPrincipalPayment) .setRecurringMoratoriumOnPrincipalPeriods(recurringMoratoriumOnPrincipalPeriods) .setGraceOnInterestPayment(graceOnInterestPayment).setGraceOnInterestCharged(graceOnInterestCharged) @@ -517,7 +517,7 @@ public static LoanAccountData basicLoanDetails(final Long id, final String accou .setSyncDisbursementWithMeeting(syncDisbursementWithMeeting).setLoanCounter(loanCounter) .setLoanProductCounter(loanProductCounter).setMultiDisburseLoan(multiDisburseLoan) .setCanDefineInstallmentAmount(canDefineInstallmentAmount).setFixedEmiAmount(fixedEmiAmont) - .setMaxOutstandingLoanBalance(outstandingLoanBalance).setInArrears(inArrears).setGraceOnArrearsAgeing(graceOnArrearsAgeing) + .setMaxOutstandingLoanBalance(outstandingLoanBalance).setInArrears(inArrears).setGraceOnArrearsAging(graceOnArrearsAging) .setIsNPA(isNPA).setDaysInMonthType(daysInMonthType).setDaysInYearType(daysInYearType) .setInterestRecalculationEnabled(isInterestRecalculationEnabled).setInterestRecalculationData(interestRecalculationData) .setCreateStandingInstructionAtDisbursement(createStandingInstructionAtDisbursement) diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransaction.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransaction.java index 168ab04ab32..1490462f786 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransaction.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransaction.java @@ -323,9 +323,6 @@ public static LoanTransaction copyTransactionProperties(final LoanTransaction lo if (LoanTransactionType.REAGE.equals(loanTransaction.getTypeOf())) { newTransaction.setLoanReAgeParameter(loanTransaction.getLoanReAgeParameter().getCopy(newTransaction)); } - if (LoanTransactionType.REAMORTIZE.equals(loanTransaction.getTypeOf())) { - newTransaction.setLoanReAmortizationParameter(loanTransaction.getLoanReAmortizationParameter().getCopy(newTransaction)); - } newTransaction.setClassification(loanTransaction.getClassification()); return newTransaction; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reamortization/LoanReAmortizationParameter.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reamortization/LoanReAmortizationParameter.java index e353b195eb1..bac04341aa7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reamortization/LoanReAmortizationParameter.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reamortization/LoanReAmortizationParameter.java @@ -52,8 +52,4 @@ public class LoanReAmortizationParameter extends AbstractAuditableWithUTCDateTim // for JPA, don't use protected LoanReAmortizationParameter() {} - - public LoanReAmortizationParameter getCopy(LoanTransaction loanTransaction) { - return new LoanReAmortizationParameter(loanTransaction, interestHandlingType, reamortizationReason); - } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java index fc85244e2fa..560aa83d223 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanApplicationTerms.java @@ -90,7 +90,7 @@ public final class LoanApplicationTerms { private PeriodFrequencyType interestRatePeriodFrequencyType; private BigDecimal annualNominalInterestRate; private InterestCalculationPeriodMethod interestCalculationPeriodMethod; - private boolean allowPartialPeriodInterestCalculation; + private boolean allowPartialPeriodInterestCalcualtion; private Money principal; private LocalDate expectedDisbursementDate; @@ -293,7 +293,7 @@ private LoanApplicationTerms(Builder builder) { this.buyDownFeeIncomeType = builder.buyDownFeeIncomeType; this.merchantBuyDownFee = builder.merchantBuyDownFee; this.interestMethod = builder.interestMethod; - this.allowPartialPeriodInterestCalculation = builder.allowPartialPeriodInterestCalculation; + this.allowPartialPeriodInterestCalcualtion = builder.allowPartialPeriodInterestCalculation; } public static class Builder { @@ -688,7 +688,7 @@ private LoanApplicationTerms(final CurrencyData currency, final Integer loanTerm final PeriodFrequencyType repaymentPeriodFrequencyType, final Integer nthDay, final DayOfWeekType weekDayType, final AmortizationMethod amortizationMethod, final InterestMethod interestMethod, final BigDecimal interestRatePerPeriod, final PeriodFrequencyType interestRatePeriodFrequencyType, final BigDecimal annualNominalInterestRate, - final InterestCalculationPeriodMethod interestCalculationPeriodMethod, final boolean allowPartialPeriodInterestCalculation, + final InterestCalculationPeriodMethod interestCalculationPeriodMethod, final boolean allowPartialPeriodInterestCalcualtion, final Money principal, final LocalDate expectedDisbursementDate, final LocalDate repaymentsStartingFromDate, final LocalDate calculatedRepaymentsStartingFromDate, final Integer principalGrace, final Integer recurringMoratoriumOnPrincipalPeriods, final Integer interestPaymentGrace, final Integer interestChargingGrace, @@ -733,7 +733,7 @@ private LoanApplicationTerms(final CurrencyData currency, final Integer loanTerm this.interestRatePeriodFrequencyType = interestRatePeriodFrequencyType; this.annualNominalInterestRate = annualNominalInterestRate; this.interestCalculationPeriodMethod = interestCalculationPeriodMethod; - this.allowPartialPeriodInterestCalculation = allowPartialPeriodInterestCalculation; + this.allowPartialPeriodInterestCalcualtion = allowPartialPeriodInterestCalcualtion; this.principal = principal; this.disbursedPrincipal = principal; @@ -1106,7 +1106,7 @@ private BigDecimal calculatePeriodsInLoanTerm() { case INVALID: break; case SAME_AS_REPAYMENT_PERIOD: - if (this.allowPartialPeriodInterestCalculation) { + if (this.allowPartialPeriodInterestCalcualtion) { LocalDate startDate = getExpectedDisbursementDate(); if (getInterestChargedFromDate() != null) { startDate = getInterestChargedFromLocalDate(); @@ -1407,7 +1407,7 @@ private BigDecimal periodicInterestRate(final PaymentPeriodsInOneYearCalculator private BigDecimal calculateLoanTermFrequency(final LocalDate periodStartDate, final LocalDate periodEndDate) { BigDecimal loanTermFrequencyBigDecimal = BigDecimal.valueOf(this.repaymentEvery); - if (this.interestCalculationPeriodMethod.isDaily() || this.allowPartialPeriodInterestCalculation) { + if (this.interestCalculationPeriodMethod.isDaily() || this.allowPartialPeriodInterestCalcualtion) { loanTermFrequencyBigDecimal = calculatePeriodsBetweenDates(periodStartDate, periodEndDate); } return loanTermFrequencyBigDecimal; @@ -1681,7 +1681,7 @@ public LoanProductRelatedDetail toLoanProductRelatedDetail() { return LoanProductRelatedDetail.createFrom(currency, this.principal.getAmount(), this.interestRatePerPeriod, this.interestRatePeriodFrequencyType, this.annualNominalInterestRate, this.interestMethod, - this.interestCalculationPeriodMethod, this.allowPartialPeriodInterestCalculation, this.repaymentEvery, + this.interestCalculationPeriodMethod, this.allowPartialPeriodInterestCalcualtion, this.repaymentEvery, this.repaymentPeriodFrequencyType, this.numberOfRepayments, this.principalGrace, this.recurringMoratoriumOnPrincipalPeriods, this.interestPaymentGrace, this.interestChargingGrace, this.amortizationMethod, this.inArrearsTolerance.getAmount(), this.graceOnArrearsAgeing, this.daysInMonthType.getValue(), this.daysInYearType.getValue(), @@ -1702,7 +1702,7 @@ public ILoanConfigurationDetails toLoanConfigurationDetails() { interestCalculationPeriodMethod, daysInYearType, daysInMonthType, amortizationMethod, repaymentPeriodFrequencyType, repaymentEvery, numberOfRepayments, isInterestChargedFromDateSameAsDisbursalDateEnabled != null && isInterestChargedFromDateSameAsDisbursalDateEnabled, - daysInYearCustomStrategy, allowPartialPeriodInterestCalculation, interestRecalculationEnabled, recalculationFrequencyType, + daysInYearCustomStrategy, allowPartialPeriodInterestCalcualtion, interestRecalculationEnabled, recalculationFrequencyType, preClosureInterestCalculationStrategy); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/LoanProductConstants.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/LoanProductConstants.java index 7dd6c205ddd..1592c2ef9cb 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/LoanProductConstants.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/LoanProductConstants.java @@ -74,7 +74,7 @@ public interface LoanProductConstants { String OUTSTANDING_LOAN_BALANCE_PARAMETER_NAME = "outstandingLoanBalance"; String ALLOW_FULL_TERM_FOR_TRANCHE_PARAM_NAME = "allowFullTermForTranche"; - String GRACE_ON_ARREARS_AGEING_PARAMETER_NAME = "graceOnArrearsAgeing"; + String GRACE_ON_ARREARS_AGEING_PARAMETER_NAME = "graceOnArrearsAging"; String OVERDUE_DAYS_FOR_NPA_PARAMETER_NAME = "overdueDaysForNPA"; String MINIMUM_DAYS_BETWEEN_DISBURSAL_AND_FIRST_REPAYMENT = "minimumDaysBetweenDisbursalAndFirstRepayment"; String ACCOUNT_MOVES_OUT_OF_NPA_ONLY_ON_ARREARS_COMPLETION_PARAM_NAME = "accountMovesOutOfNPAOnlyOnArrearsCompletion"; @@ -130,7 +130,7 @@ public interface LoanProductConstants { String minimumGapBetweenInstallments = "minimumGap"; String maximumGapBetweenInstallments = "maximumGap"; - String ALLOW_PARTIAL_PERIOD_INTEREST_CALCUALTION_PARAM_NAME = "allowPartialPeriodInterestCalculation"; + String ALLOW_PARTIAL_PERIOD_INTEREST_CALCUALTION_PARAM_NAME = "allowPartialPeriodInterestCalcualtion"; String CAN_USE_FOR_TOPUP = "canUseForTopup"; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java index 3aa288b8cf9..e558aedf7da 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java @@ -159,7 +159,7 @@ private PostLoanProductsRequest() {} @Schema(example = "FULL_LEAP_YEAR") public String daysInYearCustomStrategy; @Schema(example = "true") - public Boolean allowPartialPeriodInterestCalculation; + public Boolean allowPartialPeriodInterestCalcualtion; @Schema(example = "179") public Integer overdueDaysForNPA; @Schema(example = "3") @@ -1662,7 +1662,7 @@ private PutLoanProductsProductIdRequest() {} @Schema(example = "FULL_LEAP_YEAR") public String daysInYearCustomStrategy; @Schema(example = "true") - public Boolean allowPartialPeriodInterestCalculation; + public Boolean allowPartialPeriodInterestCalcualtion; @Schema(example = "179") public Integer overdueDaysForNPA; @Schema(example = "3") diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductData.java index 94f0f5beaf4..f9d7df5649b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductData.java @@ -137,7 +137,7 @@ public class LoanProductData implements Serializable { private final Integer recurringMoratoriumOnPrincipalPeriods; private final Integer graceOnInterestPayment; private final Integer graceOnInterestCharged; - private final Integer graceOnArrearsAgeing; + private final Integer graceOnArrearsAging; private final Integer overdueDaysForNPA; private final EnumOptionData daysInMonthType; private final EnumOptionData daysInYearType; @@ -305,7 +305,7 @@ public static LoanProductData lookup(final Long id, final String name, final Boo final EnumOptionData amortizationType = null; final EnumOptionData interestType = null; final EnumOptionData interestCalculationPeriodType = null; - final Boolean allowPartialPeriodInterestCalculation = null; + final Boolean allowPartialPeriodInterestCalcualtion = null; final Long fundId = null; final String fundName = null; final String transactionProcessingStrategyCode = null; @@ -314,7 +314,7 @@ public static LoanProductData lookup(final Long id, final String name, final Boo final Integer recurringMoratoriumOnPrincipalPeriods = null; final Integer graceOnInterestPayment = null; final Integer graceOnInterestCharged = null; - final Integer graceOnArrearsAgeing = null; + final Integer graceOnArrearsAging = null; final Integer overdueDaysForNPA = null; final Collection charges = null; final Collection principalVariations = new ArrayList<>(1); @@ -388,13 +388,13 @@ public static LoanProductData lookup(final Long id, final String name, final Boo return new LoanProductData(id, name, shortName, description, currency, principal, minPrincipal, maxPrincipal, tolerance, numberOfRepayments, minNumberOfRepayments, maxNumberOfRepayments, repaymentEvery, interestRatePerPeriod, minInterestRatePerPeriod, maxInterestRatePerPeriod, annualInterestRate, repaymentFrequencyType, interestRateFrequencyType, - amortizationType, interestType, interestCalculationPeriodType, allowPartialPeriodInterestCalculation, fundId, fundName, + amortizationType, interestType, interestCalculationPeriodType, allowPartialPeriodInterestCalcualtion, fundId, fundName, transactionProcessingStrategyCode, transactionProcessingStrategyName, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, charges, accountingType, includeInBorrowerCycle, useBorrowerCycle, startDate, closeDate, status, externalId, principalVariations, interestRateVariations, numberOfRepaymentVariations, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, disallowExpectedDisbursements, allowApprovedDisbursedAmountsOverApplied, overAppliedCalculationType, overAppliedNumber, - allowFullTermForTranche, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, + allowFullTermForTranche, graceOnArrearsAging, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstallment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, loanProductConfigurableAttributes, @@ -444,7 +444,7 @@ public static LoanProductData lookupWithCurrency(final Long id, final String nam final EnumOptionData amortizationType = null; final EnumOptionData interestType = null; final EnumOptionData interestCalculationPeriodType = null; - final Boolean allowPartialPeriodInterestCalculation = null; + final Boolean allowPartialPeriodInterestCalcualtion = null; final Long fundId = null; final String fundName = null; final String transactionProcessingStrategyCode = null; @@ -453,7 +453,7 @@ public static LoanProductData lookupWithCurrency(final Long id, final String nam final Integer recurringMoratoriumOnPrincipalPeriods = null; final Integer graceOnInterestPayment = null; final Integer graceOnInterestCharged = null; - final Integer graceOnArrearsAgeing = null; + final Integer graceOnArrearsAging = null; final Integer overdueDaysForNPA = null; final Collection charges = null; @@ -529,13 +529,13 @@ public static LoanProductData lookupWithCurrency(final Long id, final String nam return new LoanProductData(id, name, shortName, description, currency, principal, minPrincipal, maxPrincipal, tolerance, numberOfRepayments, minNumberOfRepayments, maxNumberOfRepayments, repaymentEvery, interestRatePerPeriod, minInterestRatePerPeriod, maxInterestRatePerPeriod, annualInterestRate, repaymentFrequencyType, interestRateFrequencyType, - amortizationType, interestType, interestCalculationPeriodType, allowPartialPeriodInterestCalculation, fundId, fundName, + amortizationType, interestType, interestCalculationPeriodType, allowPartialPeriodInterestCalcualtion, fundId, fundName, transactionProcessingStrategyCode, transactionProcessingStrategyName, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, charges, accountingType, includeInBorrowerCycle, useBorrowerCycle, startDate, closeDate, status, externalId, principalVariations, interestRateVariations, numberOfRepaymentVariations, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, disallowExpectedDisbursements, allowApprovedDisbursedAmountsOverApplied, overAppliedCalculationType, overAppliedNumber, - allowFullTermForTranche, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, + allowFullTermForTranche, graceOnArrearsAging, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstallment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, loanProductConfigurableAttributes, @@ -590,7 +590,7 @@ public static LoanProductData sensibleDefaultsForNewLoanProductCreation() { final EnumOptionData interestType = LoanEnumerations.interestType(InterestMethod.DECLINING_BALANCE); final EnumOptionData interestCalculationPeriodType = LoanEnumerations .interestCalculationPeriodType(InterestCalculationPeriodMethod.SAME_AS_REPAYMENT_PERIOD); - final Boolean allowPartialPeriodInterestCalculation = null; + final Boolean allowPartialPeriodInterestCalcualtion = null; final Long fundId = null; final String fundName = null; final String transactionProcessingStrategyCode = null; @@ -600,7 +600,7 @@ public static LoanProductData sensibleDefaultsForNewLoanProductCreation() { final Integer recurringMoratoriumOnPrincipalPeriods = null; final Integer graceOnInterestPayment = null; final Integer graceOnInterestCharged = null; - final Integer graceOnArrearsAgeing = null; + final Integer graceOnArrearsAging = null; final Integer overdueDaysForNPA = null; final Collection charges = null; @@ -677,13 +677,13 @@ public static LoanProductData sensibleDefaultsForNewLoanProductCreation() { return new LoanProductData(id, name, shortName, description, currency, principal, minPrincipal, maxPrincipal, tolerance, numberOfRepayments, minNumberOfRepayments, maxNumberOfRepayments, repaymentEvery, interestRatePerPeriod, minInterestRatePerPeriod, maxInterestRatePerPeriod, annualInterestRate, repaymentFrequencyType, interestRateFrequencyType, - amortizationType, interestType, interestCalculationPeriodType, allowPartialPeriodInterestCalculation, fundId, fundName, + amortizationType, interestType, interestCalculationPeriodType, allowPartialPeriodInterestCalcualtion, fundId, fundName, transactionProcessingStrategyCode, transactionProcessingStrategyName, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, charges, accountingType, includeInBorrowerCycle, useBorrowerCycle, startDate, closeDate, status, externalId, principalVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, disallowExpectedDisbursements, allowApprovedDisbursedAmountsOverApplied, overAppliedCalculationType, - overAppliedNumber, allowFullTermForTranche, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, + overAppliedNumber, allowFullTermForTranche, graceOnArrearsAging, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstallment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, loanProductConfigurableAttributes, @@ -732,7 +732,7 @@ public static LoanProductData loanProductWithFloatingRates(final Long id, final final EnumOptionData interestType = LoanEnumerations.interestType(InterestMethod.DECLINING_BALANCE); final EnumOptionData interestCalculationPeriodType = LoanEnumerations .interestCalculationPeriodType(InterestCalculationPeriodMethod.SAME_AS_REPAYMENT_PERIOD); - final Boolean allowPartialPeriodInterestCalculation = null; + final Boolean allowPartialPeriodInterestCalcualtion = null; final Long fundId = null; final String fundName = null; final String transactionProcessingStrategyCode = null; @@ -742,7 +742,7 @@ public static LoanProductData loanProductWithFloatingRates(final Long id, final final Integer recurringMoratoriumOnPrincipalPeriods = null; final Integer graceOnInterestPayment = null; final Integer graceOnInterestCharged = null; - final Integer graceOnArrearsAgeing = null; + final Integer graceOnArrearsAging = null; final Integer overdueDaysForNPA = null; final Collection charges = null; @@ -819,13 +819,13 @@ public static LoanProductData loanProductWithFloatingRates(final Long id, final return new LoanProductData(id, name, shortName, description, currency, principal, minPrincipal, maxPrincipal, tolerance, numberOfRepayments, minNumberOfRepayments, maxNumberOfRepayments, repaymentEvery, interestRatePerPeriod, minInterestRatePerPeriod, maxInterestRatePerPeriod, annualInterestRate, repaymentFrequencyType, interestRateFrequencyType, - amortizationType, interestType, interestCalculationPeriodType, allowPartialPeriodInterestCalculation, fundId, fundName, + amortizationType, interestType, interestCalculationPeriodType, allowPartialPeriodInterestCalcualtion, fundId, fundName, transactionProcessingStrategyCode, transactionProcessingStrategyName, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, charges, accountingType, includeInBorrowerCycle, useBorrowerCycle, startDate, closeDate, status, externalId, principalVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, multiDisburseLoan, maxTrancheCount, outstandingLoanBalance, disallowExpectedDisbursements, allowApprovedDisbursedAmountsOverApplied, overAppliedCalculationType, - overAppliedNumber, allowFullTermForTranche, graceOnArrearsAgeing, overdueDaysForNPA, daysInMonthType, daysInYearType, + overAppliedNumber, allowFullTermForTranche, graceOnArrearsAging, overdueDaysForNPA, daysInMonthType, daysInYearType, isInterestRecalculationEnabled, interestRecalculationData, minimumDaysBetweenDisbursalAndFirstRepayment, holdGuaranteeFunds, productGuaranteeData, principalThresholdForLastInstallment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, loanProductConfigurableAttributes, @@ -878,7 +878,7 @@ public LoanProductData(final Long id, final String name, final String shortName, Collection numberOfRepaymentVariations, Boolean multiDisburseLoan, Integer maxTrancheCount, BigDecimal outstandingLoanBalance, final Boolean disallowExpectedDisbursements, final Boolean allowApprovedDisbursedAmountsOverApplied, final String overAppliedCalculationType, - final Integer overAppliedNumber, final Boolean allowFullTermForTranche, final Integer graceOnArrearsAgeing, + final Integer overAppliedNumber, final Boolean allowFullTermForTranche, final Integer graceOnArrearsAging, final Integer overdueDaysForNPA, final EnumOptionData daysInMonthType, final EnumOptionData daysInYearType, final boolean isInterestRecalculationEnabled, final LoanProductInterestRecalculationData interestRecalculationData, final Integer minimumDaysBetweenDisbursalAndFirstRepayment, boolean holdGuaranteeFunds, @@ -1007,7 +1007,7 @@ public LoanProductData(final Long id, final String name, final String shortName, this.overAppliedNumber = overAppliedNumber; this.allowFullTermForTranche = allowFullTermForTranche; - this.graceOnArrearsAgeing = graceOnArrearsAgeing; + this.graceOnArrearsAging = graceOnArrearsAging; this.overdueDaysForNPA = overdueDaysForNPA; this.daysInMonthType = daysInMonthType; this.daysInYearType = daysInYearType; @@ -1210,7 +1210,7 @@ public LoanProductData(final LoanProductData productData, final Collection repr for (final ChangeOperation changeOperation : changeOperations) { if (changeOperation.isLoanTermVariationsData()) { final LoanTermVariationsData termVariationsData = changeOperation.getLoanTermVariationsData().get(); - processLoanTermVariation(termVariationsData, ctx); + processLoanTermVariation(installments, termVariationsData, scheduleModel); } else if (changeOperation.isTransaction()) { LoanTransaction transaction = changeOperation.getLoanTransaction().get(); if (loan.getStatus().isOverpaid() && transaction.isAccrualActivity()) { @@ -303,14 +303,12 @@ private static LoanTransaction getProcessedTransaction(final ChangedTransactionD .map(TransactionChangeData::getNewTransaction).findFirst().orElse(transaction); } - private void processLoanTermVariation(final LoanTermVariationsData termVariationsData, final ProgressiveTransactionCtx ctx) { - final List installments = ctx.getInstallments(); - final ProgressiveLoanInterestScheduleModel scheduleModel = ctx.getModel(); + private void processLoanTermVariation(final List installments, + final LoanTermVariationsData termVariationsData, final ProgressiveLoanInterestScheduleModel scheduleModel) { switch (termVariationsData.getTermVariationType()) { case INTEREST_PAUSE -> handleInterestPause(installments, termVariationsData, scheduleModel); case INTEREST_RATE_FROM_INSTALLMENT -> handleChangeInterestRate(installments, termVariationsData, scheduleModel); - case EXTEND_REPAYMENT_PERIOD -> - handleExtraRepaymentPeriod(installments, termVariationsData, scheduleModel, ctx.getAlreadyProcessedTransactions()); + case EXTEND_REPAYMENT_PERIOD -> handleExtraRepaymentPeriod(installments, termVariationsData, scheduleModel); case DUE_DATE -> handleDueDateChangeOnRepaymentPeriod(installments, termVariationsData, scheduleModel); default -> throw new IllegalStateException("Unhandled LoanTermVariationType."); } @@ -398,12 +396,10 @@ private void mergeAdditionalInstallmentsBeforeMaturityDate(final List installments, - final LoanTermVariationsData termVariationsData, final ProgressiveLoanInterestScheduleModel scheduleModel, - final List alreadyProcessedTransactions) { + final LoanTermVariationsData termVariationsData, final ProgressiveLoanInterestScheduleModel scheduleModel) { final LocalDate interestRateChangeSubmittedOnDate = termVariationsData.getTermVariationApplicableFrom(); final int repaymentPeriodsToAdd = termVariationsData.getDecimalValue().intValue(); - emiCalculator.addRepaymentPeriods(scheduleModel, interestRateChangeSubmittedOnDate, repaymentPeriodsToAdd, - alreadyProcessedTransactions); + emiCalculator.addRepaymentPeriods(scheduleModel, interestRateChangeSubmittedOnDate, repaymentPeriodsToAdd); final Loan loan = installments.getFirst().getLoan(); int nextInstallmentNumber = installments.stream().mapToInt(LoanRepaymentScheduleInstallment::getInstallmentNumber).max().orElse(0) @@ -423,7 +419,6 @@ private void handleExtraRepaymentPeriod(final List installments, @@ -643,11 +638,6 @@ private void handleReamortizationWithEqualAmortizationInterestSplitHandlingType( loanTransaction.updateComponentsAndTotal(totalOverDuePrincipal, totalOverDueInterest, Money.zero(currency), Money.zero(currency)); - if (totalOverDuePrincipal.isZero() && totalOverDueInterest.isZero() && loanTransaction.isNotReversed()) { - loanTransaction.reverse(); - return; - } - emiCalculator.updateModelRepaymentPeriodsDuringReAmortizationWithEqualInterestSplit(progressiveTransactionCtx.getModel(), transactionDate); updateInstallmentsByRepaymentPeriods(loanTransaction, progressiveTransactionCtx); @@ -725,11 +715,6 @@ private static void reamortizationOnNonInterestBearingLoan(LoanTransaction loanT Money.zero(transactionCtx.getCurrency()), Money.zero(transactionCtx.getCurrency()), Money.zero(transactionCtx.getCurrency())); - if (MathUtil.isEqualTo(overallOverDuePrincipal, ZERO) && loanTransaction.isNotReversed()) { - loanTransaction.reverse(); - return; - } - LoanRepaymentScheduleInstallment lastFutureInstallment = futureInstallments.stream() .max(Comparator.comparing(LoanRepaymentScheduleInstallment::getDueDate)).get(); BigDecimal reAmortizationAmountPerInstallment = overallOverDuePrincipal.divide(BigDecimal.valueOf(futureInstallments.size()), @@ -772,11 +757,6 @@ private void handleReAmortizationWithInterestRecalculationEnabled(final LoanTran loanTransaction.resetDerivedComponents(); loanTransaction.updateComponentsAndTotal(totalOverDuePrincipal, totalOverDueInterest, Money.zero(currency), Money.zero(currency)); - if (totalOverDuePrincipal.isZero() && totalOverDueInterest.isZero() && loanTransaction.isNotReversed()) { - loanTransaction.reverse(); - return; - } - // Update the existing model with re-amortized periods emiCalculator.updateModelRepaymentPeriodsDuringReAmortization(ctx.getModel(), transactionDate); updateInstallmentsByRepaymentPeriods(loanTransaction, ctx); @@ -3150,8 +3130,9 @@ private void updateInstallmentsByModelForReAging(final LoanTransaction loanTrans .orElse(null); final List liftedLoanCharges = new ArrayList<>(); - installments.stream().filter(installment -> !installment.getDueDate().isBefore(transactionDate)) - .forEach(i -> liftedLoanCharges.addAll(getLoanChargesOfInstallment(ctx.getCharges(), i, 1))); + installments.stream().filter(installment -> !installment.getDueDate().isBefore(transactionDate)).forEach(i -> { + liftedLoanCharges.addAll(getLoanChargesOfInstallment(ctx.getCharges(), i, 1)); + }); installments.removeIf(i -> i.getInstallmentNumber() != null && !i.isDownPayment() && !i.getDueDate().isBefore(transactionDate)); @@ -3182,7 +3163,6 @@ private void updateInstallmentsByModelForReAging(final LoanTransaction loanTrans installment.setReAged(true); } installment.setAdditional(false); - installment.setCreditedPrincipal(rp.getCreditedPrincipal().getAmount()); installment.updateObligationsMet(ctx.getCurrency(), transactionDate); } } else { @@ -3198,7 +3178,6 @@ private void updateInstallmentsByModelForReAging(final LoanTransaction loanTrans newInstallment.addToInterest(transactionDate, rp.getDueInterest()); } - newInstallment.setCreditedPrincipal(rp.getCreditedPrincipal().getAmount()); newInstallment.updateObligationsMet(ctx.getCurrency(), transactionDate); iterator.add(newInstallment); } @@ -3209,38 +3188,6 @@ private void updateInstallmentsByModelForReAging(final LoanTransaction loanTrans loanChargeRepaymentScheduleProcessing.reprocess(ctx.getCurrency(), loanTransaction.getLoan().getDisbursementDate(), installments, loanCharge); } - - reApplyInterestPauseOnReAgedInstallments(loanTransaction, ctx, reAgePeriodStartDate, installments); - } - - private void reApplyInterestPauseOnReAgedInstallments(final LoanTransaction loanTransaction, final ProgressiveTransactionCtx ctx, - final LocalDate reAgePeriodStartDate, final List installments) { - final List reAgedInstallments = installments.stream() - .filter(LoanRepaymentScheduleInstallment::isReAged).toList(); - if (!reAgedInstallments.isEmpty()) { - final LocalDate reAgeEndDate = reAgedInstallments.getLast().getDueDate(); - - final List loanTermVariationsToReprocess = loanTransaction.getLoan().getActiveLoanTermVariations() - .stream().filter(ltv -> { - if (!ltv.getTermType().isInterestPauseVariation()) { - return false; - } - - final LocalDate termFromFrom = ltv.getTermApplicableFrom(); - final LocalDate termEndFrom = ltv.getDateValue(); - - if (termEndFrom == null) { - return !termFromFrom.isBefore(reAgePeriodStartDate) && termFromFrom.isBefore(reAgeEndDate); - } - - return (!termFromFrom.isAfter(reAgePeriodStartDate) && !termEndFrom.isBefore(reAgePeriodStartDate)) - || (termFromFrom.isAfter(reAgePeriodStartDate) && termFromFrom.isBefore(reAgeEndDate)); - }).map(LoanTermVariations::toData).collect(Collectors.toCollection(ArrayList::new)); - - for (LoanTermVariationsData termVariationsData : loanTermVariationsToReprocess) { - processLoanTermVariation(termVariationsData, ctx); - } - } } /** @@ -3280,7 +3227,6 @@ private LoanRepaymentScheduleInstallment createInstallmentWithMovedPaidAmounts(f newInstallment.setTotalPaidInAdvance(paidInAdvanceBalances.getPaidInAdvance().getAmount()); newInstallment.setTotalPaidLate(paidInAdvanceBalances.getPaidLate()); paidInAdvanceBalances.loanTransactionToRepaymentScheduleMappings.forEach(m -> m.setInstallment(newInstallment)); - newInstallment.setCreditedPrincipal(rp.getCreditedPrincipal().getAmount()); newInstallment.updateObligationsMet(currency, transactionDate); return newInstallment; @@ -3292,7 +3238,7 @@ private void reprocessInstallments(final List installments.stream().sorted(LoanRepaymentScheduleInstallment::compareToByFromDueDate).forEachOrdered(i -> { i.updateInstallmentNumber(counter.getAndIncrement()); final LocalDate prev = previousDueDate.get(); - if (prev != null && !i.getFromDate().isEqual(prev) && !i.isDownPayment()) { + if (prev != null && (i.isAdditional() || i.isReAged())) { i.updateFromDate(prev); } previousDueDate.set(i.getDueDate()); @@ -3307,10 +3253,10 @@ private LocalDate calculateReAgedInstallmentDueDate(final LoanReAgeParameter reA private LocalDate calculateReAgedNextDate(final PeriodFrequencyType frequencyType, final LocalDate dueDate, final Integer frequencyNumber) { return switch (frequencyType) { - case DAYS -> dueDate.plusDays(frequencyNumber); - case WEEKS -> dueDate.plusWeeks(frequencyNumber); - case MONTHS -> dueDate.plusMonths(frequencyNumber); - case YEARS -> dueDate.plusYears(frequencyNumber); + case DAYS -> dueDate.plusDays((long) frequencyNumber); + case WEEKS -> dueDate.plusWeeks((long) frequencyNumber); + case MONTHS -> dueDate.plusMonths((long) frequencyNumber); + case YEARS -> dueDate.plusYears((long) frequencyNumber); default -> throw new UnsupportedOperationException(); }; } @@ -3798,8 +3744,10 @@ private void handleReAgeWithCommonStrategy(LoanTransaction loanTransaction, Comm private void createChargeMappingsForInstallment(final LoanRepaymentScheduleInstallment installment, List reAgedChargeEqualAmortizationValues, Integer index) { - reAgedChargeEqualAmortizationValues.forEach(amortizationValue -> installment.getInstallmentCharges().add(new LoanInstallmentCharge( - amortizationValue.equalAmortizationValues.calculateValueBigDecimal(index), amortizationValue.charge, installment))); + reAgedChargeEqualAmortizationValues.forEach(amortizationValue -> { + installment.getInstallmentCharges().add(new LoanInstallmentCharge( + amortizationValue.equalAmortizationValues.calculateValueBigDecimal(index), amortizationValue.charge, installment)); + }); } private FirstReAgeInstallmentProps calculateFirstReAgeInstallmentProps(List installments, diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/ProgressiveLoanRescheduleRequestDataValidator.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/ProgressiveLoanRescheduleRequestDataValidator.java index 20f14807e17..33c5d216c03 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/ProgressiveLoanRescheduleRequestDataValidator.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/ProgressiveLoanRescheduleRequestDataValidator.java @@ -94,7 +94,7 @@ public void validateForCreateAction(JsonCommand jsonCommand, Loan loan) { } if (hasExtraTermsChange) { - validateExtraTerms(dataValidatorBuilder, loan, rescheduleFromDate); + validateExtraTerms(dataValidatorBuilder, loan); } else if (hasAdjustDueDateChange) { validateAdjustDueDateChange(dataValidatorBuilder, loan, rescheduleFromDate); } else if (hasInterestRateChange) { @@ -124,10 +124,8 @@ private void validateInterestRate(DataValidatorBuilder dataValidatorBuilder, Loa validateForOverdueCharges(dataValidatorBuilder, loan, installment); } - private void validateExtraTerms(DataValidatorBuilder dataValidatorBuilder, Loan loan, LocalDate rescheduleFromDate) { + private void validateExtraTerms(DataValidatorBuilder dataValidatorBuilder, Loan loan) { validateLoanIsActive(loan, dataValidatorBuilder); - final LoanRepaymentScheduleInstallment installment = loan.getRelatedRepaymentScheduleInstallment(rescheduleFromDate); - validateReschedulingInstallment(dataValidatorBuilder, installment); } private Integer validateExtraTermsParam(FromJsonHelper fromJsonHelper, JsonElement jsonElement, diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculator.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculator.java index ab491301413..9fcc3e498a0 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculator.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculator.java @@ -27,7 +27,6 @@ import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment; -import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; import org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter; import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanApplicationTerms; import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanScheduleModelRepaymentPeriod; @@ -82,7 +81,7 @@ void changeInterestRate(ProgressiveLoanInterestScheduleModel scheduleModel, Loca BigDecimal newInterestRate); void addRepaymentPeriods(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate submittedOnDate, - int numberOfRepaymentPeriodsToAdd, List alreadyProcessedTransactions); + int numberOfRepaymentPeriodsToAdd); /** * This method applies outstanding balance correction on the interest model. Negative amount decreases the diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java index 55faa01d8a1..700ea0c561b 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculator.java @@ -46,7 +46,6 @@ import org.apache.fineract.portfolio.common.domain.DaysInYearType; import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment; -import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; import org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeInterestHandlingType; import org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter; import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanApplicationTerms; @@ -186,24 +185,18 @@ public void changeInterestRate(final ProgressiveLoanInterestScheduleModel schedu @Override public void addRepaymentPeriods(final ProgressiveLoanInterestScheduleModel scheduleModel, final LocalDate submittedOnDate, - final int numberOfRepaymentPeriodsToAdd, final List alreadyProcessedTransactions) { + final int numberOfRepaymentPeriodsToAdd) { addRepaymentPeriods(scheduleModel, - EmiChangeOperation.addRepaymentPeriods(submittedOnDate, scheduleModel.zero(), numberOfRepaymentPeriodsToAdd), - alreadyProcessedTransactions); + EmiChangeOperation.addRepaymentPeriods(submittedOnDate, scheduleModel.zero(), numberOfRepaymentPeriodsToAdd)); } - private void addRepaymentPeriods(final ProgressiveLoanInterestScheduleModel scheduleModel, final EmiChangeOperation operation, - final List alreadyProcessedTransactions) { - final Optional reAgeTransactionParameter = alreadyProcessedTransactions.stream() - .filter(t -> t.isReAge() && !t.isReversed()).findFirst().map(LoanTransaction::getLoanReAgeParameter); - final LocalDate seedDate = reAgeTransactionParameter.map(LoanReAgeParameter::getStartDate).orElse(scheduleModel.getStartDate()); - final int repaymentPeriodCount = reAgeTransactionParameter.map(param -> param.getNumberOfInstallments() - 1) - .orElse(scheduleModel.repaymentPeriods().size()); - + public void addRepaymentPeriods(final ProgressiveLoanInterestScheduleModel scheduleModel, final EmiChangeOperation operation) { + LocalDate disbursementDate = scheduleModel.getStartDate(); + int repaymentPeriodCount = scheduleModel.repaymentPeriods().size(); final LocalDate interestRateChangeEffectiveDate = operation.getSubmittedOnDate().minusDays(1); - final List periods2 = generateAdditionalRepaymentPeriodDueDates(scheduleModel, operation.getPeriodsToAdd(), - repaymentPeriodCount, scheduleModel.resolveRepaymentPeriodLengthGeneratorFunction(seedDate)); + List periods2 = generateAdditionalRepaymentPeriodDueDates(scheduleModel, operation.getPeriodsToAdd(), + repaymentPeriodCount, scheduleModel.resolveRepaymentPEriodLengthGeneratorFunction(disbursementDate)); updateModel(scheduleModel, periods2, LocalDateInterval::startDate, LocalDateInterval::endDate); scheduleModel @@ -577,19 +570,13 @@ private void calculateEMIValueAndRateFactorsForDecliningBalanceInterestMethod(fi public void updateModelRepaymentPeriodsDuringReAge(final ProgressiveLoanInterestScheduleModel scheduleModel, final LocalDate reAgePeriodStartDate, final LocalDate reAgeFirstDueDate, final LocalDate targetDate, final LoanApplicationTerms loanApplicationTerms, final MathContext mc) { - final Money futureCreditedPrincipals = scheduleModel.repaymentPeriods().stream() - .filter(rp -> !rp.getFromDate().isBefore(targetDate)).filter(rp -> rp.getDueDate().isAfter(targetDate)) - .map(RepaymentPeriod::getCreditedPrincipal).reduce(scheduleModel.zero(), Money::add); + moveOutstandingAmountsFromPeriodsBeforeTransactionDate(scheduleModel.repaymentPeriods(), targetDate); // calculate already paid balances from transaction date final OutstandingDetails paidBalancesFromTransactionDate = calculatePaidBalancesAfterDate(scheduleModel, targetDate); accelerateMaturityDateTo(scheduleModel, targetDate); - addCredit(scheduleModel, targetDate, futureCreditedPrincipals, scheduleModel.zero()); - - moveOutstandingAmountsFromPeriodsBeforeTransactionDate(scheduleModel.repaymentPeriods(), targetDate); - final ProgressiveLoanInterestScheduleModel temporaryReAgedScheduleModel = generateTemporaryReAgedScheduleModel(loanApplicationTerms, mc, reAgePeriodStartDate); diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/ProgressiveLoanInterestScheduleModel.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/ProgressiveLoanInterestScheduleModel.java index 0af304fc0e4..c5fd1f0c01d 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/ProgressiveLoanInterestScheduleModel.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/ProgressiveLoanInterestScheduleModel.java @@ -420,7 +420,7 @@ public boolean isCopy() { return this.modifiers.get(COPY); } - public Function resolveRepaymentPeriodLengthGeneratorFunction(final LocalDate instance) { + public Function resolveRepaymentPEriodLengthGeneratorFunction(LocalDate instance) { return switch (loanProductRelatedDetail.getRepaymentPeriodFrequencyType()) { case MONTHS -> instance::plusMonths; case WEEKS -> instance::plusWeeks; @@ -429,4 +429,7 @@ public Function resolveRepaymentPeriodLengthGeneratorFunction(f }; } + public boolean isInterestRecalculationIsAllowed() { + return modifiers.get(INTEREST_RECALCULATION_ENABLED); + } } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsValidator.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsValidator.java index aa8bf608875..127be203467 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsValidator.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsValidator.java @@ -78,8 +78,9 @@ public void checkGroupingOfAllocationRules(List validateAllocationType(paymentAllocationType, - pastDueRuleInteger, dueRuleInteger, inAdvanceRuleInteger)); + paymentAllocationRule.getAllocationTypes().forEach(paymentAllocationType -> { + validateAllocationType(paymentAllocationType, pastDueRuleInteger, dueRuleInteger, inAdvanceRuleInteger); + }); }); } @@ -121,14 +122,14 @@ private boolean isAdvancedPaymentStrategy(String code) { } private boolean hasAtLeastOneDefaultPaymentAllocation(List rules) { - return rules != null && !rules.stream() // + return rules != null && rules.stream() // .filter(r -> PaymentAllocationTransactionType.DEFAULT.equals(r.getTransactionType())) // .toList() // - .isEmpty(); + .size() > 0; } private boolean hasLoanProductPaymentAllocationRule(List rules) { - return rules != null && !rules.isEmpty(); + return rules != null && rules.size() > 0; } private void raiseValidationError(String globalisationMessageCode, String msg) { diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessorTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessorTest.java index bd89375a1d2..db4fa10abe8 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessorTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/AdvancedPaymentScheduleTransactionProcessorTest.java @@ -258,12 +258,12 @@ public void chargePaymentTransactionTestWithMoreTransactionAmount() { when(loan.getPaymentAllocationRules()).thenReturn(List.of(loanPaymentAllocationRule)); when(loanPaymentAllocationRule.getTransactionType()).thenReturn(PaymentAllocationTransactionType.DEFAULT); when(loanPaymentAllocationRule.getAllocationTypes()).thenReturn(List.of(PaymentAllocationType.DUE_PRINCIPAL)); - when(loanTransaction.isOn(transactionDate)).thenReturn(true); + when(loanTransaction.isOn(eq(transactionDate))).thenReturn(true); underTest.processLatestTransaction(loanTransaction, new TransactionCtx(currency, List.of(installment), Set.of(charge), new MoneyHolder(overpaidAmount), null)); - Mockito.verify(installment, times(1)).payFeeChargesComponent(transactionDate, chargeAmountMoney); + Mockito.verify(installment, times(1)).payFeeChargesComponent(eq(transactionDate), eq(chargeAmountMoney)); Mockito.verify(loanTransaction, times(1)).updateComponents(refEq(zero), refEq(zero), refEq(chargeAmountMoney), refEq(zero)); assertEquals(0, BigDecimal.valueOf(20).compareTo(loanTransaction.getAmount(currency).minus(chargeAmountMoney).getAmount())); assertEquals(0, chargeAmount.compareTo(installment.getFeeChargesCharged(currency).getAmount())); diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java index c67c5a8bd0f..819eb52b1f7 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/ProgressiveEMICalculatorTest.java @@ -4049,14 +4049,14 @@ public void testExtraTermsDecliningBalance() { checkPeriod(interestSchedule, 2, 340.03, 3.37, 336.66, 0.00, false); // // add extra repayment period 1 - emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 7, 2), 1, List.of()); + emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 7, 2), 1); checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 669.98, false); // checkPeriod(interestSchedule, 1, 227.81, 6.70, 221.11, 448.87, false); // checkPeriod(interestSchedule, 2, 227.81, 4.49, 223.32, 225.55, false); // checkPeriod(interestSchedule, 3, 227.81, 2.26, 225.55, 0.00, false); // - emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 8, 2), 2, List.of()); + emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 8, 2), 2); checkPeriod(interestSchedule, 0, 340.02, 10.00, 330.02, 669.98, false); // checkPeriod(interestSchedule, 1, 227.81, 6.70, 221.11, 448.87, false); // @@ -4088,14 +4088,14 @@ public void testExtraTermsFlat() { checkPeriod(interestSchedule, 2, 343.34, 10.00, 333.34, 0.00, false); // // add extra repayment period 1 - emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 7, 2), 1, List.of()); + emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 7, 2), 1); checkPeriod(interestSchedule, 0, 343.33, 10.00, 333.33, 666.67, false); // checkPeriod(interestSchedule, 1, 232.22, 10.00, 222.22, 444.45, false); // checkPeriod(interestSchedule, 2, 232.22, 10.00, 222.22, 222.23, false); // checkPeriod(interestSchedule, 3, 232.23, 10.00, 222.23, 0.00, false); // - emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 8, 2), 2, List.of()); + emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 8, 2), 2); checkPeriod(interestSchedule, 0, 343.33, 10.00, 333.33, 666.67, false); // checkPeriod(interestSchedule, 1, 232.22, 10.00, 222.22, 444.45, false); // @@ -4140,7 +4140,7 @@ public void testExtraTermsDecliningBalanceWithFullyRepaidPeriods() { checkPeriod(interestSchedule, 3, 256.29, 0.00, 256.29, 0.00, true); // // add extra repayment period 1 - emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 6, 15), 1, List.of()); + emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 6, 15), 1); // verify 1st and 4th installments are not modified, additional principal paid are substract from last // period @@ -4150,7 +4150,7 @@ public void testExtraTermsDecliningBalanceWithFullyRepaidPeriods() { checkPeriod(interestSchedule, 3, 256.29, 0.00, 256.29, 88.00, true); // checkPeriod(interestSchedule, 4, 89.76, 1.76, 88.00, 0.00, false); // - emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 6, 15), 2, List.of()); + emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 6, 15), 2); // verify 1st and 4th installments are not modified, additional principal paid are substract from last // periods @@ -4210,7 +4210,7 @@ public void testExtraTermsFlatWithFullyRepaidPeriods() { checkPeriod(interestSchedule, 3, 260.00, 10.00, 250.00, 0.00, true); // // add extra repayment period 1 - emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 6, 15), 1, List.of()); + emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 6, 15), 1); // verify 1st and 4th installments are not modified, additional principal paid are substract from last // period @@ -4221,7 +4221,7 @@ public void testExtraTermsFlatWithFullyRepaidPeriods() { checkPeriod(interestSchedule, 4, 110.00, 10.00, 100.00, 0.00, false); // // add extra repayment period 2 - emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 6, 15), 2, List.of()); + emiCalculator.addRepaymentPeriods(interestSchedule, LocalDate.of(2024, 6, 15), 2); // verify 1st and 4th installments are not modified, additional principal paid are substract from last // periods diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsJsonParserTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsJsonParserTest.java index 420188ef4b8..cc51c7f51f5 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsJsonParserTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsJsonParserTest.java @@ -220,15 +220,18 @@ public Map createPaymentAllocationEntry(String transactionType, private static List> createPaymentAllocationTypeList() { AtomicInteger i = new AtomicInteger(1); - return EnumSet.allOf(PaymentAllocationType.class).stream().map(p -> Pair.of(i.getAndIncrement(), p)).toList(); + List> list = EnumSet.allOf(PaymentAllocationType.class).stream() + .map(p -> Pair.of(i.getAndIncrement(), p)).toList(); + return list; } @NonNull private JsonCommand createJsonCommand(Map jsonMap) throws JsonProcessingException { ObjectMapper objectMapper = new ObjectMapper(); String json = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(jsonMap); - return JsonCommand.from(json, JsonParser.parseString(json), fromJsonHelper, null, 1L, 2L, 3L, 4L, null, null, null, null, null, - null, null, null, null); + JsonCommand command = JsonCommand.from(json, JsonParser.parseString(json), fromJsonHelper, null, 1L, 2L, 3L, 4L, null, null, null, + null, null, null, null, null, null); + return command; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocJsonInputParams.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocJsonInputParams.java index c0853cde7cc..e0f7cd05d60 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocJsonInputParams.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocJsonInputParams.java @@ -56,7 +56,7 @@ public static Set getAllValues() { @Override public String toString() { - return name().replace("_", " "); + return name().toString().replaceAll("_", " "); } public String getValue() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java index 431712f3680..4774daf5cc0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorServiceImpl.java @@ -280,14 +280,16 @@ private List fetchOffices(final Long officeId) { return offices; } + @SuppressWarnings("unchecked") private List fetchCharges() { - return this.chargeReadPlatformService.retrieveAllCharges(); + return (List) this.chargeReadPlatformService.retrieveAllCharges(); } + @SuppressWarnings("unchecked") private List fetchStaff(final Long staffId) { List staff = null; if (staffId == null) { - staff = this.staffReadPlatformService.retrieveAllStaff(null, Boolean.FALSE, null); + staff = (List) this.staffReadPlatformService.retrieveAllStaff(null, Boolean.FALSE, null); } else { staff = new ArrayList<>(); staff.add(this.staffReadPlatformService.retrieveStaff(staffId)); @@ -306,7 +308,8 @@ private List fetchCodeValuesByCodeName(String codeName) { } private List fetchSavingsProducts() { - return (List) savingsProductReadPlatformService.retrieveAll(); + List savingsProducts = (List) savingsProductReadPlatformService.retrieveAll(); + return savingsProducts; } private WorkbookPopulator populateCenterWorkbook(Long officeId, Long staffId) { @@ -393,19 +396,23 @@ private WorkbookPopulator populateLoanWorkbook(Long officeId, Long staffId) { } private List fetchCurrencies() { - return this.currencyReadPlatformService.retrieveAllPlatformCurrencies(); + List currencies = (List) this.currencyReadPlatformService.retrieveAllPlatformCurrencies(); + return currencies; } private List fetchPaymentTypes() { - return this.paymentTypeReadPlatformService.retrieveAllPaymentTypes(); + List paymentTypeData = (List) this.paymentTypeReadPlatformService.retrieveAllPaymentTypes(); + return paymentTypeData; } private List fetchFunds() { - return this.fundReadPlatformService.retrieveAllFunds(); + List funds = (List) this.fundReadPlatformService.retrieveAllFunds(); + return funds; } private List fetchLoanProducts() { - return (List) this.loanProductReadPlatformService.retrieveAllLoanProducts(); + List loanproducts = (List) this.loanProductReadPlatformService.retrieveAllLoanProducts(); + return loanproducts; } private List fetchGroups(Long officeId) { @@ -463,7 +470,8 @@ private WorkbookPopulator populateJournalEntriesWorkbook(Long officeId) { } private List fetchGLAccounts() { - return this.glAccountReadPlatformService.retrieveAllGLAccounts(null, null, null, null, null, null); + List glaccounts = this.glAccountReadPlatformService.retrieveAllGLAccounts(null, null, null, null, null, null); + return glaccounts; } private WorkbookPopulator populateGuarantorWorkbook(Long officeId) { @@ -496,12 +504,12 @@ private WorkbookPopulator populateOfficeWorkbook() { return new OfficeWorkbookPopulator(offices); } - // TODO: officeId seems to be unused and used in getTemplate() needs to be evaluated and removed private WorkbookPopulator populateChartOfAccountsWorkbook(Long officeId) { this.context.authenticatedUser().validateHasReadPermission(TemplatePopulateImportConstants.GL_ACCOUNT_ENTITY_TYPE); List glAccounts = fetchGLAccounts(); List offices = fetchOffices(null); - return new ChartOfAccountsWorkbook(glAccounts, offices, this.currencyReadPlatformService.retrieveAllowedCurrencies()); + return new ChartOfAccountsWorkbook(glAccounts, offices, + (List) this.currencyReadPlatformService.retrieveAllowedCurrencies()); } private WorkbookPopulator populateStaffWorkbook(Long officeId) { @@ -523,7 +531,8 @@ private WorkbookPopulator populateSharedAcountsWorkbook(Long officeId) { } private List fetchChargesForShares() { - return chargeReadPlatformService.retrieveSharesApplicableCharges(); + List chargesForShares = (List) chargeReadPlatformService.retrieveSharesApplicableCharges(); + return chargesForShares; } private List fetchSharedProducts() { @@ -646,7 +655,8 @@ private WorkbookPopulator populateUserWorkbook(Long officeId, Long staffId) { } private List fetchRoles() { - return (List) roleReadPlatformService.retrieveAllActiveRoles(); + List rolesList = (List) roleReadPlatformService.retrieveAllActiveRoles(); + return rolesList; } private WorkbookPopulator populateFixedDepositTransactionsWorkbook(Long officeId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociationType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociationType.java index dff2179e696..737d79dd4d9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociationType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociationType.java @@ -31,11 +31,18 @@ public enum AccountAssociationType { private final String code; public static AccountAssociationType fromInt(final Integer statusValue) { - return switch (statusValue) { - case 1 -> AccountAssociationType.LINKED_ACCOUNT_ASSOCIATION; - case 2 -> AccountAssociationType.GUARANTOR_ACCOUNT_ASSOCIATION; - default -> AccountAssociationType.INVALID; - }; + + AccountAssociationType enumeration = AccountAssociationType.INVALID; + switch (statusValue) { + case 1: + enumeration = AccountAssociationType.LINKED_ACCOUNT_ASSOCIATION; + break; + case 2: + enumeration = AccountAssociationType.GUARANTOR_ACCOUNT_ASSOCIATION; + break; + + } + return enumeration; } AccountAssociationType(final Integer value, final String code) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferRecurrenceType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferRecurrenceType.java index c718654ffea..f157ef0761a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferRecurrenceType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferRecurrenceType.java @@ -31,11 +31,17 @@ public enum AccountTransferRecurrenceType { private final String code; public static AccountTransferRecurrenceType fromInt(final Integer statusValue) { - return switch (statusValue) { - case 1 -> AccountTransferRecurrenceType.PERIODIC; - case 2 -> AccountTransferRecurrenceType.AS_PER_DUES; - default -> AccountTransferRecurrenceType.INVALID; - }; + + AccountTransferRecurrenceType enumeration = AccountTransferRecurrenceType.INVALID; + switch (statusValue) { + case 1: + enumeration = AccountTransferRecurrenceType.PERIODIC; + break; + case 2: + enumeration = AccountTransferRecurrenceType.AS_PER_DUES; + break; + } + return enumeration; } AccountTransferRecurrenceType(final Integer value, final String code) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferType.java index c45a2b5fd34..536fad14c2d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferType.java @@ -34,14 +34,26 @@ public enum AccountTransferType { private final String code; public static AccountTransferType fromInt(final Integer statusValue) { - return switch (statusValue) { - case 1 -> AccountTransferType.ACCOUNT_TRANSFER; - case 2 -> AccountTransferType.LOAN_REPAYMENT; - case 3 -> AccountTransferType.CHARGE_PAYMENT; - case 4 -> AccountTransferType.INTEREST_TRANSFER; - case 5 -> AccountTransferType.LOAN_DOWN_PAYMENT; - default -> AccountTransferType.INVALID; - }; + + AccountTransferType enumeration = AccountTransferType.INVALID; + switch (statusValue) { + case 1: + enumeration = AccountTransferType.ACCOUNT_TRANSFER; + break; + case 2: + enumeration = AccountTransferType.LOAN_REPAYMENT; + break; + case 3: + enumeration = AccountTransferType.CHARGE_PAYMENT; + break; + case 4: + enumeration = AccountTransferType.INTEREST_TRANSFER; + break; + case 5: + enumeration = AccountTransferType.LOAN_DOWN_PAYMENT; + break; + } + return enumeration; } AccountTransferType(final Integer value, final String code) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/command/CalendarCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/command/CalendarCommand.java index dea2009a484..005ed9b7d73 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/command/CalendarCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/command/CalendarCommand.java @@ -39,7 +39,7 @@ public class CalendarCommand { @SuppressWarnings("unused") private final Integer typeId; @SuppressWarnings("unused") - private final Boolean repeating; + private final boolean repeating; @SuppressWarnings("unused") private final Integer remindById; @SuppressWarnings("unused") @@ -48,7 +48,7 @@ public class CalendarCommand { private final Integer secondReminder; public CalendarCommand(final String title, final String description, final String location, final LocalDate startDate, - final LocalDate endDate, final LocalDate createdDate, final Integer duration, final Integer typeId, final Boolean repeating, + final LocalDate endDate, final LocalDate createdDate, final Integer duration, final Integer typeId, final boolean repeating, final Integer remindById, final Integer firstReminder, final Integer secondReminder) { this.title = title; this.description = description; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/serialization/CalendarCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/serialization/CalendarCommandFromApiJsonDeserializer.java index 8f6c2395b5c..0a39f1dd25e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/serialization/CalendarCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/serialization/CalendarCommandFromApiJsonDeserializer.java @@ -81,7 +81,7 @@ public CalendarCommand commandFromApiJson(final String json) { element); final Integer typeId = this.fromApiJsonHelper.extractIntegerSansLocaleNamed(CalendarSupportedParameters.TYPE_ID.getValue(), element); - final Boolean repeating = this.fromApiJsonHelper.extractBooleanNamed(CalendarSupportedParameters.REPEATING.getValue(), element); + final boolean repeating = this.fromApiJsonHelper.extractBooleanNamed(CalendarSupportedParameters.REPEATING.getValue(), element); final Integer remindById = this.fromApiJsonHelper.extractIntegerSansLocaleNamed(CalendarSupportedParameters.REMIND_BY_ID.getValue(), element); final Integer firstReminder = this.fromApiJsonHelper @@ -153,10 +153,11 @@ public void validateForCreate(final String json) { .inMinMaxRange(CalendarEntityType.getMinValue(), CalendarEntityType.getMaxValue()); if (this.fromApiJsonHelper.parameterExists(CalendarSupportedParameters.REPEATING.getValue(), element)) { - final Boolean repeating = this.fromApiJsonHelper.extractBooleanNamed(CalendarSupportedParameters.REPEATING.getValue(), element); + // FIXME - Throws NullPointerException when boolean value is null + final boolean repeating = this.fromApiJsonHelper.extractBooleanNamed(CalendarSupportedParameters.REPEATING.getValue(), element); baseDataValidator.reset().parameter(CalendarSupportedParameters.REPEATING.getValue()).value(repeating).notNull(); - if (Boolean.TRUE.equals(repeating)) { + if (repeating) { final Integer frequency = this.fromApiJsonHelper .extractIntegerSansLocaleNamed(CalendarSupportedParameters.FREQUENCY.getValue(), element); baseDataValidator.reset().parameter(CalendarSupportedParameters.FREQUENCY.getValue()).value(frequency).notBlank() @@ -294,10 +295,11 @@ public void validateForUpdate(final String json) { .inMinMaxRange(CalendarEntityType.getMinValue(), CalendarEntityType.getMaxValue()); } if (this.fromApiJsonHelper.parameterExists(CalendarSupportedParameters.REPEATING.getValue(), element)) { - final Boolean repeating = this.fromApiJsonHelper.extractBooleanNamed(CalendarSupportedParameters.REPEATING.getValue(), element); + // FIXME - Throws NullPointerException when boolean value is null + final boolean repeating = this.fromApiJsonHelper.extractBooleanNamed(CalendarSupportedParameters.REPEATING.getValue(), element); baseDataValidator.reset().parameter(CalendarSupportedParameters.REPEATING.getValue()).value(repeating).notNull(); - if (Boolean.TRUE.equals(repeating)) { + if (repeating) { final Integer frequency = this.fromApiJsonHelper .extractIntegerSansLocaleNamed(CalendarSupportedParameters.FREQUENCY.getValue(), element); baseDataValidator.reset().parameter(CalendarSupportedParameters.FREQUENCY.getValue()).value(frequency).notBlank() diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java index 01d0e2eddee..67c10d48477 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java @@ -211,8 +211,8 @@ + "graceOnInterestPayment\n" + "Optional: Integer - represents the number of repayment periods that grace should apply to the interest component of a repayment period. Interest is still calculated but offset to later repayment periods.\n" + "graceOnInterestCharged\n" + "Optional: Integer - represents the number of repayment periods that should be interest-free.\n" - + "graceOnArrearsAgeing\n" - + "Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue.\n" + + "graceOnArrearsAging\n" + + "Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAging days overdue.\n" + "interestChargedFromDate\n" + "Optional: Date - The date from with interest is to start being charged.\n" + "expectedDisbursementDate\n" + "The proposed disbursement date of the loan so a proposed repayment schedule can be provided.\n" + "submittedOnDate\n" + "The date the loan application was submitted by applicant.\n" + "linkAccountId\n" @@ -220,7 +220,7 @@ + "Example Values: 0=Equal principle payments, 1=Equal installments\n" + "interestType\n" + "Used like: interestRatePerPeriod% interestRateFrequencyType - interestType\n" + "e.g. 12.0000% Per year - Declining Balance \n" + "Example Values: 0=Declining Balance, 1=Flat\n" + "interestCalculationPeriodType\n" - + "Example Values: 0=Daily, 1=Same as repayment period\n" + "allowPartialPeriodInterestCalculation\n" + + "Example Values: 0=Daily, 1=Same as repayment period\n" + "allowPartialPeriodInterestCalcualtion\n" + "This value will be supported along with interestCalculationPeriodType as Same as repayment period to calculate interest for partial periods. Example: Interest charged from is 5th of April , Principal is 10000 and interest is 1% per month then the interest will be (10000 * 1%)* (25/30) , it calculates for the month first then calculates exact periods between start date and end date(can be a decimal)\n" + "inArrearsTolerance\n" + "The amount that can be 'waived' at end of all loan payments because it is too small to worry about.\n" + "This is also the tolerance amount assessed when determining if a loan is in arrears.\n" + "transactionProcessingStrategyCode\n" @@ -552,7 +552,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @Operation(summary = "Calculate loan repayment schedule | Submit a new Loan Application", description = "It calculates the loan repayment Schedule\n" + "Submits a new loan application\n" + "Mandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyCode, expectedDisbursementDate, submittedOnDate, loanType\n" - + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n" + + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAging, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n" + "Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate\n" + "Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate\n" + "Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables") diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java index 768a38a64be..bb303f52b66 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java @@ -243,10 +243,10 @@ private LoanApplicationTerms assembleLoanApplicationTermsFrom(final JsonElement final InterestCalculationPeriodMethod interestCalculationPeriodMethod = allowOverridingInterestCalcPeriod ? InterestCalculationPeriodMethod.fromInt(interestCalculationPeriodType) : loanProduct.getLoanProductRelatedDetail().getInterestCalculationPeriodMethod(); - Boolean allowPartialPeriodInterestCalculation = this.fromApiJsonHelper + Boolean allowPartialPeriodInterestCalcualtion = this.fromApiJsonHelper .extractBooleanNamed(LoanProductConstants.ALLOW_PARTIAL_PERIOD_INTEREST_CALCUALTION_PARAM_NAME, element); - if (allowPartialPeriodInterestCalculation == null) { - allowPartialPeriodInterestCalculation = loanProduct.getLoanProductRelatedDetail().isAllowPartialPeriodInterestCalculation(); + if (allowPartialPeriodInterestCalcualtion == null) { + allowPartialPeriodInterestCalcualtion = loanProduct.getLoanProductRelatedDetail().isAllowPartialPeriodInterestCalculation(); } final BigDecimal interestRatePerPeriod = this.fromApiJsonHelper.extractBigDecimalWithLocaleNamed("interestRatePerPeriod", element); @@ -536,7 +536,7 @@ private LoanApplicationTerms assembleLoanApplicationTermsFrom(final JsonElement return LoanApplicationTerms.assembleFrom(applicationCurrency.toData(), loanTermFrequency, loanTermPeriodFrequencyType, numberOfRepayments, repaymentEvery, repaymentPeriodFrequencyType, nthDay, weekDayType, amortizationMethod, interestMethod, interestRatePerPeriod, interestRatePeriodFrequencyType, annualNominalInterestRate, interestCalculationPeriodMethod, - allowPartialPeriodInterestCalculation, principalMoney, expectedDisbursementDate, repaymentsStartingFromDate, + allowPartialPeriodInterestCalcualtion, principalMoney, expectedDisbursementDate, repaymentsStartingFromDate, calculatedRepaymentsStartingFromDate, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, inArrearsToleranceMoney, loanProduct.isMultiDisburseLoan(), emiAmount, disbursementDatas, maxOutstandingBalance, graceOnArrearsAgeing, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductAssembler.java index 170dd1e4b7a..ddc728a9753 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductAssembler.java @@ -94,7 +94,7 @@ public LoanProduct assembleFromJson(final Fund fund, final String loanTransactio final InterestMethod interestMethod = InterestMethod.fromInt(command.integerValueOfParameterNamed("interestType")); final InterestCalculationPeriodMethod interestCalculationPeriodMethod = InterestCalculationPeriodMethod .fromInt(command.integerValueOfParameterNamed("interestCalculationPeriodType")); - final boolean allowPartialPeriodInterestCalculation = command + final boolean allowPartialPeriodInterestCalcualtion = command .booleanPrimitiveValueOfParameterNamed(LoanProductConstants.ALLOW_PARTIAL_PERIOD_INTEREST_CALCUALTION_PARAM_NAME); final AmortizationMethod amortizationMethod = AmortizationMethod.fromInt(command.integerValueOfParameterNamed("amortizationType")); final PeriodFrequencyType repaymentFrequencyType = PeriodFrequencyType @@ -337,7 +337,7 @@ public LoanProduct assembleFromJson(final Fund fund, final String loanTransactio return new LoanProduct(fund, loanTransactionProcessingStrategy, loanProductPaymentAllocationRules, loanProductCreditAllocationRules, name, shortName, description, currency, principal, minPrincipal, maxPrincipal, interestRatePerPeriod, minInterestRatePerPeriod, maxInterestRatePerPeriod, interestFrequencyType, annualInterestRate, interestMethod, - interestCalculationPeriodMethod, allowPartialPeriodInterestCalculation, repaymentEvery, repaymentFrequencyType, + interestCalculationPeriodMethod, allowPartialPeriodInterestCalcualtion, repaymentEvery, repaymentFrequencyType, numberOfRepayments, minNumberOfRepayments, maxNumberOfRepayments, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, amortizationMethod, inArrearsTolerance, productCharges, accountingRuleType, includeInBorrowerCycle, startDate, closeDate, externalId, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java index 7003b0b73e5..a332da941a6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java @@ -793,14 +793,14 @@ public String loanSchema() { + " l.closedon_date as closedOnDate, cbu.username as closedByUsername, cbu.firstname as closedByFirstname, cbu.lastname as closedByLastname, l.writtenoffon_date as writtenOffOnDate, " + " l.expected_firstrepaymenton_date as expectedFirstRepaymentOnDate, l.interest_calculated_from_date as interestChargedFromDate, l.maturedon_date as actualMaturityDate, l.expected_maturedon_date as expectedMaturityDate, " + " l.principal_amount_proposed as proposedPrincipal, l.principal_amount as principal, l.total_principal_derived as totalPrincipal, l.approved_principal as approvedPrincipal, l.net_disbursal_amount as netDisbursalAmount, l.arrearstolerance_amount as inArrearsTolerance, l.number_of_repayments as numberOfRepayments, l.repay_every as repaymentEvery," - + " l.grace_on_principal_periods as graceOnPrincipalPayment, l.recurring_moratorium_principal_periods as recurringMoratoriumOnPrincipalPeriods, l.grace_on_interest_periods as graceOnInterestPayment, l.grace_interest_free_periods as graceOnInterestCharged,l.grace_on_arrears_ageing as graceOnArrearsAgeing," + + " l.grace_on_principal_periods as graceOnPrincipalPayment, l.recurring_moratorium_principal_periods as recurringMoratoriumOnPrincipalPeriods, l.grace_on_interest_periods as graceOnInterestPayment, l.grace_interest_free_periods as graceOnInterestCharged,l.grace_on_arrears_ageing as graceOnArrearsAging," + " l.nominal_interest_rate_per_period as interestRatePerPeriod, l.annual_nominal_interest_rate as annualInterestRate, " + " l.repayment_period_frequency_enum as repaymentFrequencyType, l.interest_period_frequency_enum as interestRateFrequencyType, " + " l.fixed_length as fixedLength, " + " l.term_frequency as termFrequency, l.term_period_frequency_enum as termPeriodFrequencyType, " + " l.amortization_method_enum as amortizationType, l.interest_method_enum as interestType, l.is_equal_amortization as isEqualAmortization, l.interest_calculated_in_period_enum as interestCalculationPeriodType," + " l.fixed_principal_percentage_per_installment fixedPrincipalPercentagePerInstallment, " - + " l.allow_partial_period_interest_calcualtion as allowPartialPeriodInterestCalculation," + + " l.allow_partial_period_interest_calcualtion as allowPartialPeriodInterestCalcualtion," + " l.loan_status_id as lifeCycleStatusId, l.loan_transaction_strategy_code as transactionStrategyCode, " + " l.loan_transaction_strategy_name as transactionStrategyName, l.enable_installment_level_delinquency as enableInstallmentLevelDelinquency, " + " l.currency_code as currencyCode, l.currency_digits as currencyDigits, l.currency_multiplesof as inMultiplesOf, rc." @@ -1019,7 +1019,7 @@ public LoanAccountData mapRow(final ResultSet rs, @SuppressWarnings("unused") fi "recurringMoratoriumOnPrincipalPeriods"); final Integer graceOnInterestPayment = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnInterestPayment"); final Integer graceOnInterestCharged = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnInterestCharged"); - final Integer graceOnArrearsAgeing = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnArrearsAgeing"); + final Integer graceOnArrearsAgeing = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnArrearsAging"); final Integer termFrequency = JdbcSupport.getInteger(rs, "termFrequency"); final Integer termPeriodFrequencyTypeInt = JdbcSupport.getInteger(rs, "termPeriodFrequencyType"); @@ -1043,7 +1043,7 @@ public LoanAccountData mapRow(final ResultSet rs, @SuppressWarnings("unused") fi final EnumOptionData interestType = LoanEnumerations.interestType(interestTypeInt); final EnumOptionData interestCalculationPeriodType = LoanEnumerations .interestCalculationPeriodType(interestCalculationPeriodTypeInt); - final Boolean allowPartialPeriodInterestCalculation = rs.getBoolean("allowPartialPeriodInterestCalculation"); + final Boolean allowPartialPeriodInterestCalcualtion = rs.getBoolean("allowPartialPeriodInterestCalcualtion"); final Integer lifeCycleStatusId = JdbcSupport.getInteger(rs, "lifeCycleStatusId"); final LoanStatusEnumData status = LoanEnumerations.status(lifeCycleStatusId); @@ -1264,7 +1264,7 @@ public LoanAccountData mapRow(final ResultSet rs, @SuppressWarnings("unused") fi termFrequency, termPeriodFrequencyType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, null, null, transactionStrategyCode, transactionStrategyName, amortizationType, interestRatePerPeriod, interestRateFrequencyType, annualInterestRate, interestType, isFloatingInterestRate, interestRateDifferential, interestCalculationPeriodType, - allowPartialPeriodInterestCalculation, expectedFirstRepaymentOnDate, graceOnPrincipalPayment, + allowPartialPeriodInterestCalcualtion, expectedFirstRepaymentOnDate, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, interestChargedFromDate, timeline, loanSummary, feeChargesDueAtDisbursementCharged, syncDisbursementWithMeeting, loanCounter, loanProductCounter, multiDisburseLoan, canDefineInstallmentAmount, fixedEmiAmount, outstandingLoanBalance, inArrears, graceOnArrearsAgeing, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationService.java index 1311e0deb13..5a656a3af74 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationService.java @@ -115,12 +115,16 @@ public CommandProcessingResult reAmortize(final Long loanId, final JsonCommand c public CommandProcessingResult undoReAmortize(Long loanId, JsonCommand command) { Loan loan = loanAssembler.assembleFrom(loanId); - final LoanTransaction reAmortizeTransaction = reAmortizationValidator.findAndValidateReAmortizeTransactionForUndo(loan); + reAmortizationValidator.validateUndoReAmortize(loan, command); Map changes = new LinkedHashMap<>(); changes.put(LoanReAmortizationApiConstants.localeParameterName, command.locale()); changes.put(LoanReAmortizationApiConstants.dateFormatParameterName, command.dateFormat()); + LoanTransaction reAmortizeTransaction = findLatestNonReversedReAmortizeTransaction(loan); + if (reAmortizeTransaction == null) { + // TODO: when validations implemented; throw exception if there isn't a reamortize transaction available + } if (loan.isProgressiveSchedule()) { loanScheduleService.regenerateRepaymentSchedule(loan); } @@ -181,6 +185,14 @@ private void reverseReAmortizeTransaction(LoanTransaction reAmortizeTransaction, reprocessLoanTransactionsService.reprocessTransactions(loan); } + private LoanTransaction findLatestNonReversedReAmortizeTransaction(Loan loan) { + return loan.getLoanTransactions().stream() // + .filter(LoanTransaction::isNotReversed) // + .filter(LoanTransaction::isReAmortize) // + .max(Comparator.comparing(LoanTransaction::getTransactionDate)) // + .orElse(null); + } + private LoanTransaction createReAmortizeTransaction(Loan loan, JsonCommand command) { ExternalId txExternalId = externalIdFactory.createFromCommand(command, LoanReAmortizationApiConstants.externalIdParameterName); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationValidator.java index 940cd114d1c..511146d1481 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationValidator.java @@ -21,6 +21,7 @@ import static org.apache.fineract.infrastructure.core.service.DateUtils.getBusinessLocalDate; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; import java.util.Optional; import lombok.RequiredArgsConstructor; @@ -38,6 +39,7 @@ import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; import org.apache.fineract.portfolio.loanaccount.domain.reamortization.LoanReAmortizationInterestHandlingType; import org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.impl.AdvancedPaymentScheduleTransactionProcessor; +import org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.impl.ChangeOperation; import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanScheduleType; import org.springframework.stereotype.Component; @@ -105,10 +107,10 @@ private void validateReAmortizeBusinessRules(Loan loan) { loan.getId()); } - // validate re-amortization is only done on an active loan + // validate reamortization is only done on an active loan if (!loan.getStatus().isActive()) { throw new GeneralPlatformDomainRuleException("error.msg.loan.reamortize.supported.only.for.active.loans", - "Loan re-amortization can only be done on active loans", loan.getId()); + "Loan reamortization can only be done on active loans", loan.getId()); } // validate if there's already a re-amortization transaction for today @@ -119,32 +121,28 @@ private void validateReAmortizeBusinessRules(Loan loan) { "Loan reamortization can only be done once a day. There has already been a reamortization done for today", loan.getId()); } + } - // validate loan is not charged-off - if (loan.isChargedOff()) { - throw new GeneralPlatformDomainRuleException("error.msg.loan.reamortize.not.allowed.on.charged.off", - "Loan re-amortization is not allowed on charged-off loan.", loan.getId()); - } - - // validate loan is not contract terminated - if (loan.isContractTermination()) { - throw new GeneralPlatformDomainRuleException("error.msg.loan.reamortize.not.allowed.on.contract.terminated", - "Loan re-amortization is not allowed on contract terminated loan.", loan.getId()); - } + public void validateUndoReAmortize(Loan loan, JsonCommand command) { + validateUndoReAmortizeBusinessRules(loan); } - public LoanTransaction findAndValidateReAmortizeTransactionForUndo(Loan loan) { - // validate if there's a non-reversed reamortization transaction already - final Optional optionalReAmortizationTx = loan.getLoanTransactions().stream() // - .filter(LoanTransaction::isNotReversed) // - .filter(tx -> tx.getTypeOf().isReAmortize()) // - .findAny(); + private void validateUndoReAmortizeBusinessRules(Loan loan) { + // validate if there's a reamortization transaction already + Optional optionalReAmortizationTx = loan.getLoanTransactions().stream().filter(tx -> tx.getTypeOf().isReAmortize()) + .min(Comparator.comparing(LoanTransaction::getTransactionDate)); if (optionalReAmortizationTx.isEmpty()) { throw new GeneralPlatformDomainRuleException("error.msg.loan.reamortize.reamortization.transaction.missing", - "Undoing a reamortization can only be done if there was a non-reversed reamortization already", loan.getId()); + "Undoing a reamortization can only be done if there was a reamortization already", loan.getId()); } - return optionalReAmortizationTx.get(); + // validate if there's no payment between the reamortization and today + boolean repaymentExistsAfterReAmortization = loan.getLoanTransactions().stream().anyMatch(tx -> tx.getTypeOf().isRepaymentType() + && !tx.isReversed() && transactionHappenedAfterOther(tx, optionalReAmortizationTx.get())); + if (repaymentExistsAfterReAmortization) { + throw new GeneralPlatformDomainRuleException("error.msg.loan.reamortize.repayment.exists.after.reamortization", + "Undoing a reamortization can only be done if there hasn't been any repayment afterwards", loan.getId()); + } } private void throwExceptionIfValidationErrorsExist(List dataValidationErrors) { @@ -154,4 +152,7 @@ private void throwExceptionIfValidationErrorsExist(List dataV } } + private boolean transactionHappenedAfterOther(LoanTransaction transaction, LoanTransaction otherTransaction) { + return new ChangeOperation(transaction).compareTo(new ChangeOperation(otherTransaction)) > 0; + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java index 15d8cfb4cbd..f32991c0a7f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java @@ -178,7 +178,7 @@ public class LoanProductsApiResource { @Operation(summary = "Create a Loan Product", description = "Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in.\n" + "\n" + "Refer MifosX Accounting Specs Draft for more details regarding the significance of the selected accounting rule\n\n" + "Mandatory Fields: name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyCode, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType\n\n" - + "Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, chargeOffReasonToExpenseAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalculation,dueDaysForRepaymentEvent,overDueDaysForRepaymentEvent,enableDownPayment,disbursedAmountPercentageDownPayment,enableAutoRepaymentForDownPayment,repaymentStartDateType,enableBuyDownFee\n\n" + + "Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAging, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, chargeOffReasonToExpenseAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion,dueDaysForRepaymentEvent,overDueDaysForRepaymentEvent,enableDownPayment,disbursedAmountPercentageDownPayment,enableAutoRepaymentForDownPayment,repaymentStartDateType,enableBuyDownFee\n\n" + "Additional Mandatory Fields for Cash(2) based accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId\n\n" + "Additional Mandatory Fields for periodic (3) and upfront (4)accrual accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId\n\n" + "Additional Mandatory Fields if interest recalculation is enabled(true): interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType\n\n" diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformServiceImpl.java index 895221d578a..cededbed9d5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformServiceImpl.java @@ -247,10 +247,10 @@ public String loanProductSchema() { + "lp.name as name, lp.short_name as shortName, lp.description as description, " + "lp.principal_amount as principal, lp.min_principal_amount as minPrincipal, lp.max_principal_amount as maxPrincipal, lp.currency_code as currencyCode, lp.currency_digits as currencyDigits, lp.currency_multiplesof as inMultiplesOf, " + "lp.nominal_interest_rate_per_period as interestRatePerPeriod, lp.min_nominal_interest_rate_per_period as minInterestRatePerPeriod, lp.max_nominal_interest_rate_per_period as maxInterestRatePerPeriod, lp.interest_period_frequency_enum as interestRatePerPeriodFreq, " - + "lp.annual_nominal_interest_rate as annualInterestRate, lp.interest_method_enum as interestMethod, lp.interest_calculated_in_period_enum as interestCalculationInPeriodMethod,lp.allow_partial_period_interest_calcualtion as allowPartialPeriodInterestCalculation, " + + "lp.annual_nominal_interest_rate as annualInterestRate, lp.interest_method_enum as interestMethod, lp.interest_calculated_in_period_enum as interestCalculationInPeriodMethod,lp.allow_partial_period_interest_calcualtion as allowPartialPeriodInterestCalcualtion, " + "lp.repay_every as repaidEvery, lp.repayment_period_frequency_enum as repaymentPeriodFrequency, lp.number_of_repayments as numberOfRepayments, lp.min_number_of_repayments as minNumberOfRepayments, lp.max_number_of_repayments as maxNumberOfRepayments, " + "lp.fixed_length as fixedLength, " + "lp.enable_accrual_activity_posting as enableAccrualActivityPosting, " - + "lp.grace_on_principal_periods as graceOnPrincipalPayment, lp.recurring_moratorium_principal_periods as recurringMoratoriumOnPrincipalPeriods, lp.grace_on_interest_periods as graceOnInterestPayment, lp.grace_interest_free_periods as graceOnInterestCharged,lp.grace_on_arrears_ageing as graceOnArrearsAgeing,lp.overdue_days_for_npa as overdueDaysForNPA, " + + "lp.grace_on_principal_periods as graceOnPrincipalPayment, lp.recurring_moratorium_principal_periods as recurringMoratoriumOnPrincipalPeriods, lp.grace_on_interest_periods as graceOnInterestPayment, lp.grace_interest_free_periods as graceOnInterestCharged,lp.grace_on_arrears_ageing as graceOnArrearsAging,lp.overdue_days_for_npa as overdueDaysForNPA, " + "lp.min_days_between_disbursal_and_first_repayment As minimumDaysBetweenDisbursalAndFirstRepayment, " + "lp.amortization_method_enum as amortizationMethod, lp.arrearstolerance_amount as tolerance, " + "lp.accounting_type as accountingType, lp.include_in_borrower_cycle as includeInBorrowerCycle,lp.use_borrower_cycle as useBorrowerCycle, lp.start_date as startDate, lp.close_date as closeDate, " @@ -352,7 +352,7 @@ public LoanProductData mapRow(@NonNull final ResultSet rs, @SuppressWarnings("un "recurringMoratoriumOnPrincipalPeriods"); final Integer graceOnInterestPayment = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnInterestPayment"); final Integer graceOnInterestCharged = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnInterestCharged"); - final Integer graceOnArrearsAgeing = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnArrearsAgeing"); + final Integer graceOnArrearsAgeing = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "graceOnArrearsAging"); final Integer overdueDaysForNPA = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "overdueDaysForNPA"); final Integer minimumDaysBetweenDisbursalAndFirstRepayment = JdbcSupport.getInteger(rs, "minimumDaysBetweenDisbursalAndFirstRepayment"); @@ -392,7 +392,7 @@ public LoanProductData mapRow(@NonNull final ResultSet rs, @SuppressWarnings("un final EnumOptionData interestType = LoanEnumerations.interestType(interestTypeId); final int interestCalculationPeriodTypeId = JdbcSupport.getInteger(rs, "interestCalculationInPeriodMethod"); - final Boolean allowPartialPeriodInterestCalculation = rs.getBoolean("allowPartialPeriodInterestCalculation"); + final Boolean allowPartialPeriodInterestCalcualtion = rs.getBoolean("allowPartialPeriodInterestCalcualtion"); final EnumOptionData interestCalculationPeriodType = LoanEnumerations .interestCalculationPeriodType(interestCalculationPeriodTypeId); @@ -586,7 +586,7 @@ public LoanProductData mapRow(@NonNull final ResultSet rs, @SuppressWarnings("un numberOfRepayments, minNumberOfRepayments, maxNumberOfRepayments, repaymentEvery, interestRatePerPeriod, minInterestRatePerPeriod, maxInterestRatePerPeriod, annualInterestRate, repaymentFrequencyType, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, - allowPartialPeriodInterestCalculation, fundId, fundName, transactionStrategyCode, transactionStrategyName, + allowPartialPeriodInterestCalcualtion, fundId, fundName, transactionStrategyCode, transactionStrategyName, graceOnPrincipalPayment, recurringMoratoriumOnPrincipalPeriods, graceOnInterestPayment, graceOnInterestCharged, this.charges, accountingRuleType, includeInBorrowerCycle, useBorrowerCycle, startDate, closeDate, status, externalId, principalVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java index 3c538c66fa7..786baf95cf5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java @@ -26,6 +26,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.DELETE; @@ -111,19 +112,11 @@ public class FixedDepositAccountsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Fixed Deposit Account Template", description = """ - This is a convenience resource. It can be useful when building maintenance user interface screens for fixed deposit applications. The template data returned consists of any or all of: - - - - Field Defaults - - Allowed Value ListsExample Requests: - - - - fixeddepositaccounts/template?clientId=1""") - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.GetFixedDepositAccountsTemplateResponse.class))) + @Operation(summary = "Retrieve Fixed Deposit Account Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for fixed deposit applications. The template data returned consists of any or all of:\n\n" + + "\n\n" + "Field Defaults\n\n" + "Allowed Value Lists" + "Example Requests:\n\n" + "\n\n" + + "fixeddepositaccounts/template?clientId=1") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.GetFixedDepositAccountsTemplateResponse.class))) }) public String template(@QueryParam("clientId") @Parameter(description = "clientId") final Long clientId, @QueryParam("groupId") @Parameter(description = "groupId") final Long groupId, @QueryParam("productId") @Parameter(description = "productId") final Long productId, @@ -142,19 +135,10 @@ public String template(@QueryParam("clientId") @Parameter(description = "clientI @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Fixed deposit applications/accounts", description = """ - Lists Fixed Deposit Accounts - - Example Requests: - - - - fixeddepositaccounts - - - - fixeddepositaccounts?fields=name""") - @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.GetFixedDepositAccountsResponse.class)))) + @Operation(summary = "List Fixed deposit applications/accounts", description = "Lists Fixed Deposit Accounts\n\n" + + "Example Requests:\n\n" + "\n\n" + "fixeddepositaccounts\n\n" + "\n\n" + "fixeddepositaccounts?fields=name") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.GetFixedDepositAccountsResponse.class)))) }) public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("paged") @Parameter(description = "paged") final Boolean paged, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @QueryParam("limit") @Parameter(description = "limit") final Integer limit, @@ -184,13 +168,12 @@ public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("paged") @ @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Submit new fixed deposit application", description = """ - Submits a new fixed deposit application - Mandatory Fields: clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId - - Optional Fields: accountNo, externalId, fieldOfficerId,linkAccountId(if provided initial deposit amount will be collected from this account),transferInterestToSavings(By enabling this flag all interest postings will be transferred to linked saving account )""") + @Operation(summary = "Submit new fixed deposit application", description = "Submits a new fixed deposit application" + + "Mandatory Fields: clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId\n\n" + + "Optional Fields: accountNo, externalId, fieldOfficerId,linkAccountId(if provided initial deposit amount will be collected from this account),transferInterestToSavings(By enabling this flag all interest postings will be transferred to linked saving account )") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PostFixedDepositAccountsRequest.class))) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PostFixedDepositAccountsResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PostFixedDepositAccountsResponse.class))) }) public String submitApplication(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createFixedDepositAccount().withJson(apiRequestBodyAsJson) @@ -205,17 +188,10 @@ public String submitApplication(@Parameter(hidden = true) final String apiReques @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a fixed deposit application/account", description = """ - Retrieves a fixed deposit application/account - - Example Requests : - - - - fixeddepositaccounts/1 - - fixeddepositaccounts/1?associations=all""") - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.GetFixedDepositAccountsAccountIdResponse.class))) + @Operation(summary = "Retrieve a fixed deposit application/account", description = "Retrieves a fixed deposit application/account\n\n" + + "Example Requests :\n\n" + "\n\n" + "fixeddepositaccounts/1" + "\n\n" + "fixeddepositaccounts/1?associations=all") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.GetFixedDepositAccountsAccountIdResponse.class))) }) public String retrieveOne(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId, @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @Parameter(description = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, @DefaultValue("all") @QueryParam("chargeStatus") @Parameter(description = "chargeStatus") final String chargeStatus, @@ -244,7 +220,8 @@ public String retrieveOne(@PathParam("accountId") @Parameter(description = "acco @Path("calculate-fd-interest") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.CalculateFixedDepositInterestResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.CalculateFixedDepositInterestResponse.class))) }) public String calculateFixedDepositInterest(@Context final UriInfo uriInfo, @QueryParam("principalAmount") @Parameter(description = "BigDecimal principalAmount") final BigDecimal principalAmount, @QueryParam("annualInterestRate") @Parameter(description = "annualInterestRate") final BigDecimal annualInterestRate, @@ -343,7 +320,8 @@ private FixedDepositAccountData populateTemplateAndAssociations(final Long accou @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Modify a fixed deposit application", description = "Fixed deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PutFixedDepositAccountsAccountIdRequest.class))) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PutFixedDepositAccountsAccountIdResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PutFixedDepositAccountsAccountIdResponse.class))) }) public String update(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -379,7 +357,8 @@ public String update(@PathParam("accountId") @Parameter(description = "accountId + "Calculates and Posts interest earned on a fixed deposit account based on today's date and whether an interest posting or crediting event is due.\n\n" + "Showing request/response for Calculate Interest on Fixed Deposit Account") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PostFixedDepositAccountsAccountIdRequest.class))) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PostFixedDepositAccountsAccountIdResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PostFixedDepositAccountsAccountIdResponse.class))) }) public String handleCommands(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId, @QueryParam("command") @Parameter(description = "command") final String commandParam, @Context final UriInfo uriInfo, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -447,7 +426,8 @@ private boolean is(final String commandParam, final String commandValue) { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a fixed deposit application", description = "At present we support hard delete of fixed deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the fixed deposit account.") - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.DeleteFixedDepositAccountsAccountIdResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.DeleteFixedDepositAccountsAccountIdResponse.class))) }) public String delete(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteFixedDepositAccount(accountId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java index 4086254f5cf..7bee90301d6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java @@ -25,6 +25,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.DELETE; @@ -85,12 +86,9 @@ @Path("/v1/fixeddepositproducts") @Component -@Tag(name = "Fixed Deposit Product", description = """ - This is one of the advanced term deposit product offered by MFI's. The Fixed Deposit Products (aka FD) product offerings are modeled using this API. - - The FD products are deposit accounts which are held for a fixed term – like 1 year, 2 years etc. - - When creating fixed deposit accounts, the details from the fixed deposit product are used to auto fill details of the fixed deposit account application process.""") +@Tag(name = "Fixed Deposit Product", description = "This is one of the advanced term deposit product offered by MFI's. The Fixed Deposit Products (aka FD) product offerings are modeled using this API.\n" + + "\n" + "The FD products are deposit accounts which are held for a fixed term – like 1 year, 2 years etc.\n" + "\n" + + "When creating fixed deposit accounts, the details from the fixed deposit product are used to auto fill details of the fixed deposit account application process.") @RequiredArgsConstructor public class FixedDepositProductsApiResource { @@ -114,17 +112,14 @@ public class FixedDepositProductsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Fixed Deposit Product", description = """ - Creates a Fixed Deposit Product - - Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, accountingRule - - Optional Fields: lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, , withHoldTax, taxGroupId - - - Mandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId""") + @Operation(summary = "Create a Fixed Deposit Product", description = "Creates a Fixed Deposit Product\n\n" + + "Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, accountingRule\n\n" + + "Optional Fields: lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, , withHoldTax, taxGroupId\n\n" + + "\n" + + "Mandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.PostFixedDepositProductsRequest.class))) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.PostFixedDepositProductsResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.PostFixedDepositProductsResponse.class))) }) public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createFixedDepositProduct().withJson(apiRequestBodyAsJson) @@ -141,7 +136,8 @@ public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Update a Fixed Deposit Product", description = "Updates a Fixed Deposit Product") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.PutFixedDepositProductsProductIdRequest.class))) - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.PutFixedDepositProductsProductIdResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.PutFixedDepositProductsProductIdResponse.class))) }) public String update(@PathParam("productId") @Parameter(description = "productId") final Long productId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -157,17 +153,10 @@ public String update(@PathParam("productId") @Parameter(description = "productId @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Fixed Deposit Products", description = """ - Lists Fixed Deposit Products - - Example Requests: - - fixeddepositproducts - - - fixeddepositproducts?fields=name""") - - @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.GetFixedDepositProductsResponse.class)))) + @Operation(summary = "List Fixed Deposit Products", description = "Lists Fixed Deposit Products\n\n" + "Example Requests:\n" + "\n" + + "fixeddepositproducts\n" + "\n" + "\n" + "fixeddepositproducts?fields=name") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.GetFixedDepositProductsResponse.class)))) }) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.FIXED_DEPOSIT_PRODUCT_RESOURCE_NAME); @@ -184,19 +173,11 @@ public String retrieveAll(@Context final UriInfo uriInfo) { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Fixed Deposit Product", description = """ - Retrieves a Fixed Deposit Product - - Example Requests: - - fixeddepositproducts/1 - - - fixeddepositproducts/1?template=true - - - fixeddepositproducts/1?fields=name,description""") - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.GetFixedDepositProductsProductIdResponse.class))) + @Operation(summary = "Retrieve a Fixed Deposit Product", description = "Retrieves a Fixed Deposit Product\n\n" + "Example Requests:\n" + + "\n" + "fixeddepositproducts/1\n" + "\n" + "\n" + "fixeddepositproducts/1?template=true\n" + "\n" + "\n" + + "fixeddepositproducts/1?fields=name,description") + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.GetFixedDepositProductsProductIdResponse.class))) }) public String retrieveOne(@PathParam("productId") @Parameter(description = "productId") final Long productId, @Context final UriInfo uriInfo) { @@ -339,7 +320,8 @@ private FixedDepositProductData handleTemplateRelatedData(final FixedDepositProd @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Fixed Deposit Product", description = "Deletes a Fixed Deposit Product") - @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.DeleteFixedDepositProductsProductIdResponse.class))) + @ApiResponses({ + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.DeleteFixedDepositProductsProductIdResponse.class))) }) public String delete(@PathParam("productId") @Parameter(description = "productId") final Long productId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteFixedDepositProduct(productId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java index 0454621ac7c..064356801f0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java @@ -198,7 +198,7 @@ public String template(@QueryParam("clientId") @Parameter(description = "clientI + "Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate\n\n" + "Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate\n\n" + "Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables\n\n" - + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n\n" + + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAging, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n\n" + "Showing request/response for 'Submit a new Loan Application'") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SelfLoansApiResourceSwagger.PostSelfLoansRequest.class))) @ApiResponses({ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/products/api/SelfLoanProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/products/api/SelfLoanProductsApiResource.java index 63f2e842870..eac7d630ca8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/products/api/SelfLoanProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/products/api/SelfLoanProductsApiResource.java @@ -63,7 +63,7 @@ + "Example Values: 0=Equal principle payments, 1=Equal installments\n" + "interestType\n" + "Used like: interestRatePerPeriod% interestRateFrequencyType - interestType\n" + "e.g. 12.0000% Per year - Declining Balance \n" + "Example Values: 0=Declining Balance, 1=Flat\n" + "interestCalculationPeriodType\n" - + "Example Values: 0=Daily, 1=Same as repayment period\n" + "allowPartialPeriodInterestCalculation\n" + + "Example Values: 0=Daily, 1=Same as repayment period\n" + "allowPartialPeriodInterestCalcualtion\n" + "This value will be supported along with interestCalculationPeriodType as Same as repayment period to calculate interest for partial periods. Example: Interest charged from is 5th of April , Principal is 10000 and interest is 1% per month then the interest will be (10000 * 1%)* (25/30) , it calculates for the month first then calculates exact periods between start date and end date(can be a decimal)\n" + "inArrearsTolerance\n" + "The amount that can be 'waived' at end of all loan payments because it is too small to worry about.\n" + "This is also the tolerance amount assessed when determining if a loan is in arrears.\n" @@ -84,8 +84,8 @@ + "graceOnInterestPayment\n" + "Optional: Integer - represents the number of repayment periods that grace should apply to the interest component of a repayment period. Interest is still calculated but offset to later repayment periods.\n" + "graceOnInterestCharged\n" + "Optional: Integer - represents the number of repayment periods that should be interest-free.\n" - + "graceOnArrearsAgeing\n" - + "Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue.\n" + + "graceOnArrearsAging\n" + + "Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAging days overdue.\n" + "overdueDaysForNPA\n" + "Optional: Integer - represents the maximum number of days a Loan may be overdue before being classified as a NPA (non performing asset)\n" + "accountMovesOutOfNPAOnlyOnArrearsCompletion\n" diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java similarity index 98% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java index 6bcb381569b..5429c36847a 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java @@ -99,7 +99,7 @@ public TaxComponentData retrieveTemplate() { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Create a new Tax Component", description = "Creates a new Tax Component\n\n" + "Mandatory Fields: name, percentage\n\n" - + "Optional Fields: debitAccountType, debitAccountId, creditAccountType, creditAccountId, startDate") + + "Optional Fields: debitAccountType, debitAcountId, creditAccountType, creditAcountId, startDate") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TaxComponentApiResourceSwagger.PostTaxesComponentsRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TaxComponentApiResourceSwagger.PostTaxesComponentsResponse.class))) }) diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResourceSwagger.java similarity index 96% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResourceSwagger.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResourceSwagger.java index 9b9bcc78eec..d2caece1ac5 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResourceSwagger.java @@ -86,13 +86,9 @@ private PostTaxesComponentsRequest() {} @Schema(example = "10") public Float percentage; @Schema(example = "2") - public Integer debitAccountType; - @Schema(example = "4") - public Long debitAccountId; - @Schema(example = "4") public Integer creditAccountType; @Schema(example = "4") - public Long creditAccountId; + public Long creditAcountId; @Schema(example = "en") public String locale; @Schema(example = "dd MMMM yyyy") diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java similarity index 100% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResourceSwagger.java similarity index 100% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResourceSwagger.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResourceSwagger.java diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxComponentCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxComponentCommandHandler.java similarity index 86% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxComponentCommandHandler.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxComponentCommandHandler.java index 96b045767ff..cabf0caf81d 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxComponentCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxComponentCommandHandler.java @@ -18,21 +18,25 @@ */ package org.apache.fineract.portfolio.tax.handler; -import lombok.AllArgsConstructor; import org.apache.fineract.commands.annotation.CommandType; import org.apache.fineract.commands.handler.NewCommandSourceHandler; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.portfolio.tax.service.TaxWritePlatformService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service -@AllArgsConstructor @CommandType(entity = "TAXCOMPONENT", action = "CREATE") public class CreateTaxComponentCommandHandler implements NewCommandSourceHandler { private final TaxWritePlatformService taxWritePlatformService; + @Autowired + public CreateTaxComponentCommandHandler(final TaxWritePlatformService taxWritePlatformService) { + this.taxWritePlatformService = taxWritePlatformService; + } + @Override public CommandProcessingResult processCommand(JsonCommand jsonCommand) { return this.taxWritePlatformService.createTaxComponent(jsonCommand); diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxGroupCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxGroupCommandHandler.java similarity index 86% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxGroupCommandHandler.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxGroupCommandHandler.java index 2da805e27e9..e5b523d9efb 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxGroupCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/CreateTaxGroupCommandHandler.java @@ -18,21 +18,25 @@ */ package org.apache.fineract.portfolio.tax.handler; -import lombok.AllArgsConstructor; import org.apache.fineract.commands.annotation.CommandType; import org.apache.fineract.commands.handler.NewCommandSourceHandler; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.portfolio.tax.service.TaxWritePlatformService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service -@AllArgsConstructor @CommandType(entity = "TAXGROUP", action = "CREATE") public class CreateTaxGroupCommandHandler implements NewCommandSourceHandler { private final TaxWritePlatformService taxWritePlatformService; + @Autowired + public CreateTaxGroupCommandHandler(final TaxWritePlatformService taxWritePlatformService) { + this.taxWritePlatformService = taxWritePlatformService; + } + @Override public CommandProcessingResult processCommand(JsonCommand jsonCommand) { return this.taxWritePlatformService.createTaxGroup(jsonCommand); diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxComponentCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxComponentCommandHandler.java similarity index 86% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxComponentCommandHandler.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxComponentCommandHandler.java index 15d6572052c..b94e369f20e 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxComponentCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxComponentCommandHandler.java @@ -18,21 +18,25 @@ */ package org.apache.fineract.portfolio.tax.handler; -import lombok.AllArgsConstructor; import org.apache.fineract.commands.annotation.CommandType; import org.apache.fineract.commands.handler.NewCommandSourceHandler; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.portfolio.tax.service.TaxWritePlatformService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service -@AllArgsConstructor @CommandType(entity = "TAXCOMPONENT", action = "UPDATE") public class UpdateTaxComponentCommandHandler implements NewCommandSourceHandler { private final TaxWritePlatformService taxWritePlatformService; + @Autowired + public UpdateTaxComponentCommandHandler(final TaxWritePlatformService taxWritePlatformService) { + this.taxWritePlatformService = taxWritePlatformService; + } + @Override public CommandProcessingResult processCommand(JsonCommand jsonCommand) { return this.taxWritePlatformService.updateTaxComponent(jsonCommand.entityId(), jsonCommand); diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxGroupCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxGroupCommandHandler.java similarity index 87% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxGroupCommandHandler.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxGroupCommandHandler.java index d7f11059903..1229e460d7a 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxGroupCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/handler/UpdateTaxGroupCommandHandler.java @@ -18,21 +18,25 @@ */ package org.apache.fineract.portfolio.tax.handler; -import lombok.AllArgsConstructor; import org.apache.fineract.commands.annotation.CommandType; import org.apache.fineract.commands.handler.NewCommandSourceHandler; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.portfolio.tax.service.TaxWritePlatformService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service -@AllArgsConstructor @CommandType(entity = "TAXGROUP", action = "UPDATE") public class UpdateTaxGroupCommandHandler implements NewCommandSourceHandler { private final TaxWritePlatformService taxWritePlatformService; + @Autowired + public UpdateTaxGroupCommandHandler(final TaxWritePlatformService taxWritePlatformService) { + this.taxWritePlatformService = taxWritePlatformService; + } + @Override public CommandProcessingResult processCommand(JsonCommand jsonCommand) { return this.taxWritePlatformService.updateTaxGroup(jsonCommand.entityId(), jsonCommand); diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/serialization/TaxValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/serialization/TaxValidator.java similarity index 97% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/serialization/TaxValidator.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/serialization/TaxValidator.java index 37898b021f5..cbb103ff598 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/serialization/TaxValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/serialization/TaxValidator.java @@ -63,8 +63,8 @@ public class TaxValidator { public static final String COMPONENT_START_DATE = "component.start.date"; private static final Set SUPPORTED_TAX_COMPONENT_CREATE_PARAMETERS = new HashSet<>( Arrays.asList(DATE_FORMAT, LOCALE, TaxApiConstants.nameParamName, TaxApiConstants.percentageParamName, - TaxApiConstants.startDateParamName, TaxApiConstants.debitAccountTypeParamName, TaxApiConstants.debitAccountIdParamName, - TaxApiConstants.creditAccountTypeParamName, TaxApiConstants.creditAccountIdParamName)); + TaxApiConstants.startDateParamName, TaxApiConstants.debitAccountTypeParamName, TaxApiConstants.debitAcountIdParamName, + TaxApiConstants.creditAccountTypeParamName, TaxApiConstants.creditAcountIdParamName)); private static final Set SUPPORTED_TAX_COMPONENT_UPDATE_PARAMETERS = new HashSet<>(Arrays.asList(DATE_FORMAT, LOCALE, TaxApiConstants.nameParamName, TaxApiConstants.percentageParamName, TaxApiConstants.startDateParamName)); private static final Set SUPPORTED_TAX_GROUP_PARAMETERS = new HashSet<>( @@ -111,11 +111,11 @@ public void validateForTaxComponentCreate(final String json) { .isOneOfTheseValues(GLAccountType.ASSET.getValue(), GLAccountType.LIABILITY.getValue(), GLAccountType.EQUITY.getValue(), GLAccountType.INCOME.getValue(), GLAccountType.EXPENSE.getValue()); - final Long debitAccountId = this.fromApiJsonHelper.extractLongNamed(TaxApiConstants.debitAccountIdParamName, element); - baseDataValidator.reset().parameter(TaxApiConstants.debitAccountIdParamName).value(debitAccountId).longGreaterThanZero(); + final Long debitAccountId = this.fromApiJsonHelper.extractLongNamed(TaxApiConstants.debitAcountIdParamName, element); + baseDataValidator.reset().parameter(TaxApiConstants.debitAcountIdParamName).value(debitAccountId).longGreaterThanZero(); if (debitAccountType != null || debitAccountId != null) { baseDataValidator.reset().parameter(TaxApiConstants.debitAccountTypeParamName).value(debitAccountType).notBlank(); - baseDataValidator.reset().parameter(TaxApiConstants.debitAccountIdParamName).value(debitAccountId).notBlank(); + baseDataValidator.reset().parameter(TaxApiConstants.debitAcountIdParamName).value(debitAccountId).notBlank(); } final Integer creditAccountType = this.fromApiJsonHelper.extractIntegerSansLocaleNamed(TaxApiConstants.creditAccountTypeParamName, @@ -124,10 +124,10 @@ public void validateForTaxComponentCreate(final String json) { .isOneOfTheseValues(GLAccountType.ASSET.getValue(), GLAccountType.LIABILITY.getValue(), GLAccountType.EQUITY.getValue(), GLAccountType.INCOME.getValue(), GLAccountType.EXPENSE.getValue()); - final Long creditAccountId = this.fromApiJsonHelper.extractLongNamed(TaxApiConstants.creditAccountIdParamName, element); - baseDataValidator.reset().parameter(TaxApiConstants.creditAccountIdParamName).value(creditAccountId).longGreaterThanZero(); + final Long creditAccountId = this.fromApiJsonHelper.extractLongNamed(TaxApiConstants.creditAcountIdParamName, element); + baseDataValidator.reset().parameter(TaxApiConstants.creditAcountIdParamName).value(creditAccountId).longGreaterThanZero(); if (creditAccountType != null || creditAccountId != null) { - baseDataValidator.reset().parameter(TaxApiConstants.creditAccountIdParamName).value(creditAccountId).notBlank(); + baseDataValidator.reset().parameter(TaxApiConstants.creditAcountIdParamName).value(creditAccountId).notBlank(); baseDataValidator.reset().parameter(TaxApiConstants.creditAccountTypeParamName).value(creditAccountType).notBlank(); } throwExceptionIfValidationWarningsExist(dataValidationErrors); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxAssembler.java index 8b558e80722..ac1c1e5d732 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxAssembler.java @@ -61,7 +61,7 @@ public TaxComponent assembleTaxComponentFrom(final JsonCommand command) { final BigDecimal percentage = this.fromApiJsonHelper.extractBigDecimalWithLocaleNamed(TaxApiConstants.percentageParamName, element); final Integer debitAccountType = this.fromApiJsonHelper.extractIntegerSansLocaleNamed(TaxApiConstants.debitAccountTypeParamName, element); - final Long debitAccountId = this.fromApiJsonHelper.extractLongNamed(TaxApiConstants.debitAccountIdParamName, element); + final Long debitAccountId = this.fromApiJsonHelper.extractLongNamed(TaxApiConstants.debitAcountIdParamName, element); GLAccountType debitGlAccountType = null; if (debitAccountType != null) { debitGlAccountType = GLAccountType.fromInt(debitAccountType); @@ -70,7 +70,7 @@ public TaxComponent assembleTaxComponentFrom(final JsonCommand command) { if (debitAccountId != null) { debitGlAccount = this.glAccountRepositoryWrapper.findOneWithNotFoundDetection(debitAccountId); if (!debitGlAccount.getType().equals(debitAccountType) || debitGlAccount.isHeaderAccount()) { - baseDataValidator.parameter(TaxApiConstants.debitAccountIdParamName).value(debitAccountId) + baseDataValidator.parameter(TaxApiConstants.debitAcountIdParamName).value(debitAccountId) .failWithCode("not.a.valid.account"); } } @@ -81,12 +81,12 @@ public TaxComponent assembleTaxComponentFrom(final JsonCommand command) { if (creditAccountType != null) { creditGlAccountType = GLAccountType.fromInt(creditAccountType); } - final Long creditAccountId = this.fromApiJsonHelper.extractLongNamed(TaxApiConstants.creditAccountIdParamName, element); + final Long creditAccountId = this.fromApiJsonHelper.extractLongNamed(TaxApiConstants.creditAcountIdParamName, element); GLAccount creditGlAccount = null; if (creditAccountId != null) { creditGlAccount = this.glAccountRepositoryWrapper.findOneWithNotFoundDetection(creditAccountId); if (!creditGlAccount.getType().equals(creditAccountType) || creditGlAccount.isHeaderAccount()) { - baseDataValidator.parameter(TaxApiConstants.creditAccountIdParamName).value(creditAccountId) + baseDataValidator.parameter(TaxApiConstants.creditAcountIdParamName).value(creditAccountId) .failWithCode("not.a.valid.account"); } } diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/service/TaxReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxReadPlatformService.java similarity index 100% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/service/TaxReadPlatformService.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxReadPlatformService.java diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxReadPlatformServiceImpl.java index 1a4a0eb6d1c..96acb70be40 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxReadPlatformServiceImpl.java @@ -18,34 +18,47 @@ */ package org.apache.fineract.portfolio.tax.service; +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.time.LocalDate; +import java.util.ArrayList; import java.util.Collection; import java.util.List; import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService; +import org.apache.fineract.accounting.common.AccountingEnumerations; +import org.apache.fineract.accounting.glaccount.data.GLAccountData; +import org.apache.fineract.infrastructure.core.data.EnumOptionData; +import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.portfolio.tax.data.TaxComponentData; +import org.apache.fineract.portfolio.tax.data.TaxComponentHistoryData; import org.apache.fineract.portfolio.tax.data.TaxGroupData; -import org.apache.fineract.portfolio.tax.domain.TaxComponentRepository; -import org.apache.fineract.portfolio.tax.domain.TaxGroupRepository; -import org.apache.fineract.portfolio.tax.mapper.TaxComponentMapper; -import org.apache.fineract.portfolio.tax.mapper.TaxGroupMapper; +import org.apache.fineract.portfolio.tax.data.TaxGroupMappingsData; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.core.RowMapper; @RequiredArgsConstructor public class TaxReadPlatformServiceImpl implements TaxReadPlatformService { + private static final TaxComponentMapper TAX_COMPONENT_MAPPER = new TaxComponentMapper(); + private static final TaxGroupMapper TAX_GROUP_MAPPER = new TaxGroupMapper(); + private static final TaxComponentLookUpMapper TAX_COMPONENT_LOOK_UP_MAPPER = new TaxComponentLookUpMapper(); + private static final TaxGroupLookUpMapper TAX_GROUP_LOOK_UP_MAPPER = new TaxGroupLookUpMapper(); + + private final JdbcTemplate jdbcTemplate; private final AccountingDropdownReadPlatformService accountingDropdownReadPlatformService; - private final TaxComponentRepository taxComponentRepository; - private final TaxComponentMapper taxComponentMapper; - private final TaxGroupRepository taxGroupRepository; - private final TaxGroupMapper taxGroupMapper; @Override public List retrieveAllTaxComponents() { - return taxComponentMapper.map(taxComponentRepository.findAll()); + String sql = "select " + TAX_COMPONENT_MAPPER.getSchema(); + return this.jdbcTemplate.query(sql, TAX_COMPONENT_MAPPER); // NOSONAR } @Override public TaxComponentData retrieveTaxComponentData(final Long id) { - return taxComponentMapper.map(taxComponentRepository.getReferenceById(id)); + String sql = "select " + TAX_COMPONENT_MAPPER.getSchema() + " where tc.id=?"; + return this.jdbcTemplate.queryForObject(sql, TAX_COMPONENT_MAPPER, id); // NOSONAR } @Override @@ -56,12 +69,14 @@ public TaxComponentData retrieveTaxComponentTemplate() { @Override public List retrieveAllTaxGroups() { - return taxGroupMapper.map(taxGroupRepository.findAll()); + String sql = "select " + TAX_GROUP_MAPPER.getSchema(); + return this.jdbcTemplate.query(sql, TAX_GROUP_MAPPER); // NOSONAR } @Override public TaxGroupData retrieveTaxGroupData(final Long id) { - return taxGroupMapper.map(taxGroupRepository.getReferenceById(id)); + String sql = "select " + TAX_GROUP_MAPPER.getSchema() + " where tg.id=?"; + return this.jdbcTemplate.queryForObject(sql, TAX_GROUP_MAPPER, id); // NOSONAR } @Override @@ -77,12 +92,205 @@ public TaxGroupData retrieveTaxGroupTemplate() { } private Collection retrieveTaxComponentsForLookUp() { - return taxComponentMapper.map(taxComponentRepository.findAll()); + String sql = "select " + TAX_COMPONENT_LOOK_UP_MAPPER.getSchema(); + return this.jdbcTemplate.query(sql, TAX_COMPONENT_LOOK_UP_MAPPER); // NOSONAR } @Override public List retrieveTaxGroupsForLookUp() { - return taxGroupMapper.map(taxGroupRepository.findAll()); + String sql = "select " + TAX_GROUP_LOOK_UP_MAPPER.getSchema(); + return this.jdbcTemplate.query(sql, TAX_GROUP_LOOK_UP_MAPPER); // NOSONAR + } + + private static final class TaxComponentMapper implements RowMapper { + + private final String schema; + private final TaxComponentHistoryDataMapper componentHistoryDataMapper = new TaxComponentHistoryDataMapper(); + + TaxComponentMapper() { + StringBuilder sb = new StringBuilder(); + sb.append("tc.id as id, tc.name as name,"); + sb.append("tc.percentage as percentage, tc.start_date as startDate,"); + sb.append("tc.debit_account_type_enum as debitAccountTypeEnum,"); + sb.append("dgl.id as debitAccountId, dgl.name as debitAccountName, dgl.gl_code as debitAccountGlCode,"); + sb.append("tc.credit_account_type_enum as creditAccountTypeEnum,"); + sb.append("cgl.id as creditAccountId, cgl.name as creditAccountName, cgl.gl_code as creditAccountGlCode,"); + sb.append("history.percentage as historyPercentage, history.start_date as historyStartDate,"); + sb.append("history.end_date as historyEndDate"); + sb.append(" from m_tax_component tc "); + sb.append(" left join acc_gl_account dgl on dgl.id = tc.debit_account_id"); + sb.append(" left join acc_gl_account cgl on cgl.id = tc.credit_account_id"); + sb.append(" left join m_tax_component_history history on history.tax_component_id = tc.id"); + + this.schema = sb.toString(); + } + + @Override + public TaxComponentData mapRow(ResultSet rs, int rowNum) throws SQLException { + final Long id = rs.getLong("id"); + final String name = rs.getString("name"); + final BigDecimal percentage = rs.getBigDecimal("percentage"); + final Integer debitAccountTypeEnum = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "debitAccountTypeEnum"); + EnumOptionData debitAccountType = null; + if (debitAccountTypeEnum != null) { + debitAccountType = AccountingEnumerations.gLAccountType(debitAccountTypeEnum); + } + GLAccountData debitAccountData = null; + if (debitAccountTypeEnum != null && debitAccountTypeEnum > 0) { + final Long debitAccountId = rs.getLong("debitAccountId"); + final String debitAccountName = rs.getString("debitAccountName"); + final String debitAccountGlCode = rs.getString("debitAccountGlCode"); + debitAccountData = new GLAccountData().setId(debitAccountId).setName(debitAccountName).setGlCode(debitAccountGlCode); + } + + final Integer creditAccountTypeEnum = JdbcSupport.getIntegerDefaultToNullIfZero(rs, "creditAccountTypeEnum"); + EnumOptionData creditAccountType = null; + if (creditAccountTypeEnum != null) { + creditAccountType = AccountingEnumerations.gLAccountType(creditAccountTypeEnum); + } + GLAccountData creditAccountData = null; + if (creditAccountTypeEnum != null && creditAccountTypeEnum > 0) { + final Long creditAccountId = rs.getLong("creditAccountId"); + final String creditAccountName = rs.getString("creditAccountName"); + final String creditAccountGlCode = rs.getString("creditAccountGlCode"); + creditAccountData = new GLAccountData().setId(creditAccountId).setName(creditAccountName).setGlCode(creditAccountGlCode); + } + final LocalDate startDate = JdbcSupport.getLocalDate(rs, "startDate"); + + Collection historyDatas = new ArrayList<>(); + historyDatas.add(componentHistoryDataMapper.mapRow(rs, rowNum)); + while (rs.next()) { + if (id.equals(rs.getLong("id"))) { + historyDatas.add(componentHistoryDataMapper.mapRow(rs, rowNum)); + } else { + rs.previous(); + break; + } + } + return TaxComponentData.instance(id, name, percentage, debitAccountType, debitAccountData, creditAccountType, creditAccountData, + startDate, historyDatas); + } + + public String getSchema() { + return this.schema; + } + + } + + private static final class TaxComponentHistoryDataMapper implements RowMapper { + + @Override + public TaxComponentHistoryData mapRow(ResultSet rs, @SuppressWarnings("unused") int rowNum) throws SQLException { + final BigDecimal percentage = rs.getBigDecimal("historyPercentage"); + final LocalDate startDate = JdbcSupport.getLocalDate(rs, "historyStartDate"); + final LocalDate endDate = JdbcSupport.getLocalDate(rs, "historyEndDate"); + return new TaxComponentHistoryData(percentage, startDate, endDate); + } + + } + + private static final class TaxGroupMapper implements RowMapper { + + private final String schema; + private final TaxGroupMappingsDataMapper taxGroupMappingsDataMapper = new TaxGroupMappingsDataMapper(); + + TaxGroupMapper() { + StringBuilder sb = new StringBuilder(); + sb.append("tg.id as id, tg.name as name,"); + sb.append("tgm.id as mappingId,"); + sb.append("tc.id as taxComponentId, tc.name as taxComponentName,"); + sb.append("tgm.start_date as startDate, tgm.end_date as endDate "); + sb.append(" from m_tax_group tg "); + sb.append(" inner join m_tax_group_mappings tgm on tgm.tax_group_id = tg.id "); + sb.append(" inner join m_tax_component tc on tc.id = tgm.tax_component_id "); + this.schema = sb.toString(); + } + + @Override + public TaxGroupData mapRow(ResultSet rs, int rowNum) throws SQLException { + final Long id = rs.getLong("id"); + final String name = rs.getString("name"); + final Collection taxAssociations = new ArrayList<>(); + taxAssociations.add(this.taxGroupMappingsDataMapper.mapRow(rs, rowNum)); + while (rs.next()) { + if (id.equals(rs.getLong("id"))) { + taxAssociations.add(this.taxGroupMappingsDataMapper.mapRow(rs, rowNum)); + } else { + rs.previous(); + break; + } + } + return new TaxGroupData(id, name, taxAssociations, null); + } + + public String getSchema() { + return this.schema; + } + + } + + private static final class TaxGroupMappingsDataMapper implements RowMapper { + + @Override + public TaxGroupMappingsData mapRow(ResultSet rs, @SuppressWarnings("unused") int rowNum) throws SQLException { + final Long mappingId = rs.getLong("mappingId"); + final Long id = rs.getLong("taxComponentId"); + final String name = rs.getString("taxComponentName"); + TaxComponentData componentData = TaxComponentData.lookup(id, name); + + final LocalDate startDate = JdbcSupport.getLocalDate(rs, "startDate"); + final LocalDate endDate = JdbcSupport.getLocalDate(rs, "endDate"); + return new TaxGroupMappingsData(mappingId, componentData, startDate, endDate); + } + + } + + private static final class TaxComponentLookUpMapper implements RowMapper { + + private final String schema; + + TaxComponentLookUpMapper() { + StringBuilder sb = new StringBuilder(); + sb.append("tc.id as id, tc.name as name "); + sb.append(" from m_tax_component tc "); + this.schema = sb.toString(); + } + + public String getSchema() { + return this.schema; + } + + @Override + public TaxComponentData mapRow(ResultSet rs, @SuppressWarnings("unused") int rowNum) throws SQLException { + final Long id = rs.getLong("id"); + final String name = rs.getString("name"); + return TaxComponentData.lookup(id, name); + } + + } + + private static final class TaxGroupLookUpMapper implements RowMapper { + + private final String schema; + + TaxGroupLookUpMapper() { + StringBuilder sb = new StringBuilder(); + sb.append("tg.id as id, tg.name as name "); + sb.append(" from m_tax_group tg "); + this.schema = sb.toString(); + } + + public String getSchema() { + return this.schema; + } + + @Override + public TaxGroupData mapRow(ResultSet rs, @SuppressWarnings("unused") int rowNum) throws SQLException { + final Long id = rs.getLong("id"); + final String name = rs.getString("name"); + return TaxGroupData.lookup(id, name); + } + } } diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/service/TaxWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxWritePlatformService.java similarity index 100% rename from fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/service/TaxWritePlatformService.java rename to fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxWritePlatformService.java diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/starter/TaxConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/starter/TaxConfiguration.java index a5a5aa0296d..4c1effb1e89 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/starter/TaxConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/starter/TaxConfiguration.java @@ -25,8 +25,6 @@ import org.apache.fineract.portfolio.tax.domain.TaxComponentRepositoryWrapper; import org.apache.fineract.portfolio.tax.domain.TaxGroupRepository; import org.apache.fineract.portfolio.tax.domain.TaxGroupRepositoryWrapper; -import org.apache.fineract.portfolio.tax.mapper.TaxComponentMapper; -import org.apache.fineract.portfolio.tax.mapper.TaxGroupMapper; import org.apache.fineract.portfolio.tax.serialization.TaxValidator; import org.apache.fineract.portfolio.tax.service.TaxAssembler; import org.apache.fineract.portfolio.tax.service.TaxReadPlatformService; @@ -36,6 +34,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.jdbc.core.JdbcTemplate; @Configuration public class TaxConfiguration { @@ -49,11 +48,9 @@ public TaxAssembler taxAssembler(FromJsonHelper fromApiJsonHelper, GLAccountRepo @Bean @ConditionalOnMissingBean(TaxReadPlatformService.class) - public TaxReadPlatformService taxReadPlatformService(final TaxComponentRepository taxComponentRepository, - final TaxComponentMapper taxComponentMapper, final TaxGroupRepository taxGroupRepository, final TaxGroupMapper taxGroupMapper, + public TaxReadPlatformService taxReadPlatformService(JdbcTemplate jdbcTemplate, AccountingDropdownReadPlatformService accountingDropdownReadPlatformService) { - return new TaxReadPlatformServiceImpl(accountingDropdownReadPlatformService, taxComponentRepository, taxComponentMapper, - taxGroupRepository, taxGroupMapper); + return new TaxReadPlatformServiceImpl(jdbcTemplate, accountingDropdownReadPlatformService); } @Bean diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java b/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java index ce6c99e24e6..a1836523e41 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java @@ -22,8 +22,10 @@ import com.github.mustachejava.DefaultMustacheFactory; import com.github.mustachejava.Mustache; import com.github.mustachejava.MustacheFactory; +import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; import java.io.StringReader; import java.io.StringWriter; import java.net.Authenticator; @@ -53,13 +55,21 @@ public class TemplateMergeService { private final FineractProperties fineractProperties; + // TODO Replace this with appropriate alternative available in Guava private static String getStringFromInputStream(final InputStream is) { - try { - return new String(is.readAllBytes(), StandardCharsets.UTF_8); + final StringBuilder sb = new StringBuilder(); + + String line; + try (BufferedReader br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) { + + while ((line = br.readLine()) != null) { + sb.append(line); + } } catch (final IOException e) { log.error("getStringFromInputStream() failed", e); - return ""; } + + return sb.toString(); } public String compile(final Template template, final Map scopes) { diff --git a/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm b/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm index 4b1921016bb..028496e8768 100644 --- a/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm +++ b/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm @@ -10303,7 +10303,7 @@

Loans

Example Values: 0=Daily, 1=Same as repayment period - allowPartialPeriodInterestCalculation + allowPartialPeriodInterestCalcualtion This value will be supported along with interestCalculationPeriodType as Same as repayment period to calculate interest for partial periods. @@ -11629,7 +11629,7 @@

Submit a new Loan Application

Optional Fields
- graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, + graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true), daysInYearType @@ -15688,7 +15688,7 @@

Loan Products

Example Values: 0=Daily, 1=Same as repayment period - allowPartialPeriodInterestCalculation + allowPartialPeriodInterestCalcualtion This value will be supported along with interestCalculationPeriodType as Same as repayment period to calculate interest for partial periods. @@ -17172,7 +17172,7 @@

Create a Loan Product

numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, - outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalculation, rates + outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion, rates @@ -44729,7 +44729,7 @@

Tax Components

- debitAccountId + debitAcountId @@ -44742,7 +44742,7 @@

Tax Components

- debitAccountId + debitAcountId @@ -44786,13 +44786,13 @@

Create a new Tax Component

debitAccountType - debitAccountId + debitAcountId creditAccountType - creditAccountId + creditAcountId startDate @@ -44811,7 +44811,7 @@

Create a new Tax Component

"name": "tax component 1", "percentage": "10", "creditAccountType": 2, - "creditAccountId": 4, + "creditAcountId": 4, "locale": "en", "dateFormat": "dd MMMM yyyy", "startDate": "11 April 2016" @@ -48399,7 +48399,7 @@

Submit a new Loan Application

Optional Fields
- graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, + graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) @@ -51616,7 +51616,7 @@

Loan Products

Example Values: 0=Daily, 1=Same as repayment period - allowPartialPeriodInterestCalculation + allowPartialPeriodInterestCalcualtion This value will be supported along with interestCalculationPeriodType as Same as repayment period to calculate interest for partial periods. diff --git a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationValidatorTest.java b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationValidatorTest.java index d5c1441adb5..d84219a478e 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationValidatorTest.java +++ b/fineract-provider/src/test/java/org/apache/fineract/portfolio/loanaccount/service/reamortization/LoanReAmortizationValidatorTest.java @@ -185,16 +185,53 @@ public void testValidateUndoReAmortize_ShouldThrowException_WhenLoanDoesntHaveRe List transactions = List.of(loanTransaction(LoanTransactionType.DISBURSEMENT, actualDate.minusDays(3))); Loan loan = loan(); given(loan.getLoanTransactions()).willReturn(transactions); + JsonCommand command = jsonCommand(); // when GeneralPlatformDomainRuleException result = assertThrows(GeneralPlatformDomainRuleException.class, - () -> underTest.findAndValidateReAmortizeTransactionForUndo(loan)); + () -> underTest.validateUndoReAmortize(loan, command)); // then assertThat(result).isNotNull(); assertThat(result.getGlobalisationMessageCode()).isEqualTo("error.msg.loan.reamortize.reamortization.transaction.missing"); } @Test - public void testValidateUndoReAmortize_ShouldNotThrowException() { + public void testValidateUndoReAmortize_ShouldThrowException_WhenLoanAlreadyHasRepaymentAfterReAmortization() { + // given + List transactions = List.of(loanTransaction(LoanTransactionType.DISBURSEMENT, actualDate.minusDays(3)), + loanTransaction(LoanTransactionType.REAMORTIZE, actualDate.minusDays(2)), + loanTransaction(LoanTransactionType.REPAYMENT, actualDate.minusDays(1))); + Loan loan = loan(); + given(loan.getLoanTransactions()).willReturn(transactions); + JsonCommand command = jsonCommand(); + // when + GeneralPlatformDomainRuleException result = assertThrows(GeneralPlatformDomainRuleException.class, + () -> underTest.validateUndoReAmortize(loan, command)); + // then + assertThat(result).isNotNull(); + assertThat(result.getGlobalisationMessageCode()).isEqualTo("error.msg.loan.reamortize.repayment.exists.after.reamortization"); + } + + @Test + public void testValidateUndoReAmortize_ShouldThrowException_WhenLoanAlreadyHasRepaymentAfterReAmortization_SameDay() { + // given + List transactions = List.of(loanTransaction(LoanTransactionType.DISBURSEMENT, actualDate.minusDays(2)), + loanTransaction(LoanTransactionType.REAMORTIZE, actualDate.minusDays(1), + OffsetDateTime.of(actualDate, LocalTime.of(10, 0), ZoneOffset.UTC)), + loanTransaction(LoanTransactionType.REPAYMENT, actualDate.minusDays(1), + OffsetDateTime.of(actualDate, LocalTime.of(11, 0), ZoneOffset.UTC))); + Loan loan = loan(); + given(loan.getLoanTransactions()).willReturn(transactions); + JsonCommand command = jsonCommand(); + // when + GeneralPlatformDomainRuleException result = assertThrows(GeneralPlatformDomainRuleException.class, + () -> underTest.validateUndoReAmortize(loan, command)); + // then + assertThat(result).isNotNull(); + assertThat(result.getGlobalisationMessageCode()).isEqualTo("error.msg.loan.reamortize.repayment.exists.after.reamortization"); + } + + @Test + public void testValidateUndoReAmortize_ShouldNotThrowException_WhenLoanAlreadyHasRepaymentAfterReAmortization_SameDay_RepaymentBeforeReAmortization() { // given List transactions = List.of(loanTransaction(LoanTransactionType.DISBURSEMENT, actualDate.minusDays(2)), loanTransaction(LoanTransactionType.REAMORTIZE, actualDate.minusDays(1), @@ -203,8 +240,9 @@ public void testValidateUndoReAmortize_ShouldNotThrowException() { OffsetDateTime.of(actualDate, LocalTime.of(9, 0), ZoneOffset.UTC))); Loan loan = loan(); given(loan.getLoanTransactions()).willReturn(transactions); + JsonCommand command = jsonCommand(); // when - underTest.findAndValidateReAmortizeTransactionForUndo(loan); + underTest.validateUndoReAmortize(loan, command); // then no exception thrown } @@ -233,7 +271,6 @@ private LoanTransaction loanTransaction(LoanTransactionType type, LocalDate txDa given(loanTransaction.getTypeOf()).willReturn(type); given(loanTransaction.getTransactionDate()).willReturn(txDate); given(loanTransaction.getSubmittedOnDate()).willReturn(txDate); - given(loanTransaction.isNotReversed()).willReturn(true); return loanTransaction; } diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxApiConstants.java b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxApiConstants.java index 7487a5d9418..ee8e78f5f86 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxApiConstants.java +++ b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxApiConstants.java @@ -23,9 +23,9 @@ public interface TaxApiConstants { String nameParamName = "name"; String percentageParamName = "percentage"; String debitAccountTypeParamName = "debitAccountType"; - String debitAccountIdParamName = "debitAccountId"; + String debitAcountIdParamName = "debitAcountId"; String creditAccountTypeParamName = "creditAccountType"; - String creditAccountIdParamName = "creditAccountId"; + String creditAcountIdParamName = "creditAcountId"; String startDateParamName = "startDate"; String endDateParamName = "endDate"; diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/domain/TaxComponent.java b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/domain/TaxComponent.java index bc7498aaec7..ac0d0a0ef42 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/domain/TaxComponent.java +++ b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/domain/TaxComponent.java @@ -35,7 +35,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import lombok.Getter; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.glaccount.domain.GLAccount; import org.apache.fineract.accounting.glaccount.domain.GLAccountType; @@ -45,7 +44,6 @@ import org.apache.fineract.portfolio.tax.api.TaxApiConstants; @Entity -@Getter @Table(name = "m_tax_component") public class TaxComponent extends AbstractAuditableCustom { @@ -60,14 +58,14 @@ public class TaxComponent extends AbstractAuditableCustom { @ManyToOne @JoinColumn(name = "debit_account_id") - private GLAccount debitAccount; + private GLAccount debitAcount; @Column(name = "credit_account_type_enum") private Integer creditAccountType; @ManyToOne @JoinColumn(name = "credit_account_id") - private GLAccount creditAccount; + private GLAccount creditAcount; @Column(name = "start_date", nullable = false) private LocalDate startDate; @@ -83,24 +81,24 @@ protected TaxComponent() { } - private TaxComponent(final String name, final BigDecimal percentage, final GLAccountType debitAccountType, final GLAccount debitAccount, - final GLAccountType creditAccountType, final GLAccount creditAccount, final LocalDate startDate) { + private TaxComponent(final String name, final BigDecimal percentage, final GLAccountType debitAccountType, final GLAccount debitAcount, + final GLAccountType creditAccountType, final GLAccount creditAcount, final LocalDate startDate) { this.name = name; this.percentage = percentage; if (debitAccountType != null) { this.debitAccountType = debitAccountType.getValue(); } - this.debitAccount = debitAccount; + this.debitAcount = debitAcount; if (creditAccountType != null) { this.creditAccountType = creditAccountType.getValue(); } - this.creditAccount = creditAccount; + this.creditAcount = creditAcount; this.startDate = startDate; } public static TaxComponent createTaxComponent(final String name, final BigDecimal percentage, final GLAccountType debitAccountType, - final GLAccount debitAccount, final GLAccountType creditAccountType, final GLAccount creditAccount, final LocalDate startDate) { - return new TaxComponent(name, percentage, debitAccountType, debitAccount, creditAccountType, creditAccount, startDate); + final GLAccount debitAcount, final GLAccountType creditAccountType, final GLAccount creditAcount, final LocalDate startDate) { + return new TaxComponent(name, percentage, debitAccountType, debitAcount, creditAccountType, creditAcount, startDate); } public Map update(final JsonCommand command) { @@ -195,7 +193,7 @@ public Integer getDebitAccountType() { } public GLAccount getDebitAcount() { - return this.debitAccount; + return this.debitAcount; } public Integer getCreditAccountType() { @@ -203,6 +201,6 @@ public Integer getCreditAccountType() { } public GLAccount getCreditAcount() { - return this.creditAccount; + return this.creditAcount; } } diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/domain/TaxGroupMappings.java b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/domain/TaxGroupMappings.java index 181d681ccba..ff95a1abd83 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/domain/TaxGroupMappings.java +++ b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/domain/TaxGroupMappings.java @@ -27,13 +27,11 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import lombok.Getter; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableCustom; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.tax.api.TaxApiConstants; @Entity -@Getter @Table(name = "m_tax_group_mappings") public class TaxGroupMappings extends AbstractAuditableCustom { diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/mapper/TaxComponentMapper.java b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/mapper/TaxComponentMapper.java deleted file mode 100644 index 939d4e83875..00000000000 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/mapper/TaxComponentMapper.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.fineract.portfolio.tax.mapper; - -import java.util.List; -import org.apache.fineract.accounting.glaccount.mapper.GlAccountMapper; -import org.apache.fineract.accounting.glaccount.mapper.GlAccountTypeMapper; -import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; -import org.apache.fineract.portfolio.tax.data.TaxComponentData; -import org.apache.fineract.portfolio.tax.domain.TaxComponent; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; - -@Mapper(config = MapstructMapperConfig.class, uses = { GlAccountMapper.class, GlAccountTypeMapper.class }) -public interface TaxComponentMapper { - - @Mapping(target = "creditAccount", source = "taxComponent.creditAccount") - @Mapping(target = "debitAccount", source = "taxComponent.debitAccount") - @Mapping(target = "creditAccountType", source = "taxComponent.creditAccountType") - @Mapping(target = "debitAccountType", source = "taxComponent.debitAccountType") - @Mapping(target = "glAccountOptions", ignore = true) - @Mapping(target = "glAccountTypeOptions", ignore = true) - @Mapping(target = "taxComponentHistories", ignore = true) - TaxComponentData map(TaxComponent taxComponent); - - List map(List taxComponents); - -} diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/mapper/TaxGroupMapper.java b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/mapper/TaxGroupMapper.java deleted file mode 100644 index 3edadeef55b..00000000000 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/mapper/TaxGroupMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.fineract.portfolio.tax.mapper; - -import java.util.List; -import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; -import org.apache.fineract.portfolio.tax.data.TaxGroupData; -import org.apache.fineract.portfolio.tax.domain.TaxGroup; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; - -@Mapper(config = MapstructMapperConfig.class, uses = { TaxGroupMappingsMapper.class }) -public interface TaxGroupMapper { - - @Mapping(target = "taxAssociations", source = "taxGroup.taxGroupMappings") - @Mapping(target = "taxComponents", ignore = true) - TaxGroupData map(TaxGroup taxGroup); - - List map(List taxGroups); - -} diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/mapper/TaxGroupMappingsMapper.java b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/mapper/TaxGroupMappingsMapper.java deleted file mode 100644 index 4afc643fe3a..00000000000 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/mapper/TaxGroupMappingsMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.fineract.portfolio.tax.mapper; - -import java.util.List; -import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; -import org.apache.fineract.portfolio.tax.data.TaxGroupMappingsData; -import org.apache.fineract.portfolio.tax.domain.TaxGroupMappings; -import org.mapstruct.Mapper; - -@Mapper(config = MapstructMapperConfig.class, uses = { TaxComponentMapper.class }) -public interface TaxGroupMappingsMapper { - - TaxGroupMappingsData map(TaxGroupMappings taxGroupMapping); - - List map(List taxGroupMappings); - -} diff --git a/fineract-war/build.gradle b/fineract-war/build.gradle index b5f6bcae377..f606183cc5b 100644 --- a/fineract-war/build.gradle +++ b/fineract-war/build.gradle @@ -136,9 +136,6 @@ distributions { from "$rootDir/fineract-doc/build/docs/pdf/en/index.pdf" rename ('index.pdf', 'fineract-documentation.pdf') - - from "$rootDir/.atr-rat-excludes-bin.txt" - rename ('.atr-rat-excludes-bin.txt', '.rat-excludes') } } src { @@ -150,7 +147,7 @@ distributions { '**/.classpath', '.idea', 'out', '._.DS_Store', '.DS_Store', 'WebContent', '**/.externalToolbuilders', '.theia', 'LICENSE_RELEASE', 'NOTICE_RELEASE', '**/licenses', '*.class', '**/bin', '*.log', '.dockerignore', - '**/.gitkeep', '*.swp', '.atr-rat-excludes-bin.txt', '**/jquery-1.7.min.js' + '**/.gitkeep' // Ensure consistent file paths for caching eachFile { details -> @@ -159,7 +156,6 @@ distributions { } rename ('LICENSE_SOURCE', 'LICENSE') rename ('NOTICE_SOURCE', 'NOTICE') - rename ('.atr-rat-excludes-src.txt', '.rat-excludes') } } } diff --git a/gradle.properties b/gradle.properties index 84dd6ec6aca..f1193b58f28 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,7 +16,7 @@ # specific language governing permissions and limitations # under the License. # -org.gradle.jvmargs=-Xmx12g --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED --add-opens=java.naming/javax.naming=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=null +org.gradle.jvmargs=-Xmx8g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED --add-opens=java.naming/javax.naming=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED buildType=BUILD org.gradle.caching=true org.gradle.parallel=true diff --git a/integration-tests/dependencies.gradle b/integration-tests/dependencies.gradle index 1560d98d3c0..9b0cb8cafe8 100644 --- a/integration-tests/dependencies.gradle +++ b/integration-tests/dependencies.gradle @@ -20,7 +20,7 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - tomcat 'org.apache.tomcat:tomcat:10.1.45@zip' + tomcat 'org.apache.tomcat:tomcat:10.1.42@zip' def providerMainOutput = project(':fineract-provider').extensions.getByType(SourceSetContainer).named('main').get().output testImplementation( providerMainOutput, project(path: ':fineract-core', configuration: 'runtimeElements'), diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/AdvancedPaymentAllocationLoanRepaymentScheduleTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/AdvancedPaymentAllocationLoanRepaymentScheduleTest.java index 494154c2a4c..87ad48e08de 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/AdvancedPaymentAllocationLoanRepaymentScheduleTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/AdvancedPaymentAllocationLoanRepaymentScheduleTest.java @@ -4450,7 +4450,7 @@ public void uc141() { .repaymentEvery(1)// .repaymentFrequencyType(2L)// .enableDownPayment(true)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .enableAutoRepaymentForDownPayment(false)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// @@ -4512,7 +4512,7 @@ public void uc142() { .repaymentEvery(1)// .repaymentFrequencyType(2L)// .enableDownPayment(true)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .enableAutoRepaymentForDownPayment(false)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// @@ -4575,7 +4575,7 @@ public void uc143() { .repaymentEvery(1)// .repaymentFrequencyType(2L)// .enableDownPayment(true)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .enableAutoRepaymentForDownPayment(false)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// @@ -4637,7 +4637,7 @@ public void uc144() { .daysInMonthType(DaysInMonthType.ACTUAL).daysInYearType(DaysInYearType.DAYS_365).numberOfRepayments(4)// .repaymentEvery(1)// .repaymentFrequencyType(2L)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// .allowApprovedDisbursedAmountsOverApplied(null)// @@ -4739,7 +4739,7 @@ public void uc145() { .maxInterestRatePerPeriod((double) 110)// .repaymentEvery(1)// .repaymentFrequencyType(1L)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// .allowApprovedDisbursedAmountsOverApplied(null)// @@ -4918,7 +4918,7 @@ public void uc146() { .daysInMonthType(DaysInMonthType.ACTUAL).daysInYearType(DaysInYearType.DAYS_365).numberOfRepayments(4)// .repaymentEvery(5)// .repaymentFrequencyType(0L)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// .allowApprovedDisbursedAmountsOverApplied(null)// @@ -4982,7 +4982,7 @@ public void uc147a() { .repaymentEvery(1)// .repaymentFrequencyType(2L)// .enableDownPayment(false)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .enableAutoRepaymentForDownPayment(null)// .multiDisburseLoan(true)// .disallowExpectedDisbursements(true)// @@ -5064,7 +5064,7 @@ public void uc147b() { .repaymentEvery(1)// .repaymentFrequencyType(2L)// .enableDownPayment(false)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .enableAutoRepaymentForDownPayment(null)// .multiDisburseLoan(true)// .disallowExpectedDisbursements(true)// @@ -5163,7 +5163,7 @@ public void uc147c() { .repaymentFrequencyType(RepaymentFrequencyType.MONTHS.longValue())// .repaymentStartDateType(LoanProduct.RepaymentStartDateTypeEnum.SUBMITTED_ON_DATE.ordinal())// .enableDownPayment(false)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .enableAutoRepaymentForDownPayment(null)// .multiDisburseLoan(true)// .disallowExpectedDisbursements(true)// @@ -5280,7 +5280,7 @@ public void uc147d() { .repaymentFrequencyType(RepaymentFrequencyType.MONTHS.longValue())// .repaymentStartDateType(LoanProduct.RepaymentStartDateTypeEnum.SUBMITTED_ON_DATE.ordinal())// .enableDownPayment(false)// - .allowPartialPeriodInterestCalculation(null)// + .allowPartialPeriodInterestCalcualtion(null)// .enableAutoRepaymentForDownPayment(null)// .isInterestRecalculationEnabled(true)// .interestRecalculationCompoundingMethod(0)// @@ -5454,7 +5454,7 @@ public void uc149() { .maxInterestRatePerPeriod((double) 0)// .repaymentEvery(1)// .repaymentFrequencyType(1L)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// .allowApprovedDisbursedAmountsOverApplied(null)// @@ -5527,7 +5527,7 @@ public void uc150() { .maxInterestRatePerPeriod((double) 12)// .repaymentEvery(1)// .repaymentFrequencyType(RepaymentFrequencyType.MONTHS.longValue())// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// .allowApprovedDisbursedAmountsOverApplied(null)// @@ -5574,7 +5574,7 @@ public void uc151() { PostLoanProductsRequest product = create4IProgressive().interestRateFrequencyType(YEARS).numberOfRepayments(6)// .repaymentEvery(1)// .repaymentFrequencyType(1L)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .multiDisburseLoan(true)// .maxTrancheCount(10)// .disallowExpectedDisbursements(true)// @@ -5757,7 +5757,7 @@ public void uc152() { .maxInterestRatePerPeriod((double) 0)// .repaymentEvery(1)// .repaymentFrequencyType(1L)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// .allowApprovedDisbursedAmountsOverApplied(null)// @@ -5915,7 +5915,7 @@ public void uc154() { .daysInMonthType(DaysInMonthType.ACTUAL).daysInYearType(DaysInYearType.DAYS_360).numberOfRepayments(3)// .repaymentEvery(1)// .repaymentFrequencyType(1L)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// .allowApprovedDisbursedAmountsOverApplied(null)// @@ -5973,7 +5973,7 @@ public void uc155() { .interestRatePerPeriod(12.0).interestCalculationPeriodType(RepaymentFrequencyType.DAYS).numberOfRepayments(4)// .repaymentEvery(1)// .repaymentFrequencyType(1L)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .installmentAmountInMultiplesOf(null)// .multiDisburseLoan(false)// .disallowExpectedDisbursements(null)// @@ -6045,7 +6045,7 @@ public void uc156() { .repaymentStartDateType(LoanProduct.RepaymentStartDateTypeEnum.SUBMITTED_ON_DATE.ordinal())// .enableDownPayment(false)// .enableAccrualActivityPosting(true)// - .allowPartialPeriodInterestCalculation(null)// + .allowPartialPeriodInterestCalcualtion(null)// .enableAutoRepaymentForDownPayment(null)// .isInterestRecalculationEnabled(true)// .delinquencyBucketId(delinquencyBucketId.longValue())// @@ -6187,7 +6187,7 @@ public void uc157() { .repaymentStartDateType(LoanProduct.RepaymentStartDateTypeEnum.SUBMITTED_ON_DATE.ordinal())// .enableDownPayment(false)// .enableAccrualActivityPosting(true)// - .allowPartialPeriodInterestCalculation(null)// + .allowPartialPeriodInterestCalcualtion(null)// .enableAutoRepaymentForDownPayment(null)// .isInterestRecalculationEnabled(true)// .delinquencyBucketId(delinquencyBucketId.longValue())// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/BaseLoanIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/BaseLoanIntegrationTest.java index 25cc3ea5eda..77444cb5350 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/BaseLoanIntegrationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/BaseLoanIntegrationTest.java @@ -434,7 +434,7 @@ protected PostLoanProductsRequest create4ICumulative() { .amortizationType(AmortizationType.EQUAL_INSTALLMENTS)// .interestType(InterestType.DECLINING_BALANCE)// .interestCalculationPeriodType(InterestCalculationPeriodType.DAILY)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .creditAllocation(List.of())// .overdueDaysForNPA(179)// .daysInMonthType(30)// @@ -530,7 +530,7 @@ protected PutLoanProductsProductIdRequest update4IProgressive(String name, Strin .amortizationType(AmortizationType.EQUAL_INSTALLMENTS)// .interestType(InterestType.DECLINING_BALANCE)// .interestCalculationPeriodType(InterestCalculationPeriodType.DAILY)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .transactionProcessingStrategyCode(ADVANCED_PAYMENT_ALLOCATION_STRATEGY)// .paymentAllocation(List.of(createDefaultPaymentAllocation("NEXT_INSTALLMENT")))// .creditAllocation(List.of())// @@ -632,7 +632,7 @@ protected PostLoanProductsRequest create4IProgressive() { .amortizationType(AmortizationType.EQUAL_INSTALLMENTS)// .interestType(InterestType.DECLINING_BALANCE)// .interestCalculationPeriodType(InterestCalculationPeriodType.DAILY)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .transactionProcessingStrategyCode(ADVANCED_PAYMENT_ALLOCATION_STRATEGY)// .paymentAllocation(List.of(createDefaultPaymentAllocation("NEXT_INSTALLMENT")))// .creditAllocation(List.of())// @@ -768,7 +768,7 @@ protected PostLoanProductsRequest createOnePeriod30DaysPeriodicAccrualProduct(do .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(Collections.emptyList())// @@ -824,7 +824,7 @@ protected PostLoanProductsRequest createOnePeriod30DaysPeriodicAccrualProductWit .loanScheduleProcessingType(LoanScheduleProcessingType.HORIZONTAL.toString()) // .addPaymentAllocationItem(defaultAllocation).enableDownPayment(false) // .isInterestRecalculationEnabled(true).interestRecalculationCompoundingMethod(0) // - .preClosureInterestCalculationStrategy(1).recalculationRestFrequencyType(1).allowPartialPeriodInterestCalculation(true) // + .preClosureInterestCalculationStrategy(1).recalculationRestFrequencyType(1).allowPartialPeriodInterestCalcualtion(true) // .rescheduleStrategyMethod(rescheduleStrategyMethod); } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/BatchApiTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/BatchApiTest.java index 888e493c37e..f6e2c161cfa 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/BatchApiTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/BatchApiTest.java @@ -40,8 +40,8 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import java.util.concurrent.ThreadLocalRandom; import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.lang3.RandomUtils; import org.apache.fineract.batch.command.internal.AdjustLoanTransactionCommandStrategy; import org.apache.fineract.batch.command.internal.CreateTransactionLoanCommandStrategy; import org.apache.fineract.batch.command.internal.GetDatatableEntryByAppTableIdAndDataTableIdCommandStrategy; @@ -413,7 +413,7 @@ public void shouldReturnOkStatusForCreateAndGetChargeByIdCommand() { .withInterestTypeAsDecliningBalance() // .currencyDetails("0", "100").build(null); - final Long applyLoanRequestId = ThreadLocalRandom.current().nextLong(1000, 10_000); + final Long applyLoanRequestId = Long.valueOf(RandomStringUtils.randomNumeric(4)); final Long approveLoanRequestId = applyLoanRequestId + 1; final Long disburseLoanRequestId = approveLoanRequestId + 1; final Long createChargeRequestId = disburseLoanRequestId + 1; @@ -474,7 +474,7 @@ public void shouldReturnOkStatusOnSuccessfulChargeAdjustment() { .withInterestTypeAsDecliningBalance() // .currencyDetails("0", "100").build(null); - final Long applyLoanRequestId = ThreadLocalRandom.current().nextLong(1000, 10_000); + final Long applyLoanRequestId = Long.valueOf(RandomStringUtils.randomNumeric(4)); final Long approveLoanRequestId = applyLoanRequestId + 1; final Long disburseLoanRequestId = approveLoanRequestId + 1; final Long createChargeRequestId = disburseLoanRequestId + 1; @@ -1671,7 +1671,7 @@ public void shouldReturnOkStatusForBatchRepaymentReversalUsingExternalId() { final Integer productId = new LoanTransactionHelper(this.requestSpec, this.responseSpec).getLoanProductId(loanProductJSON); final LocalDate date = LocalDate.now(Utils.getZoneIdOfTenant()); - final Long applyLoanRequestId = ThreadLocalRandom.current().nextLong(1000, 10_000); + final Long applyLoanRequestId = Long.valueOf(RandomStringUtils.randomNumeric(4)); final Long approveLoanRequestId = applyLoanRequestId + 1; final Long disburseLoanRequestId = approveLoanRequestId + 1; final Long getLoanBeforeTxnRequestId = disburseLoanRequestId + 1; @@ -2275,7 +2275,7 @@ public void shouldReflectChangesOnLoanUpdate() { .withInterestTypeAsDecliningBalance() // .currencyDetails("0", "100").build(null); - final Long applyLoanRequestId = ThreadLocalRandom.current().nextLong(100, 1000); + final Long applyLoanRequestId = RandomUtils.nextLong(100, 1000); final Long approveLoanRequestId = applyLoanRequestId + 1; final Long disburseLoanRequestId = approveLoanRequestId + 1; final Long updateLoanRequestId = disburseLoanRequestId + 1; @@ -2332,7 +2332,7 @@ public void shouldReflectChangesOnLoanUpdateByExternalId() { .withInterestTypeAsDecliningBalance() // .currencyDetails("0", "100").build(null); - final long applyLoanRequestId = ThreadLocalRandom.current().nextLong(100, 1000); + final Long applyLoanRequestId = RandomUtils.nextLong(100, 1000); final Long approveLoanRequestId = applyLoanRequestId + 1; final Long disburseLoanRequestId = approveLoanRequestId + 1; final Long updateLoanRequestId = disburseLoanRequestId + 1; @@ -2399,7 +2399,7 @@ public void shoulRetrieveTheProperErrorDuringLockedLoan_OldRelativePath() { .withInterestTypeAsDecliningBalance() // .currencyDetails("0", "100").build(null); - final long applyLoanRequestId = ThreadLocalRandom.current().nextLong(100, 1000); + final Long applyLoanRequestId = RandomUtils.nextLong(100, 1000); final Long approveLoanRequestId = applyLoanRequestId + 1; final Long disburseLoanRequestId = approveLoanRequestId + 1; final Long getLoanRequestId = disburseLoanRequestId + 1; @@ -2481,7 +2481,7 @@ public void shoulRetrieveTheProperErrorDuringLockedLoan() { .withInterestTypeAsDecliningBalance() // .currencyDetails("0", "100").build(null); - final Long applyLoanRequestId = ThreadLocalRandom.current().nextLong(100, 1000); + final Long applyLoanRequestId = RandomUtils.nextLong(100, 1000); final Long approveLoanRequestId = applyLoanRequestId + 1; final Long disburseLoanRequestId = approveLoanRequestId + 1; final Long getLoanRequestId = disburseLoanRequestId + 1; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java index 71319a97470..201e81094b5 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java @@ -7169,7 +7169,7 @@ private void validateIfValuesAreNotOverridden(Integer loanID, Integer loanProduc String loanDetails = LOAN_TRANSACTION_HELPER.getLoanDetails(REQUEST_SPEC, RESPONSE_SPEC, loanID); List comparisonAttributes = Arrays.asList("amortizationType", "interestType", "transactionProcessingStrategyCode", "interestCalculationPeriodType", "repaymentFrequencyType", "graceOnPrincipalPayment", "graceOnInterestPayment", - "inArrearsTolerance", "graceOnArrearsAgeing"); + "inArrearsTolerance", "graceOnArrearsAging"); for (String comparisonAttribute : comparisonAttributes) { Object val1 = JsonPath.from(loanProductDetails).get(comparisonAttribute); @@ -7186,7 +7186,7 @@ private JsonObject createLoanProductConfigurationDetail(JsonObject loanProductCo loanProductConfiguration.addProperty("inArrearsTolerance", bool); loanProductConfiguration.addProperty("repaymentEvery", bool); loanProductConfiguration.addProperty("graceOnPrincipalAndInterestPayment", bool); - loanProductConfiguration.addProperty("graceOnArrearsAgeing", bool); + loanProductConfiguration.addProperty("graceOnArrearsAging", bool); return loanProductConfiguration; } @@ -8324,7 +8324,7 @@ protected PostLoanProductsRequest createOnePeriod30DaysLongNoInterestPeriodicAcc .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(Collections.emptyList())// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java index fedb1983a6f..78c5efe19c9 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java @@ -751,7 +751,7 @@ private Integer createLoanProductWithPeriodicAccrualAccountingAndAdvancedPayment .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java index acacd8c1725..824b0d05a68 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java @@ -443,7 +443,7 @@ private Integer createLoanProductWithPeriodicAccrualAccounting(boolean advancedP .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanBuyDownFeeTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanBuyDownFeeTest.java index 31a63faf474..92ab6434f24 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanBuyDownFeeTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanBuyDownFeeTest.java @@ -261,7 +261,7 @@ private PostLoanProductsRequest createProgressiveLoanProductWithBuyDownFee( .repaymentFrequencyType(RepaymentFrequencyType.MONTHS_L).interestRatePerPeriod(10.0).minInterestRatePerPeriod(0.0) .maxInterestRatePerPeriod(120.0).interestRateFrequencyType(InterestRateFrequencyType.YEARS) .amortizationType(AmortizationType.EQUAL_INSTALLMENTS).interestType(InterestType.DECLINING_BALANCE) - .interestCalculationPeriodType(InterestCalculationPeriodType.DAILY).allowPartialPeriodInterestCalculation(false) + .interestCalculationPeriodType(InterestCalculationPeriodType.DAILY).allowPartialPeriodInterestCalcualtion(false) .transactionProcessingStrategyCode("advanced-payment-allocation-strategy") .paymentAllocation(List.of(createDefaultPaymentAllocation("NEXT_INSTALLMENT"))).creditAllocation(List.of()) .daysInMonthType(30).daysInYearType(360).isInterestRecalculationEnabled(false).accountingRule(3) // Accrual-based diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccountingTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccountingTest.java index ba955ec013d..45da532fe04 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccountingTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanChargeOffAccountingTest.java @@ -945,7 +945,7 @@ private PostLoanProductsResponse createLoanProductWithAdvancedChargeOffAccountin .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(Collections.emptyList())// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java index f94f20ae7fe..9538565618a 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java @@ -1212,7 +1212,7 @@ private Integer createLoanProductWithPeriodicAccrualAccounting() { .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java index 52aeb6a863b..73b525a0511 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java @@ -222,7 +222,7 @@ private PostLoanProductsRequest loanProductsRequest(Long chargeOffReasonId, Long .interestRecalculationCompoundingMethod(0)// .recalculationRestFrequencyType(2)// .recalculationRestFrequencyInterval(1)// - .allowPartialPeriodInterestCalculation(false);// + .allowPartialPeriodInterestCalcualtion(false);// } @NonNull diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java index b3281aa4f41..e40e2a93913 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java @@ -1542,7 +1542,7 @@ private PostLoanProductsRequest loanProductsRequestInterestDecliningBalanceDaily .interestRecalculationCompoundingMethod(0)// .recalculationRestFrequencyType(2)// .recalculationRestFrequencyInterval(1)// - .allowPartialPeriodInterestCalculation(false);// + .allowPartialPeriodInterestCalcualtion(false);// } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java index 2eaa1cef5fb..254e1d9bfe6 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java @@ -251,7 +251,7 @@ private PostLoanProductsRequest loanProductsRequest() { .interestRecalculationCompoundingMethod(0)// .recalculationRestFrequencyType(2)// .recalculationRestFrequencyInterval(1)// - .allowPartialPeriodInterestCalculation(false);// + .allowPartialPeriodInterestCalcualtion(false);// } private Integer createLoanAccount(final Integer clientID, final Long loanProductID, final String externalId) { diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/SavingsInterestPostingTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/SavingsInterestPostingTest.java index 5b026c38424..098b9a96240 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/SavingsInterestPostingTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/SavingsInterestPostingTest.java @@ -340,7 +340,7 @@ public void testPostInterestNotZero() { interestReceivableAccount.getAccountID().toString(), assetAccount, incomeAccount, expenseAccount, liabilityAccount); final Integer clientId = ClientHelper.createClient(requestSpec, responseSpec, "01 January 2025"); - final LocalDate startDate = LocalDate.of(2025, 1, 1); + final LocalDate startDate = LocalDate.of(LocalDate.now(Utils.getZoneIdOfTenant()).getYear(), 1, 1); final String startStr = DateTimeFormatter.ofPattern("dd MMMM yyyy", Locale.US).format(startDate); final Integer accountId = savingsAccountHelper.applyForSavingsApplicationOnDate(clientId, productId, diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/TaxesTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/TaxesTest.java deleted file mode 100644 index baba20f1d89..00000000000 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/TaxesTest.java +++ /dev/null @@ -1,117 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.fineract.integrationtests; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import org.apache.fineract.client.models.GetTaxesComponentsResponse; -import org.apache.fineract.client.models.GetTaxesGroupResponse; -import org.apache.fineract.client.models.GetTaxesGroupTaxAssociations; -import org.apache.fineract.client.models.PostTaxesComponentsRequest; -import org.apache.fineract.client.models.PostTaxesComponentsResponse; -import org.apache.fineract.client.models.PostTaxesGroupRequest; -import org.apache.fineract.client.models.PostTaxesGroupResponse; -import org.apache.fineract.client.models.PostTaxesGroupTaxComponents; -import org.apache.fineract.integrationtests.common.TaxComponentHelper; -import org.apache.fineract.integrationtests.common.TaxGroupHelper; -import org.apache.fineract.integrationtests.common.Utils; -import org.apache.fineract.integrationtests.common.accounting.Account; -import org.apache.fineract.integrationtests.common.accounting.AccountHelper; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public class TaxesTest { - - @Test - public void createTaxComponentTest() { - Long taxComponentId = createTaxComponentWithLiabilityToCredit("taxComponent"); - - GetTaxesComponentsResponse taxComponentDetails = TaxComponentHelper.retrieveTaxComponent(taxComponentId); - Assertions.assertNotNull(taxComponentDetails); - Assertions.assertNotNull(taxComponentDetails.getId()); - Assertions.assertEquals(taxComponentId, taxComponentDetails.getId()); - - taxComponentId = createTaxComponentWithLiabilityToDebit("taxComponent"); - - taxComponentDetails = TaxComponentHelper.retrieveTaxComponent(taxComponentId); - Assertions.assertNotNull(taxComponentDetails); - Assertions.assertNotNull(taxComponentDetails.getId()); - Assertions.assertEquals(taxComponentId, taxComponentDetails.getId()); - } - - @Test - public void createTaxGroupTest() { - List allTaxGroups = TaxGroupHelper.retrieveAllTaxGroups(); - Assertions.assertNotNull(allTaxGroups); - - final Long taxComponentId = createTaxComponentWithLiabilityToCredit("taxComponent"); - - final Set taxComponentsSet = new HashSet<>(); - taxComponentsSet.add(new PostTaxesGroupTaxComponents().taxComponentId(taxComponentId).startDate("01 January 2023")); - final PostTaxesGroupRequest taxGroupRequest = new PostTaxesGroupRequest().name(Utils.randomStringGenerator("TAX_GRP_", 4)) - .taxComponents(taxComponentsSet).dateFormat("dd MMMM yyyy").locale("en"); - final PostTaxesGroupResponse taxGroupResponse = TaxGroupHelper.createTaxGroup(taxGroupRequest); - Assertions.assertNotNull(taxGroupResponse); - Assertions.assertNotNull(taxGroupResponse.getResourceId()); - - final GetTaxesGroupResponse taxGroupDetails = TaxGroupHelper.retrieveTaxGroup(taxGroupResponse.getResourceId()); - Assertions.assertNotNull(taxGroupDetails); - Assertions.assertEquals(taxGroupResponse.getResourceId(), taxGroupDetails.getId()); - Assertions.assertFalse(taxGroupDetails.getTaxAssociations().isEmpty()); - GetTaxesGroupTaxAssociations taxAssociation = taxGroupDetails.getTaxAssociations().iterator().next(); - Assertions.assertNotNull(taxAssociation); - Assertions.assertEquals(taxComponentId, taxAssociation.getTaxComponent().getId()); - - allTaxGroups = TaxGroupHelper.retrieveAllTaxGroups(); - Assertions.assertNotNull(allTaxGroups); - Assertions.assertTrue(allTaxGroups.size() > 0); - } - - private Long createTaxComponentWithLiabilityToCredit(final String taxComponentPrefix) { - final Account taxComponentGlAccount = AccountHelper.createLiabilityGlAccount(taxComponentPrefix); - - final PostTaxesComponentsRequest taxComponentRequest = new PostTaxesComponentsRequest() - .name(Utils.randomStringGenerator(taxComponentPrefix, 4)).percentage(12.0f).startDate("01 January 2023") - .creditAccountType(Integer.valueOf(taxComponentGlAccount.getAccountType().toString())) - .creditAccountId(taxComponentGlAccount.getAccountID().longValue()).dateFormat(Utils.DATE_FORMAT).locale(Utils.LOCALE); - - final PostTaxesComponentsResponse taxComponentRespose = TaxComponentHelper.createTaxComponent(taxComponentRequest); - Assertions.assertNotNull(taxComponentRespose); - Assertions.assertNotNull(taxComponentRespose.getResourceId()); - - return taxComponentRespose.getResourceId(); - } - - private Long createTaxComponentWithLiabilityToDebit(final String taxComponentPrefix) { - final Account taxComponentGlAccount = AccountHelper.createLiabilityGlAccount(taxComponentPrefix); - - final PostTaxesComponentsRequest taxComponentRequest = new PostTaxesComponentsRequest() - .name(Utils.randomStringGenerator(taxComponentPrefix, 4)).percentage(12.0f).startDate("01 January 2023") - .debitAccountType(Integer.valueOf(taxComponentGlAccount.getAccountType().toString())) - .debitAccountId(taxComponentGlAccount.getAccountID().longValue()).dateFormat(Utils.DATE_FORMAT).locale(Utils.LOCALE); - - final PostTaxesComponentsResponse taxComponentRespose = TaxComponentHelper.createTaxComponent(taxComponentRequest); - Assertions.assertNotNull(taxComponentRespose); - Assertions.assertNotNull(taxComponentRespose.getResourceId()); - - return taxComponentRespose.getResourceId(); - } - -} diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java index 4cf24b9677f..b2d145f7e6e 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java @@ -294,7 +294,7 @@ private Integer createLoanProductWithPeriodicAccrualAccountingAndAdvancedPayment .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(charges)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/modules/LoanProductTemplates.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/modules/LoanProductTemplates.java index 5b95f82d2f4..95cdedb1f95 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/modules/LoanProductTemplates.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/feign/modules/LoanProductTemplates.java @@ -96,7 +96,7 @@ default PostLoanProductsRequest onePeriod30DaysNoInterest() { .repaymentEvery(true)// .graceOnPrincipalAndInterestPayment(true)// .graceOnArrearsAgeing(true))// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .maxTrancheCount(10)// .outstandingLoanBalance(10000.0)// .charges(Collections.emptyList())// @@ -171,7 +171,7 @@ default PostLoanProductsRequest fourInstallmentsCumulativeTemplate() { .amortizationType(AmortizationType.EQUAL_INSTALLMENTS)// .interestType(InterestType.DECLINING_BALANCE)// .interestCalculationPeriodType(InterestCalculationPeriodType.SAME_AS_REPAYMENT_PERIOD)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .creditAllocation(List.of())// .overdueDaysForNPA(179)// .daysInMonthType(DaysInMonthType.DAYS_30)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxComponentHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxComponentHelper.java index 36181c272e0..3a363e0d241 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxComponentHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxComponentHelper.java @@ -22,7 +22,6 @@ import io.restassured.specification.RequestSpecification; import io.restassured.specification.ResponseSpecification; import java.util.HashMap; -import org.apache.fineract.client.models.GetTaxesComponentsResponse; import org.apache.fineract.client.models.PostTaxesComponentsRequest; import org.apache.fineract.client.models.PostTaxesComponentsResponse; import org.apache.fineract.client.util.Calls; @@ -58,7 +57,7 @@ public static String getTaxComponentAsJSON(final String percentage, final Intege final HashMap map = getBasicTaxComponentMap(percentage); if (creditAccountId != null) { map.put("creditAccountType", Account.AccountType.LIABILITY.toString()); - map.put("creditAccountId", String.valueOf(creditAccountId)); + map.put("creditAcountId", String.valueOf(creditAccountId)); } LOG.info("map : {}", map); return new Gson().toJson(map); @@ -82,8 +81,4 @@ public static PostTaxesComponentsResponse createTaxComponent(PostTaxesComponents return Calls.ok(FineractClientHelper.getFineractClient().taxComponents.createTaxComponent(request)); } - public static GetTaxesComponentsResponse retrieveTaxComponent(Long taxComponentId) { - return Calls.ok(FineractClientHelper.getFineractClient().taxComponents.retrieveTaxComponent(taxComponentId)); - } - } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxGroupHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxGroupHelper.java index e6e772b2120..c1c38fe592e 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxGroupHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/TaxGroupHelper.java @@ -25,7 +25,6 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; -import org.apache.fineract.client.models.GetTaxesGroupResponse; import org.apache.fineract.client.models.PostTaxesGroupRequest; import org.apache.fineract.client.models.PostTaxesGroupResponse; import org.apache.fineract.client.util.Calls; @@ -92,12 +91,4 @@ public static PostTaxesGroupResponse createTaxGroup(PostTaxesGroupRequest reques return Calls.ok(FineractClientHelper.getFineractClient().taxGroups.createTaxGroup(request)); } - public static GetTaxesGroupResponse retrieveTaxGroup(Long taxGroupId) { - return Calls.ok(FineractClientHelper.getFineractClient().taxGroups.retrieveTaxGroup(taxGroupId)); - } - - public static List retrieveAllTaxGroups() { - return Calls.ok(FineractClientHelper.getFineractClient().taxGroups.retrieveAllTaxGroups()); - } - } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/Utils.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/Utils.java index be95c3cfd23..d492e052765 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/Utils.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/Utils.java @@ -88,7 +88,6 @@ public final class Utils { public static final String TENANT_TIME_ZONE = "Asia/Kolkata"; public static final String DATE_FORMAT = "dd MMMM yyyy"; public static final String DATE_TIME_FORMAT = "dd MMMM yyyy HH:mm"; - public static final String LOCALE = "en"; public static final DateTimeFormatter dateFormatter = new DateTimeFormatterBuilder().appendPattern(DATE_FORMAT).toFormatter(); public static final DateTimeFormatter dateTimeFormatter = new DateTimeFormatterBuilder().appendPattern(DATE_TIME_FORMAT).toFormatter(); private static final Logger LOG = LoggerFactory.getLogger(Utils.class); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountHelper.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountHelper.java index 42e28206904..f00279e9d8f 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountHelper.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/accounting/AccountHelper.java @@ -21,9 +21,7 @@ import io.restassured.specification.RequestSpecification; import io.restassured.specification.ResponseSpecification; import java.util.ArrayList; -import java.util.Calendar; import java.util.HashMap; -import org.apache.fineract.accounting.glaccount.domain.GLAccountType; import org.apache.fineract.client.models.DeleteGLAccountsResponse; import org.apache.fineract.client.models.GetGLAccountsResponse; import org.apache.fineract.client.models.PostGLAccountsRequest; @@ -33,7 +31,6 @@ import org.apache.fineract.client.util.Calls; import org.apache.fineract.integrationtests.common.FineractClientHelper; import org.apache.fineract.integrationtests.common.Utils; -import org.junit.jupiter.api.Assertions; @SuppressWarnings("rawtypes") public class AccountHelper { @@ -164,49 +161,4 @@ public static PutGLAccountsResponse updateGLAccount(final Long requestId, final public static GetGLAccountsResponse getGLAccount(final Long glAccountId) { return Calls.ok(FineractClientHelper.getFineractClient().glAccounts.retreiveAccount(glAccountId, false)); } - - public static Account createAssetGlAccount(final String glAccountName) { - PostGLAccountsResponse postGLAccountsResponse = createGLAccount( - createGlAccount(GLAccountType.ASSET, Utils.uniqueRandomStringGenerator(glAccountName, 6), null)); - Assertions.assertNotNull(postGLAccountsResponse); - return new Account(postGLAccountsResponse.getResourceId().intValue(), Account.AccountType.ASSET); - } - - public static Account createLiabilityGlAccount(final String glAccountName) { - PostGLAccountsResponse postGLAccountsResponse = createGLAccount( - createGlAccount(GLAccountType.LIABILITY, Utils.uniqueRandomStringGenerator(glAccountName, 6), null)); - Assertions.assertNotNull(postGLAccountsResponse); - return new Account(postGLAccountsResponse.getResourceId().intValue(), Account.AccountType.LIABILITY); - } - - public static Account createIncomeGlAccount(final String glAccountName) { - PostGLAccountsResponse postGLAccountsResponse = createGLAccount( - createGlAccount(GLAccountType.INCOME, Utils.uniqueRandomStringGenerator(glAccountName, 6), null)); - Assertions.assertNotNull(postGLAccountsResponse); - return new Account(postGLAccountsResponse.getResourceId().intValue(), Account.AccountType.INCOME); - } - - public static Account createExpenseGlAccount(final String glAccountName) { - PostGLAccountsResponse postGLAccountsResponse = createGLAccount( - createGlAccount(GLAccountType.EXPENSE, Utils.uniqueRandomStringGenerator(glAccountName, 6), null)); - Assertions.assertNotNull(postGLAccountsResponse); - return new Account(postGLAccountsResponse.getResourceId().intValue(), Account.AccountType.EXPENSE); - } - - public static Account createEquityGlAccount(final String glAccountName) { - PostGLAccountsResponse postGLAccountsResponse = createGLAccount( - createGlAccount(GLAccountType.EQUITY, Utils.uniqueRandomStringGenerator(glAccountName, 6), null)); - Assertions.assertNotNull(postGLAccountsResponse); - return new Account(postGLAccountsResponse.getResourceId().intValue(), Account.AccountType.EQUITY); - } - - public static PostGLAccountsRequest createGlAccount(final GLAccountType glAccountType, final String glAccountName, - final Long parentAccountId) { - return new PostGLAccountsRequest().type(glAccountType.getValue()).glCode(createGlCode(glAccountType)).manualEntriesAllowed(true) - .usage(1).parentId(parentAccountId).description(glAccountName).name(glAccountName); - } - - public static String createGlCode(final GLAccountType glAccountType) { - return Utils.uniqueRandomStringGenerator(glAccountType.getValue().toString() + Calendar.getInstance().getTimeInMillis(), 2); - } } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanProductTestBuilder.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanProductTestBuilder.java index fda6f19ac9e..2b706f6dbf8 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanProductTestBuilder.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/loans/LoanProductTestBuilder.java @@ -141,7 +141,7 @@ public class LoanProductTestBuilder { private String graceOnPrincipalPayment = null; private String graceOnInterestPayment = null; private JsonObject allowAttributeOverrides = null; - private Boolean allowPartialPeriodInterestCalculation = false; + private Boolean allowPartialPeriodInterestCalcualtion = false; private Boolean allowVariableInstallments = Boolean.FALSE; private Integer minimumGap; @@ -290,7 +290,7 @@ public HashMap build(final String chargeId, final Integer delinq if (allowAttributeOverrides != null) { map.put("allowAttributeOverrides", this.allowAttributeOverrides); } - map.put("allowPartialPeriodInterestCalculation", this.allowPartialPeriodInterestCalculation); + map.put("allowPartialPeriodInterestCalcualtion", this.allowPartialPeriodInterestCalcualtion); map.put("allowVariableInstallments", allowVariableInstallments); if (allowVariableInstallments) { map.put("minimumGap", minimumGap); @@ -471,9 +471,9 @@ public LoanProductTestBuilder withInterestCalculationPeriodTypeAsDays() { return this; } - public LoanProductTestBuilder withInterestCalculationPeriodTypeAsRepaymentPeriod(final Boolean allowPartialPeriodInterestCalculation) { + public LoanProductTestBuilder withInterestCalculationPeriodTypeAsRepaymentPeriod(final Boolean allowPartialPeriodInterestCalcualtion) { this.interestCalculationPeriodType = CALCULATION_PERIOD_SAME_AS_REPAYMENT_PERIOD; - this.allowPartialPeriodInterestCalculation = allowPartialPeriodInterestCalculation; + this.allowPartialPeriodInterestCalcualtion = allowPartialPeriodInterestCalcualtion; return this; } @@ -814,8 +814,8 @@ public LoanProductTestBuilder withRepaymentStartDateType(final Integer repayment return this; } - public LoanProductTestBuilder withAllowPartialPeriodInterestCalculation(final Boolean allowPartialPeriodInterestCalculation) { - this.allowPartialPeriodInterestCalculation = allowPartialPeriodInterestCalculation; + public LoanProductTestBuilder withAllowPartialPeriodInterestCalculation(final Boolean allowPartialPeriodInterestCalcualtion) { + this.allowPartialPeriodInterestCalcualtion = allowPartialPeriodInterestCalcualtion; return this; } diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/LoanApiIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/LoanApiIntegrationTest.java index 8d5c9bf3a1f..e32b4b4953b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/LoanApiIntegrationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/LoanApiIntegrationTest.java @@ -61,7 +61,7 @@ public void test_retrieveLoansByClientId_Works() { .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -85,7 +85,7 @@ public void test_retrieveLoansByClientId_Works() { .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -171,7 +171,7 @@ public void test_retrieveLoansWithSummary_Works() { .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -242,7 +242,7 @@ public void test_retrieveLoansWithSummaryForMultipleLoans_Works() { .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -326,7 +326,7 @@ public void test_retrieveLoansWithSummaryWithoutDisbursement_Works() { .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java index 50221eda2f0..a68c50d1200 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java @@ -80,7 +80,7 @@ public void test_PenaltyRecalculationWorksForBackdatedTx_WhenCumulative_1() { .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -193,7 +193,7 @@ public void test_PenaltyRecalculationWorksForBackdatedTx_WhenCumulative_2() { .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -307,7 +307,7 @@ public void test_PenaltyRecalculationWorksForBackdatedTx_WhenCumulative_3() { .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/pointintime/LoanPointInTimeTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/pointintime/LoanPointInTimeTest.java index c06f8898b91..81705b52d73 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/pointintime/LoanPointInTimeTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/pointintime/LoanPointInTimeTest.java @@ -68,7 +68,7 @@ public void test_LoanPointInTimeDataWorks_ForPrincipalOutstandingCalculation() { .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -208,7 +208,7 @@ public void test_LoanPointInTimeDataWorks_ForAllOutstandingCalculation_WhenLoanI .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -372,7 +372,7 @@ public void test_LoanPointInTimeDataWorks_ForAllOutstandingCalculation_WhenLoanI .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.ADJUST_LAST_UNPAID_PERIOD)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -543,7 +543,7 @@ public void test_LoansPointInTimeDataWorks_ForPrincipalOutstandingCalculation() .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -687,7 +687,7 @@ public void test_LoanPointInTimeDataWorks_ForArrearsDataCalculation() { .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -785,7 +785,7 @@ public void test_LoanPointInTimeDataWorks_ForArrearsDataCalculation_ForFutureDat .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/repayment/LoanRepaymentTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/repayment/LoanRepaymentTest.java index 5ff169527a1..3bcde40ee5a 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/repayment/LoanRepaymentTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/repayment/LoanRepaymentTest.java @@ -63,7 +63,7 @@ public void test_LoanRepaymentWorks_WhenDisbursementChargeIsAvailable_AndAccrual .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.DAILY)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(false)// + .allowPartialPeriodInterestCalcualtion(false)// .disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -159,7 +159,7 @@ public void test_LoanRepaymentWorks_WhenOnlyOneInstallment_AndAccrualAccounting_ .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.SAME_AS_REPAYMENT_PERIOD)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .preClosureInterestCalculationStrategy(1).disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// @@ -242,7 +242,7 @@ public void test_LoanRepaymentWorks_WhenOnlyOneInstallment_AndAccrualAccounting_ .recalculationRestFrequencyInterval(1)// .recalculationRestFrequencyType(RecalculationRestFrequencyType.SAME_AS_REPAYMENT_PERIOD)// .rescheduleStrategyMethod(RescheduleStrategyMethod.REDUCE_EMI_AMOUNT)// - .allowPartialPeriodInterestCalculation(true)// + .allowPartialPeriodInterestCalcualtion(true)// .preClosureInterestCalculationStrategy(2).disallowExpectedDisbursements(false)// .allowApprovedDisbursedAmountsOverApplied(false)// .overAppliedNumber(null)// diff --git a/kubernetes/fineract-mifoscommunity-deployment.yml b/kubernetes/fineract-mifoscommunity-deployment.yml index 7aba7e16b2b..eeb13fc1b77 100644 --- a/kubernetes/fineract-mifoscommunity-deployment.yml +++ b/kubernetes/fineract-mifoscommunity-deployment.yml @@ -17,45 +17,6 @@ # -apiVersion: v1 -kind: ConfigMap -metadata: - name: web-app-config -data: - environment.json: | - { - "fineractApiUrls": ["/fineract-provider"], - "oauth": { - "enabled": false - }, - "defaultLanguage": "en-US", - "supportedLanguages": ["en-US", "es-MX"], - "preloadClients": true - } - nginx.conf: | - server { - listen 80; - server_name localhost; - root /usr/share/nginx/html; - index index.html; - - location / { - try_files $uri $uri/ /index.html; - } - - location /fineract-provider/ { - proxy_pass https://fineract-server:8443/fineract-provider/; - proxy_ssl_verify off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto https; - proxy_redirect https:// http://; - } - } - ---- - apiVersion: v1 kind: Service metadata: @@ -99,7 +60,7 @@ spec: command: ['sh', '-c', 'echo -e "Checking for the availability of Fineract server deployment"; while ! nc -z "fineract-server" 8443; do sleep 1; printf "-"; done; echo -e " >> Fineract server has started";'] containers: - name: mifos-community - image: openmf/web-app:master + image: openmf/community-app:latest resources: limits: cpu: "1000m" @@ -107,35 +68,18 @@ spec: requests: cpu: "200m" memory: "0.5Gi" - volumeMounts: - - name: web-app-config - mountPath: /usr/share/nginx/html/assets/configuration - readOnly: true - - name: nginx-config - mountPath: /etc/nginx/conf.d/default.conf - subPath: nginx.conf - readOnly: true livenessProbe: httpGet: path: / port: 80 - initialDelaySeconds: 10 - periodSeconds: 10 - failureThreshold: 3 + initialDelaySeconds: 90 + periodSeconds: 1 readinessProbe: httpGet: path: / port: 80 - initialDelaySeconds: 5 - periodSeconds: 10 - failureThreshold: 3 + initialDelaySeconds: 90 + periodSeconds: 1 ports: - containerPort: 80 name: mifos-community - volumes: - - name: web-app-config - configMap: - name: web-app-config - - name: nginx-config - configMap: - name: web-app-config diff --git a/kubernetes/fineract-server-deployment.yml b/kubernetes/fineract-server-deployment.yml index 25e49fd37ed..ec937dda518 100644 --- a/kubernetes/fineract-server-deployment.yml +++ b/kubernetes/fineract-server-deployment.yml @@ -64,26 +64,22 @@ spec: resources: limits: cpu: "1000m" - memory: "2Gi" + memory: "1Gi" requests: cpu: "200m" - memory: "1Gi" + memory: "0.5Gi" livenessProbe: httpGet: path: /fineract-provider/actuator/health/liveness - port: 8443 - scheme: HTTPS - initialDelaySeconds: 90 - periodSeconds: 10 - failureThreshold: 3 + port: 8080 + initialDelaySeconds: 180 + periodSeconds: 1 readinessProbe: httpGet: path: /fineract-provider/actuator/health/readiness - port: 8443 - scheme: HTTPS - initialDelaySeconds: 60 - periodSeconds: 10 - failureThreshold: 3 + port: 8080 + initialDelaySeconds: 180 + periodSeconds: 1 env: - name: FINERACT_NODE_ID value: '1' @@ -117,10 +113,8 @@ spec: key: password - name: FINERACT_DEFAULT_TENANTDB_CONN_PARAMS value: '' - - name: FINERACT_SERVER_PORT - value: "8443" - name: JAVA_TOOL_OPTIONS - value: '-Xmx1G -XX:MaxMetaspaceSize=256m' + value: '-Xmx1G' ports: - containerPort: 8443 name: fineract-server diff --git a/kubernetes/fineractmysql-deployment.yml b/kubernetes/fineractmysql-deployment.yml index c9da4518f74..a0b4b35f724 100644 --- a/kubernetes/fineractmysql-deployment.yml +++ b/kubernetes/fineractmysql-deployment.yml @@ -103,7 +103,7 @@ spec: key: password livenessProbe: exec: - command: ["sh","-c","mariadb -uroot -p${MARIADB_ROOT_PASSWORD} -e 'SELECT 1'"] + command: ["sh","-c","mysqladmin ping -h localhost -uroot -p${MARIADB_ROOT_PASSWORD}"] failureThreshold: 10 timeoutSeconds: 10 readinessProbe: @@ -111,7 +111,7 @@ spec: command: - sh - -c - - mariadb -uroot -p${MARIADB_ROOT_PASSWORD} -e 'SELECT 1' + - mysqladmin ping -uroot -p${MARIADB_ROOT_PASSWORD} failureThreshold: 10 initialDelaySeconds: 5 periodSeconds: 5 diff --git a/kubernetes/kubectl-shutdown.sh b/kubernetes/kubectl-shutdown.sh index 09fffea368d..8d64d2395ef 100755 --- a/kubernetes/kubectl-shutdown.sh +++ b/kubernetes/kubectl-shutdown.sh @@ -18,20 +18,8 @@ # under the License. # -echo "Shutting down Fineract Kubernetes deployment..." - -echo "Deleting mifos-community..." -kubectl delete -f fineract-mifoscommunity-deployment.yml --ignore-not-found=true - -echo "Deleting fineract-server..." -kubectl delete -f fineract-server-deployment.yml --ignore-not-found=true - -echo "Deleting fineractmysql..." -kubectl delete -f fineractmysql-deployment.yml --ignore-not-found=true -kubectl delete -f fineractmysql-configmap.yml --ignore-not-found=true - -echo "Deleting secrets..." -kubectl delete secret fineract-tenants-db-secret --ignore-not-found=true - -echo -echo "Fineract Kubernetes deployment has been shut down." +kubectl delete secret fineract-tenants-db-secret +kubectl delete -f fineractmysql-configmap.yml +kubectl delete -f fineractmysql-deployment.yml +kubectl delete -f fineract-server-deployment.yml +kubectl delete -f fineract-mifoscommunity-deployment.yml diff --git a/kubernetes/kubectl-startup.sh b/kubernetes/kubectl-startup.sh index 477e47e994a..8ca9055f406 100755 --- a/kubernetes/kubectl-startup.sh +++ b/kubernetes/kubectl-startup.sh @@ -18,56 +18,53 @@ # under the License. # -set -e - -echo "Setting up Fineract service configuration..." -kubectl create secret generic fineract-tenants-db-secret --from-literal=username=root --from-literal=password=$(head /dev/urandom | LC_CTYPE=C tr -dc A-Za-z0-9 | head -c 16) 2>/dev/null || echo "Secret already exists, skipping..." +echo "Setting Up Fineract service configuration..." +kubectl create secret generic fineract-tenants-db-secret --from-literal=username=root --from-literal=password=$(head /dev/urandom | LC_CTYPE=C tr -dc A-Za-z0-9 | head -c 16) kubectl apply -f fineractmysql-configmap.yml echo echo "Starting fineractmysql..." kubectl apply -f fineractmysql-deployment.yml -echo "Waiting for fineractmysql to be ready..." -kubectl wait --for=condition=ready pod -l tier=fineractmysql --timeout=300s +fineractmysql_pod="" +while [[ ${#fineractmysql_pod} -eq 0 ]]; do + fineractmysql_pod=$(kubectl get pods -l tier=fineractmysql --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') +done + +fineractmysql_status=$(kubectl get pods ${fineractmysql_pod} --no-headers -o custom-columns=":status.phase") +while [[ ${fineractmysql_status} -ne 'Running' ]]; do + sleep 1 + fineractmysql_status=$(kubectl get pods ${fineractmysql_pod} --no-headers -o custom-columns=":status.phase") +done echo echo "Starting fineract server..." kubectl apply -f fineract-server-deployment.yml -echo "Waiting for fineract-server to be ready..." -kubectl wait --for=condition=ready pod -l app=fineract-server --timeout=300s +fineract_server_pod="" +while [[ ${#fineract_server_pod} -eq 0 ]]; do + fineract_server_pod=$(kubectl get pods -l tier=backend --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') +done + +fineract_server_status=$(kubectl get pods ${fineract_server_pod} --no-headers -o custom-columns=":status.phase") +while [[ ${fineract_server_status} -ne 'Running' ]]; do + sleep 1 + fineract_server_status=$(kubectl get pods ${fineract_server_pod} --no-headers -o custom-columns=":status.phase") +done echo "Fineract server is up and running" -echo echo "Starting Mifos Community UI..." kubectl apply -f fineract-mifoscommunity-deployment.yml -echo "Waiting for mifos-community to be ready..." -kubectl wait --for=condition=ready pod -l app=mifos-community --timeout=300s +fineract_mifoscommunity_pod="" +while [[ ${#fineract_mifoscommunity_pod} -eq 0 ]]; do + fineract_mifoscommunity_pod=$(kubectl get pods -l tier=backend --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}') +done +fineract_mifoscommunity_status=$(kubectl get pods ${fineract_mifoscommunity_pod} --no-headers -o custom-columns=":status.phase") +while [[ ${fineract_mifoscommunity_status} -ne 'Running' ]]; do + sleep 1 + fineract_mifoscommunity_status=$(kubectl get pods ${fineract_mifoscommunity_pod} --no-headers -o custom-columns=":status.phase") +done echo "Mifos Community UI is up and running" - -echo -echo "============================================" -echo "Fineract Kubernetes deployment is ready!" -echo "============================================" -echo -echo "To access the Mifos web application:" -echo " minikube service mifos-community" -echo -echo "To access the Fineract API directly:" -echo " minikube service fineract-server --url --https" -echo -echo "Default credentials:" -echo " Username: mifos" -echo " Password: password" -echo -echo "To check pod status:" -echo " kubectl get pods" -echo -echo "To view logs:" -echo " kubectl logs deployment/fineract-server" -echo " kubectl logs deployment/mifos-community" -echo diff --git a/oauth2-tests/dependencies.gradle b/oauth2-tests/dependencies.gradle index 168863f06df..67e7194d06c 100644 --- a/oauth2-tests/dependencies.gradle +++ b/oauth2-tests/dependencies.gradle @@ -20,7 +20,7 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - tomcat 'org.apache.tomcat:tomcat:10.1.45@zip' + tomcat 'org.apache.tomcat:tomcat:10.1.42@zip' testImplementation( files("$rootDir/fineract-provider/build/classes/java/main/"), project(path: ':fineract-provider', configuration: 'runtimeElements'), 'org.junit.jupiter:junit-jupiter-api', diff --git a/scripts/split-features.sh b/scripts/split-features.sh index 8e5fb2dd51c..2213af4cfad 100755 --- a/scripts/split-features.sh +++ b/scripts/split-features.sh @@ -1,22 +1,5 @@ #!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - # Exit on any error set -e diff --git a/scripts/split-tests.sh b/scripts/split-tests.sh index 713466917fb..c083fedf8a7 100755 --- a/scripts/split-tests.sh +++ b/scripts/split-tests.sh @@ -1,22 +1,4 @@ #!/bin/bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - # Usage: ./split-tests.sh set -e diff --git a/twofactor-tests/dependencies.gradle b/twofactor-tests/dependencies.gradle index f7b3ed55a6e..f4685d8a1ec 100644 --- a/twofactor-tests/dependencies.gradle +++ b/twofactor-tests/dependencies.gradle @@ -20,7 +20,7 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - tomcat 'org.apache.tomcat:tomcat:10.1.45@zip' + tomcat 'org.apache.tomcat:tomcat:10.1.42@zip' testImplementation( files("$rootDir/fineract-provider/build/classes/java/main/"), project(path: ':fineract-provider', configuration: 'runtimeElements'), 'org.junit.jupiter:junit-jupiter-api',